Commit graph

78 commits

Author SHA1 Message Date
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
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
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
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
Marten Seemann
0438eada95
use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
Marten Seemann
f8d24ef1e9
don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
Marten Seemann
dd8ce5147b connection: refactor handling of frames when tracing 2023-06-02 13:10:07 +03:00
Marten Seemann
fce0261c34
wire: apply the default value for the active_connection_id_limit (#3806) 2023-05-28 11:45:46 -07:00
Marten Seemann
7a0ef5f867 make Config.Allow0RTT a bool, not a callback 2023-05-02 15:56:49 +02:00
Marten Seemann
ba942715db remove ConnectionIDLength and ConnectionIDGenerator from the Config 2023-05-02 15:56:49 +02:00
Marten Seemann
a4b0265628
use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
Marten Seemann
7effedea79
don't apply invalid transport parameters (#3700) 2023-02-13 14:54:56 -08:00
Marten Seemann
849e53dc3a
fix logging of coalesced packets that don't contain long header packets (#3705)
There's a short period between dropping both Initial and Handshake keys and
completion of the handshake, during which we might call PackCoalescedPacket but
just pack a short header packet.
2023-02-13 02:52:04 -08:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
00624f623d refactor the framer to remove the version param from the constructor 2023-01-18 21:49:27 +13:00
Marten Seemann
4bb9f29b55 refactor the packet packer to remove the version param from constructor 2023-01-18 21:35:01 +13:00
Marten Seemann
56985cbfd1 refactor the packet unpacker to remove version param from constructor 2023-01-18 20:53:45 +13:00
Marten Seemann
d4a0793b6a remove unused version parameter from streams map constructor 2023-01-18 20:52:00 +13:00
Marten Seemann
ef28f4667f refactor frame parser to remove version parameter from constructor 2023-01-18 20:51:58 +13:00
Marten Seemann
582edae63d refactor retransmissionQueue to remove version param from constructor 2023-01-18 20:50:17 +13:00
Marten Seemann
5c7d120b8f remove unused version parameter form the connIDGenerator 2023-01-18 20:50:17 +13:00
Marten Seemann
3affa1d911 ackhandler: remove unused version parameter from constructor 2023-01-18 20:50:17 +13:00
Marten Seemann
2aa71ff76b
use a sync.Pool for ackhandler.Frames (#3656) 2023-01-17 23:15:02 -08:00
Marten Seemann
4d9ab7b604
Merge pull request #3636 from lucas-clemente/early-conn
make ConnectionState usable during the handshake
2023-01-17 22:29:08 -08:00
Marten Seemann
86edf7fd4b remove the LongHeader field from the wire.Header 2023-01-17 21:53:39 +13:00
Marten Seemann
518fd1c877 separate long and short header packets in the coalescedPacket 2023-01-17 21:53:39 +13:00
Marten Seemann
124e597cf9 add a function to write short headers 2023-01-17 21:53:39 +13:00
Marten Seemann
87f51d33dc move the packet buffer out of the shortHeaderPacket struct 2023-01-17 21:53:39 +13:00
Marten Seemann
ec9a6e7a99 introduce a shortHeaderPacket type and use it in packet packer 2023-01-17 21:53:39 +13:00
Marten Seemann
d72aa25fb8 split the logging function for short and long header packets 2023-01-17 21:53:39 +13:00
Marten Seemann
24be84cd00 introduce separate tracing calls for sent long and short header packets 2023-01-17 21:53:37 +13:00
Marten Seemann
9e5f92b561 return a coalesced packet when packing a probe packet
The coalesced packet will only consist of a single packet, but this will
make the refactoring easier.
2023-01-17 21:53:04 +13:00
Marten Seemann
45b489b6f6 make ConnectionState usable during the handshake 2023-01-05 16:37:07 +13:00
Marten Seemann
b52d34008f
add Allow0RTT opt in the quic.Config to control 0-RTT on the server side (#3635) 2023-01-04 16:18:11 -08:00
Marco Munizaga
f2d3cb8f43
expose the QUIC version of a connection (#3620)
* Expose the QUIC version of a connection via connection state

* Update interface.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Finish rename

* gofmt

* Use public type for version number

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-11-15 14:59:49 -08:00
Toby
5fe9f9bd89
chore: fix multiple typos in comments (#3612)
* chore: fix multiple typos I run into

* Update conn_id_generator_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update internal/ackhandler/sent_packet_handler_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2022-11-06 10:59:16 -08:00
Marten Seemann
ee013d9d23
use a monotonous timer for the connection (#3570)
There's no point in having the timer fire multiple times for the same
timestamp. By using a monotonuos timer we avoid busy-looping in cases where the
timer fires, but we can't actually send a packet.
2022-10-11 05:36:10 -07:00
Marten Seemann
fe277dc663
log the size of buffered packets (#3571) 2022-10-11 02:27:26 -07:00