Marten Seemann
af6c19617c
handshake: add benchmark tests for packet sealing, opening and rolling keys
2023-03-28 22:46:57 +09:00
Marten Seemann
56a6d8d35b
ci: update golangci-lint to v1.52.2, update Go version ( #3740 )
...
* ci: update golangci-lint to v1.52.2, update Go version
* run gofumpt
2023-03-27 22:55:26 -07:00
Marten Seemann
23f4565108
qtls: don't set the tls.Config.CipherSuites for cipher suite tests ( #3726 )
...
* qtls: don't set the tls.Config.CipherSuites for cipher suite tests
* use qtls versions that don't allow setting of tls.Config.CipherSuites
2023-03-26 06:56:41 -07: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
41ddaa0262
attach the QUIC version to context returned by ClientHelloInfo.Context ( #3721 )
2023-03-26 22:26:14 +09:00
zoltan-kiss-cujo
b7384a4404
quicv2: fix TLS extension type ( #3710 )
...
* quicv2: fix TLS extension type
* Update internal/handshake/tls_extension_handler.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-02-15 14:17:31 -08:00
Marten Seemann
0ac5d1c149
reduce the size of messageChan channel in the crypto setup ( #3664 )
2023-02-13 13:55:49 -08:00
Marten Seemann
04c3fd0756
deprecate quicvarint.Write in favor of quicvarint.Append ( #3690 )
2023-02-13 02:52:25 -08:00
Marten Seemann
dee98638a4
use atomic.Bool from the standard library
2023-02-04 17:44:57 +13:00
Marten Seemann
f42357f096
drop qtls support for Go 1.18
2023-02-04 17:44:54 +13:00
Marten Seemann
3d9380ec3c
reject invalid active_connection_id_limit transport parameter values ( #3687 )
2023-02-01 17:03:19 -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
9488539a49
update imports to use qtls and qpack from quic-go GitHub organization ( #3676 )
2023-01-20 13:42:54 -08:00
Marten Seemann
ef28f4667f
refactor frame parser to remove version parameter from constructor
2023-01-18 20:51:58 +13:00
Marten Seemann
3affa1d911
ackhandler: remove unused version parameter from constructor
2023-01-18 20:50:17 +13:00
Marten Seemann
576d85cd3d
add support for Go 1.20 ( #3641 )
2023-01-17 23:22:36 -08:00
Marten Seemann
2aa71ff76b
use a sync.Pool for ackhandler.Frames ( #3656 )
2023-01-17 23:15:02 -08:00
Marten Seemann
c24fbb094c
refactor header writing to append to a byte slice ( #3646 )
...
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b
remove the LongHeader field from the wire.Header
2023-01-17 21:53:39 +13:00
Marten Seemann
aca052dc7c
stop using the ExtendedHeader for parsing short header packets in tests
2023-01-17 21:53:39 +13:00
Marten Seemann
e89fc1152b
stop using the ExtendedHeader for writing short header packets in tests
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
4bf50901e8
add a function to determine the length of a short header
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
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
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
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 )
2022-12-08 19:58:52 +13:00
cliffc-spirent
b8447041bb
limit the exponential PTO backoff to 60s ( #3595 )
2022-11-15 15:42:35 -08:00
kixelated
9540d0fed2
use go run for mockgen, goimports and ginkgo ( #3616 )
2022-11-11 02:11:41 -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
870fbe7ab0
migrate to Ginkgo v2
2022-10-11 16:38:44 +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
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
d03f9c2a4f
reduce max DATAGRAM frame size, so that DATAGRAMs fit in IPv6 packets ( #3581 )
2022-10-11 02:26:10 -07:00
Marten Seemann
63764c429c
use a sync.Pool for ACK frames
2022-09-06 14:41:13 +03:00
Marten Seemann
c3289188d1
append ACK ranges instead of allocating a new slice
2022-09-05 20:15:35 +03:00
Marten Seemann
dfd35cb071
use a single bytes.Reader for frame parsing ( #3536 )
2022-09-01 01:06:50 -07:00
Marten Seemann
656f3d2d7d
remove the wire.ShortHeader in favor of more return values ( #3535 )
2022-08-30 04:37:36 -07:00
Marten Seemann
0b26365dae
Merge pull request #3534 from lucas-clemente/header-parsing
...
introduce a separate code paths for Short Header packet handling
2022-08-30 14:09:38 +03:00
Marten Seemann
80c3afed34
fix usage of ackhandler.Packet pool for non-ack-eliciting packets ( #3538 )
2022-08-30 04:09:11 -07:00
Marten Seemann
31995601a9
return an error when parsing a too long connection ID from a header ( #3533 )
2022-08-30 04:08:41 -07:00
Marten Seemann
7023b52e13
speed up marshaling of transport parameters ( #3531 )
...
The speedup comes from multiple sources:
1. We now preallocate a byte slice, instead of appending multiple times.
2. Marshaling into a byte slice is faster than using a bytes.Buffer.
3. quicvarint.Write allocates, while quicvarint.Append doesn't.
2022-08-29 23:05:52 +03:00
Marten Seemann
ed15a94703
split the tracing function for received short and long header packets
2022-08-29 15:32:27 +03:00
Marten Seemann
3a12a898a5
add a wire.ShortHeader, implement short header parsing
...
The new parsing function is vastly faster than the combination of header
and extended header parsing:
BenchmarkShortHeaderParsing-10 44192314 26.79 ns/op 48 B/op 1 allocs/op
BenchmarkShortHeaderParsingOld-10 12627363 99.99 ns/op 228 B/op 3 allocs/op
2022-08-29 15:06:34 +03:00
Marten Seemann
42cec84221
extend ByteOrder interface to allow converting from a byte slice
2022-08-29 13:11:58 +03:00