87 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
Marten Seemann
42b198b8d1 use default RTT (100ms) for 0-RTT if no prior estimate (#5388)
* utils: initialize the {Smoothed, Latest, Min}RTT to 100ms

* utils: use time.Duration.Nanoseconds instead of uint64

No functional change expected.

* congestion: better check to avoid division by zero
2025-10-16 09:32:46 +02:00
Marten Seemann
adc13be540 implement a memory-optimized time.Time replacement (#5334)
* implement a memory-optimized time.Time replacement

* monotime: properly handle systems with bad timer resolution (Windows)

* monotime: simplify Since
2025-09-14 08:12:10 +02:00
Marten Seemann
1d8f3f281a ci: update golangci-lint to v2 (#5007) 2025-03-30 07:16:14 +02:00
Marten Seemann
5a6187c870 reliably queue MAX_DATA frames (#4844) 2025-01-08 09:53:23 +08:00
Marten Seemann
5dbb46dcc1 utils: remove unused now parameter from RTTStats.UpdateRTT (#4780) 2024-12-22 14:50:31 +08:00
Marten Seemann
a584e58099 flowcontrol: reset the connection send window when 0-RTT is rejected (#4764) 2024-12-22 11:36:14 +08:00
Marten Seemann
2e4cef10ab flowcontrol: rewrite tests, use require instead of Ginkgo (#4734) 2024-11-30 14:27:57 +08:00
Marten Seemann
36ed693996 flowcontrol: fix timestamp used for receive window auto-tuning (#4735) 2024-11-29 13:59:22 +08:00
Marten Seemann
40a768e77b flowcontrol: avoid calling time.Now(), pass time as a function parameter (#4731) 2024-11-28 17:46:22 +08:00
Marten Seemann
90a824a849 flowcontrol: fix start of the flow-control auto-tuning period (#4730)
The period should start when the first frame is received, not when the data is
first read. This makes a difference when the first STREAM frame is received
out of order.
2024-11-28 15:48:42 +08:00
Marten Seemann
b8ea5c7981 simplify generation of STREAM_DATA_BLOCKED frames (#4608)
The stream always gets blocked at the current write offset. There's no
need to return this offset from the flow controller.
2024-08-01 13:08:09 -07:00
Marten Seemann
42f04d4e02 refactor frame packing to logic to not access the streams map (#4596)
* avoid accessing the streams map when packing stream data

* avoid accessing the streams map when packing flow control frames

* remove streamGetter interface
2024-07-28 12:32:54 -07:00
Marten Seemann
394aa5640d flowcontrol: make it possible to call Abandon multiple times (#4459)
Abandon is called when a RESET_STREAM frame is received, and marks the
bytes between the highest read position and the final offset as
consumed. Making it possible to call Abandon multiple times makes using
this API a bit easier, since the stream doesn't need to track if it
already called it.
2024-04-24 07:06:16 -07:00
Marten Seemann
198de32ef6 don't enqueue stream for sending on reordered MAX_STREAM_DATA frames (#4269) 2024-02-02 22:02:13 -08:00
Marten Seemann
22411e16d5 utils: switch to standard library min and max functions (#4218)
These functions were added in Go 1.21.
2023-12-27 21:19:13 -08:00
Marten Seemann
2797f85fc0 switch from unmaintained golang/mock to go.uber.org/mock (#4050) 2023-08-28 02:23:55 -07:00
Marten Seemann
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -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
bea5de0221 Merge pull request #3483 from lucas-clemente/generic-min-max
use generic Min and Max functions
2022-08-12 12:09:30 +04:00
Marten Seemann
498475fa60 update golangci-lint action to v3, golangci-lint to v1.48.0 (#3499)
* run gofmt -s -w

* stop using the deprecated io/ioutil package

* update golangci-lint action to v3, golangci-lint to v1.48.0
2022-08-10 09:50:48 -07:00
Marten Seemann
43bde14cf7 implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
Marten Seemann
f9904c7c45 add a callback to block window increases to the connection flow controller 2022-01-14 12:03:30 +04:00
Marten Seemann
a98e60c28c fix some typos in documentation and tests 2022-01-14 11:23:14 +04:00
Marten Seemann
fbc30cd942 fix race when stream.Read and CancelRead are called concurrently 2021-07-29 13:41:40 +02:00
Marten Seemann
5ff1abb049 update golangci-lint to v1.41.1 2021-06-19 11:56:47 -07:00
Marten Seemann
592fb9cad9 introduce a dedicated qerr.TransportError and qerr.ApplicationError 2021-05-01 09:38:48 +07:00
Marten Seemann
48a457601d fix documentation for baseFlowController.UpdateSendWindow 2021-03-11 21:59:53 +08:00
Marten Seemann
a04a0072fb add a function to reset the connection flow controller 2021-03-09 17:59:48 +08:00
Marten Seemann
d6eff22f9a introduce a sentinel ByteCount value 2020-12-09 15:31:23 +07:00
Marten Seemann
655632b116 avoid duplicate mutex locking when reading data 2020-11-20 15:45:38 +07:00
Marten Seemann
5352cd509b remove unnecessary mutex locking in the stream flow controller 2020-11-20 15:29:55 +07:00
Marten Seemann
3a06c188f6 replace the RWMutex with a Mutex in the flow controller 2020-11-07 10:12:46 +07:00
Marten Seemann
8752576f26 run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
Marten Seemann
97b0b6d5c7 use GitHub Actions to run unit tests, disable AppVeyor 2020-08-28 20:14:44 +07:00
Marten Seemann
741dc28d74 move the RTTStats to the utils package
The RTTStats are used by the logging package. In order to instrument the
congestion package, the RTTStats can't be part of that package any more
(to avoid an import loop).
2020-07-23 11:53:08 +07:00
Marten Seemann
80e5061243 Merge pull request #2591 from lucas-clemente/reduce-flowcontrol-time-now-calls
reduce calls to time.Now() from the flow controller
2020-06-11 17:11:21 +07:00
Marten Seemann
cea61e364d remove redundant parenthesis and type conversion in flow controller 2020-06-07 11:46:03 +07:00
Marten Seemann
66eeff040b reduce calls to time.Now() from the flow controller 2020-06-07 10:46:24 +07:00
Marten Seemann
e116e2f4cc use decimal number for logging stream offsets and byte counts 2020-04-16 09:50:55 +07:00
Marten Seemann
6d61dccc2f rename the constructors for the various qerr.Error flavors 2020-03-21 10:53:03 +07:00
Marten Seemann
ab2b26a5cb add the unparam linter 2019-09-17 13:44:05 +07:00
Marten Seemann
662041649f use the error names from the draft 2019-03-06 13:45:05 +09:00
Marten Seemann
9c09e84765 use IETF QUIC transport error codes 2019-03-06 13:43:18 +09:00
Marten Seemann
fbe8844006 remove some unneccessary type conversions 2019-02-27 19:30:55 +09:00
Marten Seemann
d6521fa3cc Merge pull request #1749 from lucas-clemente/dont-send-after-reset
don't send stream data after a stream was canceled
2019-01-23 15:25:26 +07:00
Marten Seemann
1d7d532035 release connection-level flow control credit when a stream is reset 2019-01-23 12:49:48 +07:00
Marten Seemann
1f75eaffd3 improve the error messages for stream data received after termination 2019-01-23 12:44:38 +07:00
Marten Seemann
bfbf0bca48 always queue window updates when data is being read
There's no need to have a separate call in the flow controller interface
for this.
2019-01-22 23:46:12 +07:00