Commit Graph

6752 Commits

Author SHA1 Message Date
Marten Seemann
fb9d8e3ede metrics: add Prometheus metrics for sent and received packets (#4910)
* add Prometheus metrics for sent long and short header packets

* add Prometheus metrics for received long and short header packets

* add Grafana panels for sent and received packets
2025-01-23 12:52:23 +08:00
Marten Seemann
e12f91cfc7 clean up MTU probe packet sending logic (#4914)
As the comment said, using the pacing deadline was a hack. Instead, we
can just schedule sending, and loop around the run loop one more time.
2025-01-23 12:35:29 +08:00
Marten Seemann
a4c9b04c58 simply PTO probe packet sending logic (#4913)
No functional change expected.
2025-01-23 12:26:30 +08:00
Marten Seemann
d41f9749d3 fix memory leak on connection ID rotation when closing connection (#4852)
* fix memory leak on connection ID rotation during CONNECTION_CLOSE

In rare instances, the connection ID manager might switch to a new
connection ID when sending the packet containing the CONNECTION_CLOSE
frame. The connection ID manager removes the active stateless reset
token from the packet handler map when it is closed, so we need to make
sure that this happens last, otherwise the packet handler will keep a
pointer to the closed connection indefinitely.

* defer

* panic on use of connIDManager after Close
2025-01-22 19:35:16 +08:00
Marten Seemann
302308335c migrate the MTU discoverer tests away from Ginkgo (#4907) 2025-01-21 20:17:15 +08:00
Marten Seemann
bea70c6489 fix flaky TestALPN integration test (#4909) 2025-01-21 20:04:26 +08:00
Marten Seemann
eb70424fba fix race condition on concurrent use of Transport.Dial and Close (#4904) 2025-01-21 17:52:16 +08:00
Marten Seemann
5d4835e422 preserve error from SendStream during cancellation and closing (#4882)
* preserve error from cancelled SendStream during cancellation and closing

* clarify that canceling a send stream after closing is valid

* preserve close and reset error when send stream is closed for shutdown
2025-01-21 17:42:47 +08:00
Marten Seemann
fba6ea90a0 avoid calling time.Now() in the MTU discoverer (#4906) 2025-01-21 17:31:10 +08:00
Marten Seemann
5794afbcbf remove unused member variable in the mtuDiscoverer (#4905) 2025-01-21 16:29:45 +08:00
Marten Seemann
202dddd51e wire: implement frame classification into probing / non-probing (#4901)
* wire: implement frame classification into probing / non-probing

* wire: consolidate files

* check if frame is ack eliciting and path probing in frames fuzz test
2025-01-21 14:26:04 +08:00
Marten Seemann
54b97a5079 http3: fix flaky transport tests (#4900) 2025-01-21 14:05:50 +08:00
Marten Seemann
07bbe8c383 add ErrTransportClosed and use it for Listen/Dial after transport close (#4883)
* add ErrTransportClosed and use it for Listen/Dial after transport close

* include the original error in the ErrTransportClosed error string
2025-01-21 13:54:40 +08:00
Marten Seemann
33fd4d1d16 ackhandler: fix ack of packet number ranges in sent packet handler tests (#4897)
The packet number generator for the application data packet number
space randomly skips packet numbers. We need to be careful to not
acknowledge a skipped packet when acknowledging a range of packets in
the sent packet handler tests.
2025-01-21 12:52:57 +08:00
Marten Seemann
bf3ccd1fb3 ackhandler: refactor loss detection timer reset logic (#4893) 2025-01-21 11:09:32 +08:00
Marten Seemann
5c545cac23 qlog: fix logging of packets_in_flight on the metrics_updated event (#4895)
Resetting this value to 0 needs to be logged.
2025-01-21 00:18:29 +08:00
Marten Seemann
88501cc02a ackhandler: migrate sentPacketHandler tests away from Ginkgo (#4881) 2025-01-20 14:04:37 +08:00
Marten Seemann
2d2538d790 ackhandler: remove unneeded SetHandshakeConfirmed from SentPacketHandler (#4890)
According to section 4.9.2 of RFC 9001, dropping the Handshake packet
number spaces happens when the handshake is confirmed.
2025-01-20 12:59:27 +08:00
Marten Seemann
92dc1970ec ackhandler: avoid calling time.Now() when generating ACK frame (#4886) 2025-01-18 17:16:30 +08:00
Marten Seemann
29f98a296c ackhandler: avoid calling time.Now() when setting loss detection timer (#4885) 2025-01-18 15:40:30 +08:00
Marten Seemann
ceabb6bd9a http3: fix flaky TestTransportConnectionRedial (#4884) 2025-01-18 13:14:44 +08:00
Marten Seemann
0fd2decbd5 http3: rename singleRoundTripper interface to clientConn (#4875)
No functional change expected.
2025-01-16 14:37:00 +08:00
Marten Seemann
c017def433 http3: fix connection re-dialing logic for non-QUIC errors (#4879) 2025-01-16 14:13:46 +08:00
Marten Seemann
259fd92306 http3: migrate the error tests away from Ginkgo (#4876) 2025-01-16 13:20:43 +08:00
Marten Seemann
150b955d06 reject NEW_CONNECTION_ID frames when using zero-length connection IDs (#4878) 2025-01-16 11:30:08 +08:00
Marten Seemann
a2dccf54ca http3: fix errors.Is for the Error (#4877) 2025-01-15 20:28:11 +08:00
Marten Seemann
155f8a3725 http3: migrate the transport tests away from Ginkgo (#4857) 2025-01-15 19:59:58 +08:00
Marten Seemann
19ab2c3985 http3: close http.Request.Body on all non-nil error code paths (#4874) 2025-01-15 14:52:15 +08:00
Marten Seemann
62a94758e6 move dialing logic from the client into the Transport (#4859) 2025-01-14 16:40:20 +08:00
Marten Seemann
fbbc3c9e30 wait for connection to shut down when the Dial context is cancelled (#4872) 2025-01-14 16:01:57 +08:00
Roccoon
96ce54e83f http3: add client trace support (#4749)
Since the QUIC connection establishment process includes TLS handshake logic,
Connect and TLS handshake are called in the following order:

ConnectStart -> TLSHandshakeStart -> TLSHandshakeDone -> ConnectDone.

Notice: Wait100Continue not implemented as quic-go doesn't support handling
Expect: 100-continue.
2025-01-14 12:50:16 +08:00
Marten Seemann
516220b0c5 ackhandler: migrate sent packet history tests away from Ginkgo (#4869) 2025-01-13 10:27:12 +08:00
Marten Seemann
61adb85052 use testing.T.Tempdir and Setenv in QLOGDIR integration test (#4868) 2025-01-13 10:02:13 +08:00
Marten Seemann
e448aefdf0 ackhandler: migrate received packet handler tests away from Ginkgo (#4865) 2025-01-12 21:40:55 +08:00
Marten Seemann
3f0f399540 ackhandler: migrate received packet tracker tests away from Ginkgo (#4864) 2025-01-12 21:28:26 +08:00
Marten Seemann
9d1c1d4e7f ackhandler: migrate received packet history tests away from Ginkgo (#4863) 2025-01-12 21:18:53 +08:00
Marten Seemann
f18d42fd23 ackhandler: migrate ack-elicitng and send mode tests away from Ginkgo (#4862) 2025-01-12 21:09:37 +08:00
Marten Seemann
00d5d6f839 migrate the send queue tests away from Ginkgo (#4861) 2025-01-12 16:14:25 +08:00
Marten Seemann
5243f13474 migrate the connection ID manager tests away from Ginkgo (#4860) 2025-01-12 15:07:11 +08:00
Marten Seemann
4a2e4acea5 migrate the unpacker tests away from Ginkgo (#4842) 2025-01-11 21:26:15 +08:00
Marten Seemann
62947d97f5 simplify generation of stateless reset tokens (#4858) 2025-01-11 17:52:59 +08:00
Marten Seemann
9950b4c687 remove validation enforcing one Transport per net.PacketConn (#4851)
It is invalid to use a net.PacketConn in multiple Transports. However,
the validation logic is causing pain when using wrapped net.PacketConns.
It was introduce to guard against incorrect uses of the API when the
Transport was introduced, but this is probably less relevant now than it
was back then.
2025-01-10 09:32:52 +08:00
Marten Seemann
cc6b7faafb http3: keep QUIC connection after request context expires (#4854) 2025-01-09 18:55:10 +08:00
Marten Seemann
420f852f86 drain server's accept queue before returning ErrClosed from Accept (#4846) 2025-01-08 21:59:05 +08:00
Marten Seemann
793389b322 migrate the frame sorter tests away from Ginkgo (#4853) 2025-01-08 21:44:24 +08:00
Marten Seemann
c42f8456ab optimize packetization of DATA_BLOCKED frames (#4845)
DATA_BLOCKED frames should be sent in the same as the STREAM frames that
resulted in the connection becoming blocked on connection flow control.
If there's not enough space left in that packet, the DATA_BLOCKED frame
is sent in the next packet.
2025-01-08 11:41:10 +08:00
Marten Seemann
5a6187c870 reliably queue MAX_DATA frames (#4844) 2025-01-08 09:53:23 +08:00
Marten Seemann
076db77a26 migrate the datagram queue tests away from Ginkgo (#4849) 2025-01-08 01:48:37 +08:00
Marten Seemann
c6561bbb85 migrate the crypto stream manager tests away from Ginkgo (#4847) 2025-01-08 01:29:32 +08:00
Marten Seemann
3e63e58bae migrate the closed connection tests away from Ginkgo (#4848) 2025-01-08 01:10:31 +08:00