v0.36.0
Generic Segmentation Offload (GSO)
This release enables GSO (Generic Segmentation Offload) in the send path, drastically increasing the packet send rate. Without GSO, quic-go had to use a single (sendmsg) syscall for every UDP datagram sent. GSO allows us to pass one giant (up to 64k) datagram to the sendmsg syscall, and have the kernel chop it into MTU sized (~1300 bytes) datagrams before sending them out on the wire. For more details on syscall optimizations, CloudFlare published an excellent blog post about this a while ago. GSO is currently only available on Linux (and with kernels >4.18).
Users who are using the same net.PacketConn
for QUIC and to send out non-QUIC packets now need to call the newly introduced OptimizeConn
function before passing the connection to the Transport
. Otherwise, calls to WriteTo
will fail after GSO support was enabled. Users who are not using the same net.PacketConn
in this way don't need to change anything.
We also continued our effort to further reduce allocations during data transfers (#3526). Work on improving performance even further will continue in future releases.
Other Notable Changes
- http3: The server now returns http.ErrServerClosed instead of quic.ErrServerClosed (#3900)
- quic-go now correctly deals with super-short idle timeouts (#3909)
- uint62 overflows are now correctly handled in the Config (#3866)
- only run DPLPMTUD (RFC 8899) on connections that support setting the DF bit (#3879)
- switch to the packet number length derivation logic described in the RFC (#3885)
- fix panics when closing an uninitialized Transport (#3908)
Full Changelog
- use a ring buffer in the framer by @Glonee in #3857
- update Ginkgo to v2.9.5 and Gomega to v1.27.6 by @marten-seemann in #3845
- fix flaky client test by @marten-seemann in #3834
- ackhandler: simplify sentPacketHandler.SentPacket by @marten-seemann in #3847
- readme: restructure RFC section, add QUIC v2 (RFC 9369) by @marten-seemann in #3871
- remove stray print statement in datagram test by @marten-seemann in #3828
- ci: fix ordering of error output of the cross compilation workflow by @marten-seemann in #3809
- githooks: exclude deleted files from checks by @marten-seemann in #3864
- receive stream: put back the buffer for the last STREAM frame by @marten-seemann in #3832
- config: handle overflows of stream and flow control limits by @marten-seemann in #3866
- improve documentation of the Transport and the dial and listen functions by @marten-seemann in #3875
- don't use closures for passing OnLost and OnAcked STREAM frame callbacks by @marten-seemann in #3833
- use ackhandler.Frame directly, not as a pointer, remove its sync.Pool by @marten-seemann in #3835
- only run DPLPMTUD if the connection can send packets with the DF bit set by @marten-seemann in #3879
- use a single ACK frame in the receive path by @marten-seemann in #3878
- use the same ACK frame struct in the send path, remove ACK frame pool by @marten-seemann in #3831
- use GSO by @marten-seemann in #3808
- ci: run linter on all supported platforms by @marten-seemann in #3816
- packer: reduce number of calls to time.Now() when packing packets by @marten-seemann in #3815
- pass around receivedPacket as struct instead of as pointer by @marten-seemann in #3823
- pass the current timestamp to the pacer instead of calling time.Now() by @marten-seemann in #3824
- embed packetInfo in receivedPacket struct, use netip.Addr by @marten-seemann in #3881
- ci: run integration tests for all QUIC versions, even if steps failed by @marten-seemann in #3882
- ackhandler: apply logic from RFC 9000 to derive packet number length by @marten-seemann in #3885
- ackhandler: use a slice to keep track of sent packets by @marten-seemann in #3841
- ackhandler: don't log / trace skipped packets when declaring them lost by @marten-seemann in #3887
- ackhandler: be explicit about skipping packet numbers by @marten-seemann in #3886
- ackhandler: use a frame handler interface for OnAcked / OnLost of all frame types by @marten-seemann in #3888
- ackhandler: unexport the packet struct by @marten-seemann in #3889
- frame fuzzer: handle frames one by one by @marten-seemann in #3884
- docs: improve doc comments for the ConnectionState fields by @marten-seemann in #3901
- Respect minimum idle timeout of 3 PTOs by @birneee in #3909
- wire: switch to crypto/rand for greased transport parameter generation by @marten-seemann in #3904
- docs: add detailed description of the quic package by @marten-seemann in #3902
- http3: return http.ErrServerClosed instead of quic.ErrServerClosed by @jfgiorgi in #3900
- check for uninitialized fields when closing the Transport by @kelmenhorst in #3908
- docs: improve documentation of OptimizeConn by @marten-seemann in #3910
New Contributors
- @kelmenhorst made their first contribution in #3908
Full Changelog: v0.35.1...v0.36.0