Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by netdev-bot+sashiko
Mon, 19 Oct 2026 21:29
Re: [PATCH net-next v17 06/15] quic: add stream management
Author: netdev-bot+sashiko
Date: Mon, 19 Oct 2026 21:29
Date: Mon, 19 Oct 2026 21:29
81 lines
11403 bytes
11403 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The comment above quic_stream_max_streams_update()
(net/quic/stream.c:313-319) says it "Recalculates the max_uni andβ¦
--
quic: add stream management
This patch adds struct quic_stream_table and struct quic_stream to manage
QUIC streams per socket. It adds quic_stream_get() and quic_stream_put() to
acquire and release send and receive streams. It also adds
quic_stream_id_exceeds() and quic_stream_max_streams_update() to track
stream limits.
> diff --git a/net/quic/stream.c b/net/quic/stream.c
> new file mode 100644
> index 0000000000000..29c9f3568b287
> --- /dev/null
> +++ b/net/quic/stream.c
> @@ -0,0 +1,427 @@
[ ... ]
> +/* Updates the maximum allowed incoming stream IDs if any streams were recently
> + * closed. Recalculates the max_uni and max_bidi stream ID limits based on the
> + * number of open streams and whether any were marked for deletion.
> + *
> + * Returns true if either max_uni or max_bidi was updated, indicating that a
> + * MAX_STREAMS_UNI or MAX_STREAMS_BIDI frame should be sent to the peer.
> + */
> +bool quic_stream_max_streams_update(struct quic_stream_table *streams,
> + s64 *max_uni, s64 *max_bidi)
> +{
> + s64 max, rem;
> +
> + *max_uni = 0;
> + *max_bidi = 0;
> + if (streams->recv.uni_pending) {
> + rem = streams->recv.max_streams_uni - streams->recv.streams_uni;
> + max = streams->recv.next_uni_stream_id - QUIC_STREAM_ID_STEP +
> + (rem << QUIC_STREAM_TYPE_BITS);
> +
> + streams->recv.max_uni_stream_id = max;
> + *max_uni = quic_stream_id_to_streams(max);
[Severity: Low]
This isn't a bug, but does the comment above
quic_stream_max_streams_update() describe max_uni and max_bidi correctly?
The comment says the function "Recalculates the max_uni and max_bidi stream
ID limits". max_uni and max_bidi are the names of the output parameters, but
those parameters receive stream counts:
*max_uni = quic_stream_id_to_streams(max);
...
*max_bidi = quic_stream_id_to_streams(max);
Here quic_stream_id_to_streams() returns (stream_id >> 2) + 1. The stream ID
limits are only stored in streams->recv.max_uni_stream_id and
streams->recv.max_bidi_stream_id.
The code itself is correct, because MAX_STREAMS frames carry a count. Nothing
in the series calls this function yet. A future caller that follows the
comment and encodes *max_uni and *max_bidi as stream IDs would advertise the
wrong MAX_STREAMS value.
Could the comment say that the output parameters are stream counts?
> + streams->recv.uni_pending = 0;
> + }
[ ... ]
--
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1792164438.git.lucien.xin%40gmail.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads