From: netdev-bot+sashiko@kernel.org
To: lucien.xin@gmail.com
Cc: netdev@vger.kernel.org, quic@lists.linux.dev,
davem@davemloft.net, kuba@kernel.org, edumazet@google.com,
pabeni@redhat.com, horms@kernel.org, metze@samba.org,
mbuhl@openbsd.org, tfanelli@redhat.com, hepengtao@xiaomi.com,
dreibh@simula.no, linux-cifs@vger.kernel.org, pc@manguebit.org,
linkinjeon@kernel.org, tom@talpey.com,
kernel-tls-handshake@lists.linux.dev, cel@kernel.org,
jlayton@kernel.org, steved@redhat.com, hare@suse.de,
aahringo@redhat.com, dhowells@redhat.com, matttbe@kernel.org,
mail@johnericson.me, xiyou.wangcong@gmail.com,
alibuda@linux.alibaba.com, jbaron@akamai.com,
illiliti@protonmail.com, sd@queasysnail.net,
marcelo.leitner@gmail.com, daniel@haxx.se,
andrew.gospodarek@broadcom.com, mef@scarletmail.rutgers.edu,
paul@jakma.org, kuniyu@google.com
Subject: Re: [PATCH net-next v18 07/15] quic: add connection id management
Date: Tue, 10 Nov 2026 22:29:37 +0000 [thread overview]
Message-ID: <179434977756.994134.8929104101309471837@kernel.org> (raw)
In-Reply-To: <b0f3555fe5a07cddad4b5df3fcf179c9deb1378d.1794241656.git.lucien.xin@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] quic_conn_id_retire() in net/quic/connid.c starts with `if
(WARN_ON_ONCE(id_set->use_count <= 1)) return;`.
- [Low] The commit message says quic_conn_id_token_exists() checks 'if a
stateless reset token exists in any dest Connection ID'.
- [Low] The connection ID patch also rewrites the comments on
bidi_blocked/uni_blocked in struct quic_stream_limits…
--
quic: add connection id management
This patch adds struct quic_conn_id_set to manage source and destination
connection IDs. It also adds helpers to add, retire, find and look up CIDs.
Source CIDs are inserted into the global hash table, and destination CIDs
can be checked for stateless reset tokens.
> - quic_conn_id_token_exists(): Check if a stateless reset token exists
> in any dest Connection ID (used during stateless reset processing).
[Severity: Low]
This isn't a bug, but is "any dest Connection ID" accurate here?
quic_conn_id_token_exists() stops at the furthest used CID, which is the
larger of active and alt by sequence number. It also skips all-zero tokens,
so unused destination CIDs are never compared.
That matches RFC 9000 Section 10.3 and the code comment ("in the used
connection IDs"). The only explanation of the narrower check is in the v17
changelog below the "---", and that part will not be kept in git history.
Could the commit message describe the used-CID-only check instead?
> diff --git a/net/quic/connid.c b/net/quic/connid.c
> new file mode 100644
> index 0000000000000..63bf39e71b15f
> --- /dev/null
> +++ b/net/quic/connid.c
> @@ -0,0 +1,311 @@
[ ... ]
> +/* Retire a connection ID by marking it dead, then remove consecutive dead
> + * entries from the head of the list. The caller must ensure the number fall
> + * within the consecutive range [first_number, last_number].
> + */
> +void quic_conn_id_retire(struct quic_conn_id_set *id_set, u32 number)
> +{
> + struct quic_common_conn_id *common, *tmp, *retired = NULL;
> + struct list_head *list;
> +
> + if (WARN_ON_ONCE(id_set->use_count <= 1))
> + return;
> +
> + list = &id_set->head;
> + list_for_each_entry(common, list, list) {
> + if (common->number > number)
> + break;
> + if (common->number == number) {
> + if (common->dead)
> + return;
[Severity: Medium]
Can retiring the same number twice trigger the WARN_ON_ONCE() in
quic_conn_id_retire()?
The dead check here suggests a duplicate retirement is meant to be a
harmless no-op. The use_count check runs before the lookup gets this far,
though.
Take a source set with CIDs 0 and 1 (count == 2, use_count == 2):
quic_conn_id_retire(set, 1)
entry 1 is marked dead, use_count becomes 1
entry 1 is not at the head, so it stays on the list
quic_conn_id_retire(set, 1) (e.g. a retransmitted RETIRE_CONNECTION_ID)
WARN_ON_ONCE(id_set->use_count <= 1) fires
the "if (common->dead) return;" path is never reached
The comment above the function only asks the caller to keep number within
[first_number, last_number], and 1 is inside that range here.
RETIRE_CONNECTION_ID frames, and NEW_CONNECTION_ID frames with Retire Prior
To, come from the peer. Once frame processing calls this helper, could this
become a WARN that the peer can trigger, or a panic with panic_on_warn=1?
Nothing in the series calls quic_conn_id_retire() yet, so this depends on
how future callers use it.
The function also returns void. How would a caller tell a refused
retirement from a successful one, for example to raise a
PROTOCOL_VIOLATION?
Would it make sense to run the lookup and dead check before the use_count
check, or to return an error instead of warning?
[ ... ]
> diff --git a/net/quic/stream.h b/net/quic/stream.h
> index 48b27aa339679..c96d1516ecbec 100644
> --- a/net/quic/stream.h
> +++ b/net/quic/stream.h
> @@ -84,8 +84,8 @@ struct quic_stream_limits {
> s64 max_uni_stream_id; /* Highest allowed uni stream ID */
> s64 active_stream_id; /* Most recently opened stream ID */
>
> - u8 bidi_blocked; /* STREAMS_BLOCKED_BIDI sent, awaiting ACK */
> - u8 uni_blocked; /* STREAMS_BLOCKED_UNI sent, awaiting ACK */
> + u8 bidi_blocked; /* STREAMS_BLOCKED/MAX_STREAMS_BIDI sent */
> + u8 uni_blocked; /* STREAMS_BLOCKED/MAX_STREAMS_UNI sent */
[Severity: Low]
This isn't a bug, but this comment change in struct quic_stream_limits looks
unrelated to connection ID management. The commit message doesn't mention
it either.
Nothing in net/quic reads or writes bidi_blocked or uni_blocked yet, in
this commit or at the end of the series. So the new MAX_STREAMS wording
describes behaviour that is not in the tree yet. The only explanation is
the v18 changelog note, which is dropped when the patch is applied.
Would this change fit better in a separate patch, or in the patch that adds
the MAX_STREAMS tracking?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1794241654.git.lucien.xin%40gmail.com
next prev parent reply other threads:[~2026-11-10 22:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 16:27 [PATCH net-next v18 00/15] net: introduce QUIC infrastructure and core subcomponents Xin Long
2026-11-09 16:27 ` [PATCH net-next v18 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants Xin Long
2026-11-09 16:27 ` [PATCH net-next v18 02/15] net: build socket infrastructure for QUIC protocol Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 03/15] quic: provide common utilities and data structures Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 04/15] quic: provide family ops for address and protocol Xin Long
2026-11-09 16:27 ` [PATCH net-next v18 05/15] quic: provide quic.h header files for kernel and userspace Xin Long
2026-11-09 16:27 ` [PATCH net-next v18 06/15] quic: add stream management Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 07/15] quic: add connection id management Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko [this message]
2026-11-09 16:27 ` [PATCH net-next v18 08/15] quic: add path management Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 09/15] quic: add congestion control Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 10/15] quic: add packet number space Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 11/15] quic: add crypto key derivation and installation Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 12/15] quic: add crypto packet encryption and decryption Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-09 16:27 ` [PATCH net-next v18 13/15] quic: add timer management Xin Long
2026-11-09 16:27 ` [PATCH net-next v18 14/15] quic: add packet builder base Xin Long
2026-11-09 16:27 ` [PATCH net-next v18 15/15] quic: add packet parser base Xin Long
2026-11-10 22:29 ` netdev-bot+sashiko
2026-11-10 15:41 ` [PATCH net-next v18 00/15] net: introduce QUIC infrastructure and core subcomponents Jakub Kicinski
2026-11-10 16:57 ` Xin Long
2026-11-10 17:20 ` Jakub Kicinski
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=179434977756.994134.8929104101309471837@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aahringo@redhat.com \
--cc=alibuda@linux.alibaba.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=cel@kernel.org \
--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=kuniyu@google.com \
--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=mef@scarletmail.rutgers.edu \
--cc=metze@samba.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@jakma.org \
--cc=pc@manguebit.org \
--cc=quic@lists.linux.dev \
--cc=sd@queasysnail.net \
--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