Commit Graph

6075 Commits

Author SHA1 Message Date
Glonee
435444af7e add a context to Connection.ReceiveMessage (#3926)
* add context to ReceiveMessage

* add newlines

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-06-27 11:29:30 -07:00
Benedikt Spies
f3875147b9 log STREAM frames in long header packets (#3922) 2023-06-26 15:51:56 -07:00
Marten Seemann
efc252ff56 use the UDP_SEGMENT constant defined in the unix package (for GSO) (#3917) 2023-06-26 05:57:50 -07:00
Marten Seemann
d361637419 simplify syscall consts used for requesting / parsing IPv4 packet info (#3919) 2023-06-26 01:39:47 -07:00
Marten Seemann
4b0ca320a3 use unix.IPV6_RECVPKTINFO and unix.IPV6_PKTINFO on all platforms (#3918) 2023-06-25 20:08:08 +02:00
Marten Seemann
21388c86bb drop support for draft-29 (#3903) 2023-06-21 04:06:44 -07:00
Marten Seemann
da298d09e1 docs: improve documentation of OptimizeConn (#3910) v0.36.0 2023-06-21 02:52:43 -07:00
kelmenhorst
8352e5dc32 check for uninitialized fields when closing the Transport (#3908)
* close Transport: check for possibly uninitialized fields

* close Transport: close Conn, as conn might not be initialized

* close Transport: add test case
2023-06-21 02:14:57 -07:00
Jean-Francois Giorgi
9acce3c6d9 http3: return http.ErrServerClosed instead of quic.ErrServerClosed (#3900)
* - fix 3898

* fix gofumpt

* - refactoring: inline  serveListener in ServeListener
- use ServeListener in s.serveConn
- updated doc for the returned error

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-06-20 09:32:56 -07:00
Marten Seemann
e4fe28930a docs: add detailed description of the quic package (#3902)
* docs: add detailed description of the quic package

* Apply suggestions from code review

Co-authored-by: Prithvi Shahi <shahi.prithvi@gmail.com>

* some more README improvements

---------

Co-authored-by: Prithvi Shahi <shahi.prithvi@gmail.com>
2023-06-20 09:31:39 -07:00
Marten Seemann
28d5106a1c wire: switch to crypto/rand for greased transport parameter generation (#3904) 2023-06-20 09:31:12 -07:00
Benedikt Spies
f57f876446 respect minimum idle timeout of 3 PTOs (#3909) 2023-06-20 01:47:29 -07:00
Marten Seemann
85764da3b6 docs: improve doc comments for the ConnectionState fields (#3901) 2023-06-15 00:03:36 -07:00
Marten Seemann
30527c58c2 frame fuzzer: handle frames one by one (#3884)
This more closely matches what the connection does.
2023-06-13 13:44:25 -07:00
Marten Seemann
c52b583561 Merge pull request #3889 from quic-go/ackhandler-unexport-packet
ackhandler: unexport the packet struct
2023-06-13 23:44:09 +03:00
Marten Seemann
e45c46041a ackhandler: don't allocate a packet struct for non-ack-eliciting packets 2023-06-05 21:07:05 +03:00
Marten Seemann
5225a104d4 retransmission queue: simplify queueing of PING frames 2023-06-05 21:07:02 +03:00
Marten Seemann
da55dfaabd ackhandler: unexport Packet 2023-06-05 21:06:58 +03:00
Marten Seemann
e1bcedc78c ackhandler: use a frame handler interface for OnAcked / OnLost of all frame types (#3888) 2023-06-04 13:04:28 -07:00
Marten Seemann
bde283640b ackhandler: be explicit about skipping packet numbers (#3886) 2023-06-04 12:45:43 -07:00
Marten Seemann
6619e17dd7 ackhandler: don't log / trace skipped packets when declaring them lost (#3887) 2023-06-04 12:29:40 -07:00
Marten Seemann
8f3a68b4eb ackhandler: use a slice to keep track of sent packets (#3841)
* ackhandler: simplify deletion of old packets in packet history

* ackhandler: use a slice to keep track of sent packets

This is a vastly simpler data structure than the combination of map
and linked list used before. It avoids using a linked list (bad cache
locality) and a sync.Pool (for list elements), as well as having to do
hash table lookups.

In the future, this can be easily replaces with a ring buffer, avoiding
all allocations.

* ackhandler: don't store packets that were declared lost
2023-06-04 02:36:38 -07:00
Marten Seemann
6f07050269 ackhandler: apply logic from RFC 9000 to derive packet number length (#3885) 2023-06-04 02:17:57 -07:00
Marten Seemann
4b03636102 ci: run integration tests for all QUIC versions, even if steps failed (#3882) 2023-06-03 00:55:18 -07:00
Marten Seemann
f777c452ce Merge pull request #3881 from quic-go/packet-info-allocs
embed packetInfo in receivedPacket struct, use netip.Addr
2023-06-03 10:54:52 +03:00
Marten Seemann
edaeed0107 embed the packetInfo in the receivedPacket struct
This avoid allocating the packetInfo struct when receiving a packet.
2023-06-03 10:44:16 +03:00
Marten Seemann
3b5950a1ce use a netip.Addr instead of a net.IP in the packetInfo struct 2023-06-03 10:44:15 +03:00
Marten Seemann
b27d114f07 pass the current timestamp to the pacer instead of calling time.Now() (#3824) 2023-06-03 00:26:30 -07:00
Marten Seemann
072a602cc1 pass around receivedPacket as struct instead of as pointer (#3823) 2023-06-03 00:08:58 -07:00
Marten Seemann
591ab1ab5e packer: reduce number of calls to time.Now() when packing packets (#3815) 2023-06-02 23:58:41 -07:00
Marten Seemann
56432a8b79 ci: run linter on all supported platforms (#3816)
* only define packetInfo.ifIndex on platforms where it's actually used

* fix comment and stylecheck for IP_DONTFRAGMENT on Windows

* fix build flags on test file

* ci: run golangci-lint on multiple platforms
2023-06-02 23:47:05 -07:00
Marten Seemann
f661cd1796 Merge pull request #3808 from quic-go/gso
use GSO
2023-06-03 09:34:29 +03:00
Marten Seemann
97904d0b30 ci: also run integration tests with GSO disabled 2023-06-03 09:21:55 +03:00
Marten Seemann
5b5ffa942b pack packets into large buffers when GSO is available 2023-06-03 09:21:55 +03:00
Marten Seemann
628ba87727 append to a given buffer when packing a packet 2023-06-03 09:21:54 +03:00
Marten Seemann
b0524c1241 split code paths for packing normal and ACK-only packets 2023-06-02 18:35:02 +03:00
Marten Seemann
db4e929ccf connection: only queue flow control frames once when sending a batch 2023-06-02 18:35:02 +03:00
Marten Seemann
d1bbde3580 connection: move sending of MTU probe packets out of the fast path 2023-06-02 18:35:02 +03:00
Marten Seemann
499c8e4c33 connection: introduce a fast path for packing and sending many packets 2023-06-02 18:35:02 +03:00
Marten Seemann
9d70bc24a5 simplify pacing logic by introducing a SendPacingLimited send mode 2023-06-02 18:35:02 +03:00
Marten Seemann
470ae7b39b enable packet pacing, for packets sent before handshake completion
It's not clear why this was disabled so far. The pacer should have some
allowance for bursts, and it is expected that the handshake flights fit into
this burst budget and therefore won't be delayed by the pacer.

However, when using 0-RTT, it actually makes sense to start pacing right
away, to avoid inducing packet loss very early in the connection.
2023-06-02 18:35:02 +03:00
Marten Seemann
39ae200972 enable GSO on Linux, if available 2023-06-02 18:35:02 +03:00
Marten Seemann
7d8db149b6 introduce a buffer pool for large buffers (20k) 2023-06-02 18:35:02 +03:00
Marten Seemann
bef0f3d31a pass the maximum packet size from MTU discoverer to packet packer 2023-06-02 18:35:02 +03:00
Marten Seemann
ecaef04695 initialize the MTU discoverer immediately 2023-06-02 18:35:02 +03:00
Marten Seemann
727f9e5654 introduce a OptimizeConn function to manually enable UDP optimizations 2023-06-02 18:35:02 +03:00
Marten Seemann
7ea6dc991f use the same ACK frame struct in the send path, remove ACK frame pool (#3831) 2023-06-02 08:34:27 -07:00
Marten Seemann
21544085e1 Merge pull request #3878 from quic-go/single-ack-receiving
use a single ACK frame in the receive path
2023-06-02 18:06:06 +03:00
Marten Seemann
a595d34557 use a single ACK frame in the receive path 2023-06-02 17:21:46 +03:00
Marten Seemann
614fdb3271 only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00