Commit Graph

42 Commits

Author SHA1 Message Date
Marten Seemann
5a6187c870 reliably queue MAX_DATA frames (#4844) 2025-01-08 09:53:23 +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
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
58cedf7a4f rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
43bde14cf7 implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
Marten Seemann
fbc30cd942 fix race when stream.Read and CancelRead are called concurrently 2021-07-29 13:41:40 +02:00
Marten Seemann
592fb9cad9 introduce a dedicated qerr.TransportError and qerr.ApplicationError 2021-05-01 09:38:48 +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
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
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
9c09e84765 use IETF QUIC transport error codes 2019-03-06 13:43:18 +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
Marten Seemann
3ffea5d8c4 internalize the qerr package 2018-11-11 12:44:16 +07:00
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
50397a979c only send BLOCKED frames if there is more data to send 2018-07-30 05:06:11 +07:00
Marten Seemann
08160ab18f queue connection-level window updates from the flow controller directly
It is not sufficient to check for connection-level window updates every
time a packet is sent. When a connection-level window update needs to be
sent, we need to make sure that it gets sent immediately (i.e. call
scheduleSending() in the session).
2018-05-08 15:17:45 +09:00
Marten Seemann
2e8a5807ba queue stream-level window updates from the flow controller directly 2018-05-08 15:17:45 +09:00
Marten Seemann
a7591e2370 fix logging of stream flow control window increases 2018-05-06 21:52:41 +09:00
Marten Seemann
948eef3e42 create a logger interface and use it everywhere 2018-04-04 13:03:28 +07:00
Marten Seemann
3b82628dbe internalize ackhandler and congestion 2018-02-02 08:40:56 +08:00
Marten Seemann
5371f804f8 don't report blocked streams as active for sending data 2018-01-03 00:18:33 +07:00
Marten Seemann
15ab0ae443 add a HasWindowUpdate method to the stream flow controller 2017-12-21 18:58:55 +07:00
Marten Seemann
ac05343b00 rename window increment to window size in the flow controller
No functional change expected.
2017-12-21 17:58:03 +07:00
Marten Seemann
15af2c6e41 Merge pull request #1037 from lucas-clemente/flow-control-mutexes
remove flow control mutexes for the sending data
2017-12-16 08:57:59 +07:00
Marten Seemann
bfdeeae70c remove flow control mutexes for the sending data
Receiving MAX_{STREAM}_DATA frames and sending data is all done
sequentially, so we don't need a mutex there.
2017-12-16 00:23:48 +07:00
Marten Seemann
357a2f6213 don't defer unlocking the mutex when getting window updates 2017-12-15 19:49:41 +07:00
Marten Seemann
f51cfe9fe3 don't send a window update after the final offset was received
Receiving a final offset means the peer is done sending on that stream,
and there's no need to grant additional flow control credit.
2017-12-07 18:22:39 +07:00
Marten Seemann
d7a09e7667 reject inconsistent final stream offsets 2017-10-27 16:39:41 +07:00
Marten Seemann
636bf4578c error when receiving stream data with a larger offset than the final offset
This could happen when a peer send a STREAM frame with the Fin bit set,
and then sends STREAM frames with a higher offset.
2017-10-25 10:43:29 +07:00
Marten Seemann
268c3859fc remove the flow control manager 2017-10-20 21:34:09 +07:00
Marten Seemann
c53a83535e split the flow controller in stream and connection flow controller 2017-10-20 21:12:19 +07:00