Add Pigeon USPS GSO Support via quic::PigeonWriter.

This CL adds quic::PigeonWriter and quic::PigeonSocket classes, with extensive unit tests. It refactors the old gfe2::RawSocket into a quic::RawSocketInterface and gfe2::RawQuicWriter into quic::RawPacketWriterBase. All gfe/gfe2/quic classes continue to work in the same way as before, only refactored. The changes in the CL are transparent to gfe/gfe2/quic.

The new PigeonSocket uses a BufferAllocator, which is a freelist of shared memory buffers of size 2048 bytes. The socket can externally share shared memory buffers via PigeonSocket::AcquireSegmentBufferFromSharedMemory(). The PigeonWriter uses this to support "GetNextWriteLocation()" for the QUIC connection to serialize packets directly into shared memory. This eliminates a memcpy() in the critical path.

The PigeonWriter and PigeonSocket classes support GSO by batching up to --quic_pigeon_socket_max_gso_segments number of segments per write. The PigeonWriter can also be used in pass-through mode by disabling GSO via flag --quic_pigeon_writer_enable_udp_gso.

If flag --ustreamer_quic_use_new_pigeon_writer is true, and the egress method is USPS, then Ustreamer will create the new quic::PigeonWriter rather than gfe2::RawQuicWriter.

gfe-relnote: GFE related changes refactors gfe's PigeonSocketWriteBlockHandler to net/quic/pigeon_socket.h
PiperOrigin-RevId: 304279221
Change-Id: I919f8a7b8f2f039f07c078f11f2413dd6f39e12a
2 files changed
tree: 7ff6ad597871b68956f7d564d55d86e49eb54f42
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.