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@kernel.org,
pabeni@redhat.com, horms@kernel.org, metze@samba.org,
mbuhl@openbsd.org, tfanelli@redhat.com, hepengtao@xiaomi.com,
dreibh@simula.no, jamie.bainbridge@gmail.com,
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 v19 09/15] quic: add congestion control
Date: Tue, 24 Nov 2026 01:21:18 +0000 [thread overview]
Message-ID: <179548327865.3135.16261562840994895440@kernel.org> (raw)
In-Reply-To: <b69a2cad6c2faeab9ee1e90ad11c4b64168c8235.1795393691.git.lucien.xin@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
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_cong_rtt_update() in net/quic/cong.c begins with `if
(ack_delay > cong->max_ack_delay * 2) return;`.
--
quic: add congestion control
This patch adds struct quic_cong for RTT measurement and congestion
control, along with struct quic_cong_ops for congestion control
algorithms. It implements a slow start, congestion avoidance and
recovery state machine, and currently provides New Reno only.
> diff --git a/net/quic/cong.c b/net/quic/cong.c
> new file mode 100644
> index 0000000000000..99fe8045d0170
> --- /dev/null
> +++ b/net/quic/cong.c
[ ... ]
> +/* rfc9002#section-5: Estimating the Round-Trip Time */
> +void quic_cong_rtt_update(struct quic_cong *cong, u64 time, u32 ack_delay)
> +{
> + u32 adjusted_rtt, rttvar_sample;
> + u64 raw_rtt;
> +
> + /* Ignore RTT sample if ACK delay is suspiciously large. */
> + if (ack_delay > cong->max_ack_delay * 2)
> + return;
[Severity: Medium]
Should this early return be here? When it fires, quic_cong_rtt_update()
skips every update. latest_rtt, min_rtt/min_rtt_valid, smoothed_rtt,
rttvar and first_rtt_time stay as they are, and quic_cong_pto_update()
is never called.
RFC 9002 section 5.1 generates an RTT sample whenever the largest
acknowledged packet is newly acked and at least one newly acked packet
was ack-eliciting. It has no rule for rejecting a sample because of its
ack_delay.
RFC 9002 section 5.3 also says the endpoint SHOULD ignore the peer's
max_ack_delay until the handshake is confirmed. During the handshake,
peers can legitimately report delays larger than max_ack_delay (RFC 9000
sections 13.2.1 and 13.2.5). One example is a peer that buffers
undecryptable packets until keys arrive.
The changelog says callers will cap ack_delay to max_ack_delay after
handshake confirmation. If so, this check can only fire before
confirmation, which is the phase where the RFC says to ignore
max_ack_delay.
With the default from quic_cong_init():
cong->max_ack_delay = QUIC_DEF_ACK_DELAY;
any handshake-phase sample with ack_delay above 50ms would be dropped. A
peer that advertises max_ack_delay of 0, which is a legal value, would
cause every pre-confirmation sample with a non-zero ack_delay to be
dropped.
In that case smoothed_rtt and rttvar would stay at the QUIC_RTT_INIT
values set by quic_cong_set_srtt(), so pto and loss_delay would not match
the real path. first_rtt_time would also stay 0. That keeps
quic_cong_on_packet_lost() from ever setting pc_start_time.
The RFC already handles a large ack_delay safely further down in this
function:
> + adjusted_rtt = cong->latest_rtt;
> + if (cong->latest_rtt >= cong->min_rtt + ack_delay)
> + adjusted_rtt = cong->latest_rtt - ack_delay;
Is the drop-the-sample heuristic needed on top of this?
The commit message describes quic_cong_rtt_update() as "Performs RTT
measurement" and does not mention this deviation from RFC 9002.
This patch has no caller of quic_cong_rtt_update(), so whether this
triggers depends on the ACK processing code in the later patchset.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1795393690.git.lucien.xin%40gmail.com
next prev parent reply other threads:[~2026-11-24 1:21 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 0:27 [PATCH net-next v19 00/15] net: introduce QUIC infrastructure and core subcomponents Xin Long
2026-11-23 0:27 ` [PATCH net-next v19 01/15] net: define IPPROTO_QUIC and SOL_QUIC constants Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:27 ` [PATCH net-next v19 02/15] net: build socket infrastructure for QUIC protocol Xin Long
2026-11-23 0:27 ` [PATCH net-next v19 03/15] quic: provide common utilities and data structures Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 04/15] quic: provide family ops for address and protocol Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 05/15] quic: provide quic.h header files for kernel and userspace Xin Long
2026-11-23 0:28 ` [PATCH net-next v19 06/15] quic: add stream management Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 07/15] quic: add connection id management Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 08/15] quic: add path management Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 09/15] quic: add congestion control Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko [this message]
2026-11-23 0:28 ` [PATCH net-next v19 10/15] quic: add packet number space Xin Long
2026-11-23 0:28 ` [PATCH net-next v19 11/15] quic: add crypto key derivation and installation Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 12/15] quic: add crypto packet encryption and decryption Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
2026-11-23 0:28 ` [PATCH net-next v19 13/15] quic: add timer management Xin Long
2026-11-23 0:28 ` [PATCH net-next v19 14/15] quic: add packet builder base Xin Long
2026-11-23 0:28 ` [PATCH net-next v19 15/15] quic: add packet parser base Xin Long
2026-11-24 1:21 ` netdev-bot+sashiko
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=179548327865.3135.16261562840994895440@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@kernel.org \
--cc=hare@suse.de \
--cc=hepengtao@xiaomi.com \
--cc=horms@kernel.org \
--cc=illiliti@protonmail.com \
--cc=jamie.bainbridge@gmail.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