Glonee
0ae8c03816
http3: don't allow usage of closed Transport ( #5324 )
...
* do not allow use a closed transport
* update tests
* add test
* Update http3/transport.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* unit tests
* update test
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-09-07 12:52:25 +02:00
Marten Seemann
6dcac15a12
qlog: merge event category and name ( #5329 )
...
This follows a (not so recent) change to the qlog specification.
2025-09-07 11:40:45 +02:00
Marten Seemann
2dfd4dd6bf
qlog: add a benchmark for the ConnectionTracer ( #5328 )
...
This test aims to benchmark a somewhat realistic scenario of a QUIC
connection that sends packets and receives acknowledgments.
2025-09-07 11:16:26 +02:00
Glonee
483d257336
http3: fix race in concurrent Transport.RoundTrip calls ( #5323 )
...
* http3: fix data race in Transport
* reset init Once
2025-09-07 05:25:00 +02:00
Marten Seemann
357f679072
ackhandler: store the last four skipped packets ( #5322 )
...
This allows for more accurate packet number difference calculations,
which is especially important once we attempt to detect spurious loss
detection events.
2025-08-30 08:05:59 +02:00
Marten Seemann
0bef51ec76
ackhandler: account for skipped packets in packet threshold calculation ( #5316 )
2025-08-29 05:39:41 +02:00
Marten Seemann
9cd98f48bf
ackhandler: store skipped packet numbers separately ( #5314 )
2025-08-29 05:09:46 +02:00
Marten Seemann
5bb2146b47
ackhandler: avoid storing packet number in packet struct ( #5312 )
...
* ackhandler: optimize memory layout of packet struct
The packet number can be derived from the position that this packet is
stored at in the packets slice in the sent packet history. There is no
need to store the packet number, saving 8 bytes per packet.
* ackhandler: avoid copying the packet struct
2025-08-29 04:18:45 +02:00
Marten Seemann
13a9a650f2
ci: fix cache paths in cross compile workflow ( #5318 )
2025-08-29 04:05:44 +02:00
Marten Seemann
b6119744e4
ci: improve cache key generation for the cross compilation job ( #5315 )
2025-08-28 17:12:06 +02:00
Marten Seemann
c8e7cd66e3
ackhandler: immediately clear ackedPacket slice after processing ACK ( #5313 )
...
* ackhandler: immediately clear ackedPacket slice after processing ACK
* ackhandler: add defensive check for empty ackedPackets slice
2025-08-28 16:12:20 +02:00
Marten Seemann
168889f283
ackhandler: use a typed mock for the ECNHandler ( #5311 )
...
No functional change expected.
2025-08-28 13:39:42 +02:00
Marten Seemann
0cd4bd940b
ackhandler: use an iterator to process received packet ranges ( #5309 )
...
* ackhandler: use an interator to track received packet ranges
* use slices.Collect
* naming convention
2025-08-28 10:32:26 +02:00
Marten Seemann
cead8cfbd6
ackhandler: fix resetting of packet.isPathProbePacket ( #5310 )
2025-08-28 10:18:49 +02:00
Marten Seemann
7f98a8b7ca
utils: use synctest to make the timer tests fully deterministic ( #5306 )
...
* utils: use synctest to make the timer tests fully deterministic
* Go 1.24 workaround
2025-08-25 09:25:50 +02:00
Marten Seemann
d0d8bc2674
use synctest to make the datagram queue tests fully deterministic ( #5305 )
2025-08-25 06:38:40 +02:00
Marten Seemann
08b4d3c708
use synctest to make the outgoing path manager tests fully deterministic ( #5304 )
2025-08-24 23:32:43 +08:00
Marten Seemann
b126b42c8b
ci: use go mod tidy -diff to check for tidied go.mod ( #5303 )
2025-08-24 12:27:56 +02:00
Marten Seemann
baf363b641
use synctest to make the send stream tests fully deterministic ( #5298 )
2025-08-24 07:09:16 +02:00
Marten Seemann
d424c94805
use synctest to make the send queue tests fully deterministic ( #5302 )
2025-08-24 06:58:41 +02:00
Marten Seemann
98b84a3523
use synctest.Wait in receive stream tests ( #5299 )
2025-08-24 12:35:55 +08:00
Marten Seemann
92e7eca419
restore previously deleted TestStreamsMapConcurrent test ( #5301 )
2025-08-24 06:18:22 +02:00
Marten Seemann
ade68c8e0f
ci: fix cache save and restore logic for cross compile workflow ( #5300 )
...
lookup-only doesn't download the cache, even if it's there. This is not what we
intended: we still want to use the cache for PRs, we just want to upload a
new cache.
2025-08-24 05:48:49 +02:00
Marten Seemann
c04a550a18
ci: cache the Go build cache for cross-compilation workflow ( #5297 )
...
* ci: cache the Go build cache for cross-compilation workflow
* only store cache when on master
* don't hash go.sum in
2025-08-23 18:27:48 +02:00
Marten Seemann
258d6b1352
use synctest to make streams map tests fully deterministic ( #5296 )
...
* use synctest to make streams map tests fully deterministic
* ignore synctest helper package for code coverage
2025-08-23 18:11:59 +02:00
Marten Seemann
257281b6e2
use synctest to make receive stream tests fully deterministc ( #5291 )
2025-08-20 09:44:19 +02:00
dependabot[bot]
fb82d0da00
ci: bump actions/checkout from 4 to 5 ( #5293 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 04:53:15 +02:00
Marten Seemann
8c062ae604
use testing.B.Loop in all benchmark tests ( #5285 )
...
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -category=bloop -fix -test ./...
was used as a starting point.
2025-08-16 12:44:56 +02:00
Marten Seemann
66e5c5ebaa
replace interface{} with any ( #5290 )
...
No functional change expected.
2025-08-16 07:21:18 +02:00
Marten Seemann
fea19fc3ec
update to Go 1.25, drop Go 1.23, use go tool for gomock ( #5283 )
...
* update to Go 1.25, drop support for Go 1.23
* ci: update golangci-lint to v2.4.0
* use new go tool command for gomock / mockgen
* also update Go version used for oss-fuzz
2025-08-16 06:14:01 +02:00
Marten Seemann
fee90a89ef
ackhandler: generalize check for missing packets below threshold ( #5260 )
...
* ackhandler: check for missing packets below reordering treshold
No functional change expected.
With the Acknowledgement Frequency extension, the reordering threshold
will become configurable. With this change, it will be easy to use the
peer-requested value instead of the predefined constant.
* improve documentation
* call HighestMissingUpTo in randomized test
2025-08-14 16:51:24 +02:00
Marten Seemann
da27fcf33f
expose basic connection stats via Conn.ConnectionStats ( #5281 )
...
* Add ConnectionStats
* remove for loop
* Add comments
* Update comments
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io >
2025-08-13 16:45:14 +02:00
WeidiDeng
e0a836f597
fix documentation for EarlyListener.Close ( #5284 )
...
* quic: update documentaion for EarlyListener.Close
* fix missing space
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-08-13 22:26:26 +08:00
WeidiDeng
f0042715d7
http3: fix documentation for Server.ServeListener ( #5282 )
2025-08-12 16:14:09 +02:00
Marten Seemann
7e636553d6
fix repeated initialization of outgoingPathManager in Conn.AddPath ( #5280 )
...
In case of concurrent calls, this may still be called multiple times.
Co-authored-by: Marco Munizaga <git@marcopolo.io >
2025-08-12 22:00:08 +08:00
Benjamin M. Schwartz
c7cf12703d
quicvarint: tolerate empty reads of the underlying io.Reader ( #5275 )
...
* Tolerate empty reads in `quicvarint.Read`
Currently, `quicvarint.Read` misinterprets an empty read (`n==0`)
as a single zero byte. While empty reads are "discouraged" in
the `io.Reader` interface, they do sometimes happen, especially
when using `io.Pipe()`.
This change tolerates empty reads, adds a corresponding unit test,
and also includes some additional test coverage related to empty
capsules
* minor test refactor
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-08-05 08:05:52 +02:00
Marten Seemann
fa8ca045dd
quicvarint: extend benchmark to use quicvarint.Reader ( #5278 )
...
* quicvarint: extend benchmark to use quicvarint.Reader
* rename variable
2025-08-05 07:49:55 +02:00
Marten Seemann
5422e4c68c
ackhandler: remove unused time from receivedPacketHandler.ReceivedPacket ( #5277 )
...
* ackhandler: remove unused time from receivedPacketHandler.ReceivedPacket
No functional change expected.
* fix typo
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* also fix typo in tests
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-08-05 06:03:02 +02:00
Marten Seemann
69cbb6ec5b
qlog: add support for ACK_FREQUENCY and IMMEDIATE_ACK frames ( #5276 )
2025-08-04 10:00:02 +02:00
Jannis Seemann
2db5f56cc5
fix missing log statement for STREAM, DATAGRAM and ACK ( #5273 )
2025-08-01 01:37:13 +02:00
Marten Seemann
0a22da7e03
wire: add support for the min_ack_delay transport parameter ( #5266 )
...
* wire: implement parsing and writing of the min_ack_delay transport parameter
* wire: validate the min_ack_delay transport parameter
2025-07-24 15:43:34 +02:00
Jannis Seemann
9ae5267916
fuzzing: fix timeout in frame parser ( #5268 )
2025-07-22 17:45:00 +02:00
Marten Seemann
b69abbaf11
wire: implement parsing and writing of the IMMEDIATE_ACK frame ( #5265 )
2025-07-21 15:56:04 +02:00
Marten Seemann
06e31852cb
wire: implement parsing and writing of the ACK_FREQUENCY frame ( #5264 )
...
* implement parsing and writing of the ACK_FREQUENCY frame
* prevent overflows of Request Max Ack Delay
* fix fuzzer
2025-07-21 15:35:06 +02:00
Jannis Seemann
c2e784aaf2
wire: optimize parsing logic for STREAM, DATAGRAM and ACK frames ( #5227 )
...
ParseOtherFrames-16 148ns ± 4% 150ns ± 3% ~ (p=0.223 n=8+8)
ParseAckFrame-16 302ns ± 2% 298ns ± 3% ~ (p=0.246 n=8+8)
ParseStreamFrame-16 262ns ± 3% 213ns ± 2% -18.61% (p=0.000 n=8+8)
ParseDatagramFrame-16 561ns ± 5% 547ns ± 4% ~ (p=0.105 n=8+8)
v0.54.0
2025-07-20 13:14:38 +02:00
Jannis Seemann
893a5941fb
wire: improve frame parsing benchmarks ( #5263 )
...
* Add master-style frame handling benchmarks using type switches
* Fixing styling issue.
* put STREAM frame back
* remove BenchmarkParseStreamAndACK
* use random data for STREAM and DATAGRAM
* improve comment
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-07-18 18:33:04 +02:00
Coia Prant
afe01ef103
close Transport when DialAddr fails ( #5259 )
...
Close the transport after dial fails to avoid memory leaks. Same logic as DialAddrEarly.
Signed-off-by: Coia Prant <coiaprant@gmail.com >
2025-07-12 18:58:30 +02:00
Robin Thellend
0a9c6ea4c8
http3: remove dependency on quic internal packages ( #5256 )
...
* Remove http3 dependency on quic internal packages
Remove the dependency on internal/protocol from the http3 package. This
makes it possible for a forked http3 to use the mainline quic-go
package.
* Address review comments
* Fix syntax
* Use broader pattern for http3 directory
* Copy internal/testdata
* Replace perspective with bool
* clone the supported version slice
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-07-07 13:41:23 +02:00
Marten Seemann
fd32cf5c69
fix flaky TestPostQuantumClientHello ( #5253 )
2025-06-29 07:09:45 +02:00
Marten Seemann
0eb237f797
add a Config and ConnectionState flag for RESET_STREAM_AT ( #5243 )
...
* add a Config and ConnectionState flag for RESET_STREAM_AT
* add RESET_STREAM_AT to README
2025-06-29 05:42:02 +02:00