Marten Seemann
c3289188d1
append ACK ranges instead of allocating a new slice
2022-09-05 20:15:35 +03:00
Marten Seemann
62b82789c0
http3: reduce usage of bytes.Buffer ( #3539 )
2022-09-01 06:39:21 -07:00
Marten Seemann
dfd35cb071
use a single bytes.Reader for frame parsing ( #3536 )
2022-09-01 01:06:50 -07:00
Marten Seemann
93e1d031b9
split code paths for packing 0-RTT and 1-RTT packets in packet packer ( #3540 )
2022-08-30 04:41:04 -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
5cd5341545
preallocate the message buffers of the ipv4.Message passed to ReadBatch ( #3541 )
2022-08-30 04:11:43 -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
4f3d3b36ac
introduce a separate code path for unpacking short header packets
2022-08-29 15:55:37 +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
Marten Seemann
e3723a0ef1
move the check for empty payload to the unpacker
2022-08-29 13:11:58 +03:00
Marten Seemann
fd1b3a23c4
remove unneeded packet number field from the unpackedPacket
2022-08-29 13:11:57 +03:00
Marten Seemann
7d827d515e
don't pass the header to connection.tryQueueingUndecryptablePacket
2022-08-29 13:11:16 +03:00
Marten Seemann
f41772c43c
return an error when parsing a too long connection ID from a header
2022-08-29 13:05:24 +03:00
Marten Seemann
3f1adfd822
Merge pull request #3529 from lucas-clemente/conn-id-array
...
use a struct containing an array to represent Connection IDs
2022-08-29 12:24:15 +03:00
Marten Seemann
15945e3190
Merge pull request #3525 from lucas-clemente/ackhandler-linked-list-allocs
...
reduce allocations of ackhandler.Packet
2022-08-29 12:07:12 +03:00
Marten Seemann
a3b91cf683
use a sync.Pool to avoid allocations of ackhandler.Packet
2022-08-29 11:45:28 +03:00
Marten Seemann
4cbb4f8114
remove ConnectionID.Equal function
...
Connection IDs can now be compared with ==.
2022-08-29 11:30:32 +03:00
Marten Seemann
1aced95d41
use an array instead of a byte slice for Connection IDs
2022-08-29 11:30:31 +03:00
Marten Seemann
9e0f9e62ff
parse arbitrary length Connection IDs in Version Negotiation packets
2022-08-29 10:58:33 +03:00
Marten Seemann
53412e9ba3
trace arbitrary length Connection IDs for Version Negotiation packets
2022-08-29 10:58:33 +03:00
Marten Seemann
ecc8320c2c
add a tracer function to trace sending of Version Negotiation packets
2022-08-29 10:58:33 +03:00
Marten Seemann
21b9ef03be
add a type for arbitrary length Connection IDs, and parsing function
...
RFC 8999 allows Connection IDs of up to 255 bytes. Current QUIC versions
only use up to 20 bytes.
2022-08-29 10:58:33 +03:00
Marten Seemann
d7097d74f0
implement a function to parse the version number of a Long Header packet
2022-08-29 10:58:33 +03:00
Marten Seemann
ec9c824d98
Merge pull request #3530 from lucas-clemente/frame-append-to-slice
...
serialize frames by appending to a byte slice, not to a bytes.Buffer
2022-08-29 10:58:00 +03:00
Marten Seemann
abb913d29c
fix datagram RFC number in documentation for quic.Config ( #3523 )
2022-08-29 10:28:25 +03:00
Marten Seemann
ff47a7e14e
add DPLPMTUD (RFC 8899) to list of supported RFCs in README ( #3520 )
2022-08-29 10:27:38 +03:00
Marten Seemann
880dfc699c
use the null tracers in the tracer integration tests ( #3528 )
2022-08-29 10:27:04 +03:00
Marten Seemann
ab6d664b43
rename frame.Write to frame.Append
2022-08-28 23:18:24 +03:00
Marten Seemann
3ca1001951
append to a byte slice instead of a bytes.Buffer when serializing frames
2022-08-28 23:18:06 +03:00
Marten Seemann
65dd82ad90
implement a quicvarint.Append method
2022-08-28 22:51:03 +03:00
Marten Seemann
fd38fe4a9a
avoid allocations when adding packets to the sent packet history
2022-08-27 18:22:46 +03:00
Marten Seemann
07412be8a0
Merge pull request #3512 from lucas-clemente/null-connection-tracer
...
add a logging.NullTracer and logging.NullConnectionTracer
v0.29.0
2022-08-27 13:53:41 +03:00
Marten Seemann
cd87a64e1e
use the logging.Null{Connection}Tracer in integration tests
2022-08-27 13:16:40 +03:00
Marten Seemann
c29276ef67
expose the Null{Connection}Tracer as types, not as variables
2022-08-27 13:08:48 +03:00
João Oliveirinha
66f6fe0b71
add support for providing a custom Connection ID generator via Config ( #3452 )
...
* Add support for providing a custom ConnectionID generator via Config
This work makes it possible for servers or clients to control how
ConnectionIDs are generated, which in turn will force peers in the
connection to use those ConnectionIDs as destination connection IDs when sending packets.
This is useful for scenarios where we want to perform some kind
selection on the QUIC packets at the L4 level.
* add more doc
* refactor populate config to not use provided config
* add an integration test for custom connection ID generators
* fix linter warnings
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2022-08-24 04:06:16 -07:00
Marten Seemann
034fc4e09a
fix typo in README
2022-08-24 01:21:47 -07:00
Marten Seemann
48779d053f
add a logging.NullTracer
2022-08-22 13:21:35 +03:00
Marten Seemann
118a7dba5a
add a logging.NullConnectionTracer
...
The NullConnectionTracer can be embedded, to make it easier to access just a
few of the calls.
2022-08-22 13:20:21 +03:00
KevinZønda
a90135751b
fix datagram support detection ( #3511 )
...
* fix: datagram support detection
- treat zero MaxDatagramFrameSize as unsupported.
- avoid send corresponding transport parameters when support is disabled
- report error when calling Send/ReceiveMessage and support is disabled
see https://github.com/lucas-clemente/quic-go/issues/3505
* patch: always initiate datagram
* fix: remove useless nil check
2022-08-22 03:02:40 -07:00
Marten Seemann
509616cbea
Merge pull request #3514 from lucas-clemente/closed-session
...
use a single Go routine to send copies of CONNECTION_CLOSE packets
2022-08-22 12:07:39 +03:00
Marten Seemann
263f728ea8
add integration test for the retransmission of CONNECTION_CLOSE packets
2022-08-22 11:42:44 +03:00
Marten Seemann
b659414495
use a single Go routine to send copies of CONNECTION_CLOSE packets
2022-08-21 15:41:47 +03:00
Marten Seemann
c3ab9c4ea9
replace all connection IDs at the same time when connection is closed
2022-08-21 14:09:49 +03:00
Marten Seemann
635dc90475
use bits.OnesCount to determine if a number is a power of two
...
This should be 3-4x faster than the current implementation.
2022-08-21 13:09:57 +03:00
Marten Seemann
feb94286a5
move the 0-RTT queue to a separate file
2022-08-21 12:46:40 +03:00