From: Paolo Abeni <pabeni@redhat.com>
To: Xin Long <lucien.xin@gmail.com>,
network dev <netdev@vger.kernel.org>,
quic@lists.linux.dev
Cc: davem@davemloft.net, kuba@kernel.org,
Eric Dumazet <edumazet@google.com>,
Simon Horman <horms@kernel.org>,
Stefan Metzmacher <metze@samba.org>,
Moritz Buhl <mbuhl@openbsd.org>,
Tyler Fanelli <tfanelli@redhat.com>,
Pengtao He <hepengtao@xiaomi.com>,
Thomas Dreibholz <dreibh@simula.no>,
linux-cifs@vger.kernel.org, Steve French <smfrench@gmail.com>,
Namjae Jeon <linkinjeon@kernel.org>,
Paulo Alcantara <pc@manguebit.com>, Tom Talpey <tom@talpey.com>,
kernel-tls-handshake@lists.linux.dev,
Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>,
Steve Dickson <steved@redhat.com>, Hannes Reinecke <hare@suse.de>,
Alexander Aring <aahringo@redhat.com>,
David Howells <dhowells@redhat.com>,
Matthieu Baerts <matttbe@kernel.org>,
John Ericson <mail@johnericson.me>,
Cong Wang <xiyou.wangcong@gmail.com>,
"D . Wythe" <alibuda@linux.alibaba.com>,
Jason Baron <jbaron@akamai.com>,
illiliti <illiliti@protonmail.com>,
Sabrina Dubroca <sd@queasysnail.net>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Daniel Stenberg <daniel@haxx.se>,
Andy Gospodarek <andrew.gospodarek@broadcom.com>
Subject: Re: [PATCH net-next v7 06/16] quic: add stream management
Date: Tue, 20 Jan 2026 13:31:51 +0100 [thread overview]
Message-ID: <6c6d5644-3354-46ba-bbc9-e76789648abf@redhat.com> (raw)
In-Reply-To: <e3f770ef8d9aba101e1f5dc2f2f72bb0d2a30b94.1768489876.git.lucien.xin@gmail.com>
On 1/15/26 4:11 PM, Xin Long wrote:
> +struct quic_stream {
> + struct hlist_node node;
> + s64 id; /* Stream ID as defined in RFC 9000 Section 2.1 */
> + struct {
> + /* Sending-side stream level flow control */
> + u64 last_max_bytes; /* Maximum send offset advertised by peer at last update */
> + u64 max_bytes; /* Current maximum offset we are allowed to send to */
> + u64 bytes; /* Bytes already sent to peer */
> +
> + u32 errcode; /* Application error code to send in RESET_STREAM */
> + u32 frags; /* Number of sent STREAM frames not yet acknowledged */
> + u8 state; /* Send stream state, per rfc9000#section-3.1 */
> +
> + u8 data_blocked:1; /* True if flow control blocks sending more data */
> + u8 done:1; /* True if application indicated end of stream (FIN sent) */
Minor nit: AFAICS with the current struct layout the bitfield above does
not save any space, compared to plain u8 and will lead to worse code.
> + } send;
> + struct {
> + /* Receiving-side stream level flow control */
> + u64 max_bytes; /* Maximum offset peer is allowed to send to */
> + u64 window; /* Remaining receive window before advertise a new limit */
> + u64 bytes; /* Bytes consumed by application from the stream */
> +
> + u64 highest; /* Highest received offset */
> + u64 offset; /* Offset up to which data is in buffer or consumed */
> + u64 finalsz; /* Final size of the stream if FIN received */
> +
> + u32 frags; /* Number of received STREAM frames pending reassembly */
> + u8 state; /* Receive stream state, per rfc9000#section-3.2 */
> +
> + u8 stop_sent:1; /* True if STOP_SENDING has been sent */
> + u8 done:1; /* True if FIN received and final size validated */
... same here...
> + } recv;
> +};
> +
> +struct quic_stream_limits {
> + /* Stream limit parameters defined in rfc9000#section-18.2 */
> + u64 max_stream_data_bidi_remote; /* initial_max_stream_data_bidi_remote */
> + u64 max_stream_data_bidi_local; /* initial_max_stream_data_bidi_local */
> + u64 max_stream_data_uni; /* initial_max_stream_data_uni */
> + u64 max_streams_bidi; /* initial_max_streams_bidi */
> + u64 max_streams_uni; /* initial_max_streams_uni */
> +
> + s64 next_bidi_stream_id; /* Next bidi stream ID to open or accept */
> + s64 next_uni_stream_id; /* Next uni stream ID to open or accept */
> + s64 max_bidi_stream_id; /* Highest allowed bidi stream ID */
> + s64 max_uni_stream_id; /* Highest allowed uni stream ID */
> + s64 active_stream_id; /* Most recently opened stream ID */
> +
> + u8 bidi_blocked:1; /* STREAMS_BLOCKED_BIDI sent, awaiting ACK */
> + u8 uni_blocked:1; /* STREAMS_BLOCKED_UNI sent, awaiting ACK */
> + u8 bidi_pending:1; /* MAX_STREAMS_BIDI needs to be sent */
> + u8 uni_pending:1; /* MAX_STREAMS_UNI needs to be sent */
... and here.
Other than that LGTM. With the bitfield replaced with plain u8 feel free
to add my
Acked-by: Paolo Abeni <pabeni@redhat.com>
next prev parent reply other threads:[~2026-01-20 12:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 15:11 [PATCH net-next v7 00/16] net: introduce QUIC infrastructure and core subcomponents Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 01/16] net: define IPPROTO_QUIC and SOL_QUIC constants Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 02/16] net: build socket infrastructure for QUIC protocol Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 03/16] quic: provide common utilities and data structures Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 04/16] quic: provide family ops for address and protocol Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 05/16] quic: provide quic.h header files for kernel and userspace Xin Long
2026-01-20 12:23 ` Paolo Abeni
2026-01-15 15:11 ` [PATCH net-next v7 06/16] quic: add stream management Xin Long
2026-01-20 12:31 ` Paolo Abeni [this message]
2026-01-20 14:58 ` Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 07/16] quic: add connection id management Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 08/16] quic: add path management Xin Long
2026-01-20 14:13 ` Paolo Abeni
2026-01-20 15:34 ` Xin Long
2026-01-20 21:06 ` Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 09/16] quic: add congestion control Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 10/16] quic: add packet number space Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 11/16] quic: add crypto key derivation and installation Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 12/16] quic: add crypto packet encryption and decryption Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 13/16] quic: add timer management Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 14/16] quic: add frame encoder and decoder base Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 15/16] quic: add packet builder base Xin Long
2026-01-20 14:31 ` Paolo Abeni
2026-01-20 16:07 ` Xin Long
2026-01-15 15:11 ` [PATCH net-next v7 16/16] quic: add packet parser base Xin Long
2026-01-16 16:20 ` Stefan Metzmacher
2026-01-16 19:55 ` Xin Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c6d5644-3354-46ba-bbc9-e76789648abf@redhat.com \
--to=pabeni@redhat.com \
--cc=aahringo@redhat.com \
--cc=alibuda@linux.alibaba.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=chuck.lever@oracle.com \
--cc=daniel@haxx.se \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dreibh@simula.no \
--cc=edumazet@google.com \
--cc=hare@suse.de \
--cc=hepengtao@xiaomi.com \
--cc=horms@kernel.org \
--cc=illiliti@protonmail.com \
--cc=jbaron@akamai.com \
--cc=jlayton@kernel.org \
--cc=kernel-tls-handshake@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=mail@johnericson.me \
--cc=marcelo.leitner@gmail.com \
--cc=matttbe@kernel.org \
--cc=mbuhl@openbsd.org \
--cc=metze@samba.org \
--cc=netdev@vger.kernel.org \
--cc=pc@manguebit.com \
--cc=quic@lists.linux.dev \
--cc=sd@queasysnail.net \
--cc=smfrench@gmail.com \
--cc=steved@redhat.com \
--cc=tfanelli@redhat.com \
--cc=tom@talpey.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox