QUIC Net Handler A SubSystem to handle QUICNet
QUIC & Net. Handler A Sub-System to handle QUICNet. VC
Handshake • Source address validation – TCP 3 -ways – Hello. Retry. Request cookie extension • Client Generated Conn. ID – Should not be trusted – Initial Packet – 0 -RTT Packet
QUICPacket. Handler. In
QUICPacket. Handler. In • Trampoline for UDPPacket – Map UDPPacket to QUIC Connection – Transfer UDPPacket from ET_UDP to ET_NET • Called back within ET_UDP – Light weight and High efficiency – Do not block the ET_UDP • Client Generated Conn. ID – Should not be trusted – Initial Packet & 0 -RTT Packet
QUICNet. VC • Net. VC is a tunnel – Socket FD as a Endpoint – App. SM as another Endpoint • Net. Handler is a tunnel. SM – Transfer the data between the Endpoints. • QUICNet. VC – QUIC Connection is a Endpoint – QUIC App is another Endpoint • Better performance – If the Endpoints within the same EThread
Polling the QUIC Read Event • SSLNet. VC inherits from Unix. Net. VC – SSLNet. VC and Unix. Net. VC are both managed by Net. Handler. – The Poll. Cont: : poll. Event is design to polling I/O event on them. – The triggered Net. VC is pushed into the ready_list. • QUICNet. VC inherits from Unix. Net. VC – In order to manage the QUICNet. VC by Net. Handler • class QUICEvent. IO : public Event. IO • QUICPoll. Cont: : poll. Event is called back periodically to push the triggered QUICNet. VC into the ready_list queue.
QUICPoll. Cont • QUICPacket. Handler. In – Locate an EThread by QUIC Conn. ID • Map<int 64_t, EThread *> _connections • Queues – Locate a QUICNet. VC by QUIC Conn. ID with in current EThread. • Map<int 64_t, QUICNet. VConnection *> _connections – Save Long. Header Packets • Initial/Handshake/Zero. RTT Protect Queue – Save Shart. Header Packets • Short Protect Queue • UDPPacket is transferred from ET_UDP into these queues – Do less within QUICPacket. Handler. In • Traverse these queues within QUICPoll. Cont on each EThread – Create a new QUICNet. VC – Or trigger the QUICNet. VC
Interfaces for Net. Handler • QUICNet. VC: : net_read_io – Call to the QUICNet. VC: : handle. Event • QUICNet. VC: : write_to_net_io – Do nothing • QUICNet. VC: : main. Event – For Inactivity. Cop • Do not call event. Processor. schedule_xxx() – Call QUICNet. VC: : reenable() or reenable_re()
QUICNext. Protocol. Accept • Initial read on QUICNet. VC – To receive the handshake packet and 0 -RTT packet – Cause only triggered and enabled Net. VC is processed by Net. Handler
QUICNet. VC – Handshake & Read
QUICNet. VC – Handshake • HQSession. Accept – Handshake Done if NET_EVENT_ACCEPT is received. – It is similar to the Zero-Length Read within SSLNext. Protocol. Accept
MIOStream • The idea from MIOBuffer – 1 x Producer (writer) as the input – 5 x Consumer (IOBuffer. Reader) as the output • MIOStream – 1 x Producer (Incoming UDPPacket from QUICPacket. Handler. In) – N x Consumer (QUICStream)
- Slides: 12