Commit Graph

5863 Commits

Author SHA1 Message Date
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
3e7bad5efc use separate append functions for long and short header packets 2023-01-17 21:53:39 +13:00
Marten Seemann
108f152181 split the packet packing function 2023-01-17 21:53:39 +13:00
Marten Seemann
54d8ab39bd refactor slice handling when encrypting a packet 2023-01-17 21:53:39 +13:00
Marten Seemann
4bf50901e8 add a function to determine the length of a short header 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
7ad58d2426 Merge pull request #3655 from lucas-clemente/linked-list-pool
use a sync.Pool to reduce allocation of linked list elements
2023-01-16 03:14:37 -08:00
Marten Seemann
5141739d57 fix flaky send queue test (#3668) 2023-01-16 23:35:15 +13:00
Marten Seemann
a2e52e31a8 fix flaky counting of 0-RTT packets in integration test (#3669) 2023-01-16 23:34:45 +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
Marten Seemann
421893b1c4 only call tls.CipherSuiteName if logging is on, reducing allocations (#3632)
tls.CipherSuiteName calls tls.CipherSuites, which in turn allocates a
large slice of values. We only need the name when we're logging, and
doing so, reduces the amount of allocations (and therefore garbage
created) during a QUIC handshake by roughly 5%.
2023-01-03 13:21:17 -08:00
Marten Seemann
7fbcbf7ac6 update QUIC v2 support to draft-ietf-quic-v2-08 (#3631) 2023-01-04 07:07:06 +13:00
Marten Seemann
07918469bc use ed25519 instead of RSA keys in integration tests (#3661) 2023-01-04 07:06:34 +13:00
Marten Seemann
97550b4817 fix flaky datagram queue test (#3650) 2023-01-04 07:05:39 +13:00
Marten Seemann
2b7bce86cd use the generic linked list for the token store (#3654) 2023-01-04 07:04:39 +13:00
Marten Seemann
71f9182de6 update golang.org/x packages to tagged versions (#3628) 2023-01-04 07:02:49 +13:00
Avi Rosenberg
cf1aff0492 http3: simplify if condition in roundtripper (#3658)
Signed-off-by: Avi Rosenberg <avrumi96@gmail.com>

Signed-off-by: Avi Rosenberg <avrumi96@gmail.com>
2023-01-01 12:20:44 -08:00
Marten Seemann
d9665c632e use a sync.Pool to reduce allocation of linked list elements
Especially the sentPacketHistory linked list shows up in allocation
profiles, since a new list element is allocated for every single packet
we send.
Using a pool for the receiving path, as well as for the frame sorter, is
less critical, since we're tracking ranges there instead of individual
packets / frames, but it doesn't hurt either.
The other occurrences where we use a linked list (connection ID tracking
and the token store) are used so rarely (a few times over the lifetime
of the connection) that using a pool doesn't make any sense there.
2022-12-30 19:24:56 +13:00
Marten Seemann
dd30a02627 ackhandler: remove the packet list element from the correct list 2022-12-30 18:35:26 +13:00
Marten Seemann
d2512193da qerr: include role (remote / local) in error string representations (#3629) v0.31.1 2022-12-08 19:58:52 +13:00
Marten Seemann
8d496ebb5e introduce a type for the stateless reset key (#3621) v0.31.0 2022-11-16 14:11:25 -08:00
cliffc-spirent
b8447041bb limit the exponential PTO backoff to 60s (#3595) 2022-11-15 15:42:35 -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
Stojan Dimitrovski
7b211d6574 expose function to convert byte slice to a connection ID (#3614) 2022-11-13 07:46:29 -08:00
kixelated
9540d0fed2 use go run for mockgen, goimports and ginkgo (#3616) 2022-11-11 02:11:41 -08:00
Toby
2de4af00d0 fix client SNI handling (#3613)
* fix: client sni handling

* chore: add comment
2022-11-07 01:52:22 -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
df762b7552 use the new zero-allocation control message parsing function from x/sys (#3609) 2022-11-04 04:36:46 -07:00
Marten Seemann
76761598e9 http3: add support for parsing and writing HTTP/3 capsules (#3607) 2022-11-03 10:34:01 -07:00
David Brouwer
047f9b6ffa http3: add request to response (#3608) 2022-11-02 13:39:34 -07:00
Marten Seemann
af30cef57c fix availability signaling of the send queue (#3597) v0.30.0 2022-10-22 12:09:40 +01:00
Marten Seemann
e496120c76 http3: add a ConnectionState method to the StreamCreator interface (#3600) 2022-10-22 02:52:30 -07:00
Marten Seemann
85fbfb9405 http3: add a Context method to the StreamCreator interface (#3601) 2022-10-22 02:51:24 -07:00
Marten Seemann
1283a1f215 rename the variable in quic.Config.AllowConnectionWindowIncrease (#3602) 2022-10-21 03:49:03 -07:00
Marten Seemann
b025344e71 fix usage of deprecated Ginkgo flag 2022-10-19 09:09:05 +01:00
Marten Seemann
f78683abb6 update qpack to v0.3.0 (#3593) 2022-10-12 06:00:58 -07:00
Marten Seemann
52ab2454f7 fix version of Ginkgo installed on CI (#3591) 2022-10-11 13:41:22 -07:00
Marten Seemann
423f5dcf6c Merge pull request #3589 from lucas-clemente/update-ginkgo-v2
migrate to Ginkgo v2, remove benchmark test
2022-10-11 22:03:09 +03:00
Marten Seemann
192ae3437b don't drop more than 10 consecutive packets in drop test (#3584) 2022-10-11 05:44:07 -07:00
Marten Seemann
870fbe7ab0 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Marten Seemann
c9a878858e remove the benchmark test suite 2022-10-11 16:38:18 +04: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
2b5d1281c1 http3: add http3.Server.ServeQUICConn to serve a single QUIC connection (#3587) 2022-10-11 05:07:24 -07:00
Marten Seemann
c75bf49422 http3: expose ALPN values (#3580) 2022-10-11 04:27:49 -07:00
Marten Seemann
fe277dc663 log the size of buffered packets (#3571) 2022-10-11 02:27:26 -07:00
Marten Seemann
438942b888 ackhandler: reject duplicate packets in ReceivedPacket (#3568)
Before we process a packet, IsPotentiallyDuplicate is called.
This should filter out all duplicates before the reach ReceivedPacket.
2022-10-11 02:27:10 -07:00
Marten Seemann
597e00549d update qtls to versions that include the ec_point_formats fix (#3583)
The new qtls versions contain the standard library fix for
https://github.com/golang/go/issues/49126.
2022-10-11 02:26:25 -07:00