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 09/15] quic: add congestion control
Date: Tue, 10 Nov 2026 22:29:43 +0000 [thread overview]
Message-ID: <179434978300.994134.8100379458297117131@kernel.org> (raw)
In-Reply-To: <059c6b92785dcc2983956ff2dcd441285362aa03.1794241656.git.lucien.xin@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
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_reno_on_packet_acked() (net/quic/cong.c) grows
cong->window on every acknowledged packet, in slow start and in…
- [Low] The commit message does not describe the pacing logic this patch
adds, and it overstates what happens on transmit.
--
quic: add congestion control
This commit adds struct quic_cong for RTT measurement and congestion
control, with struct quic_cong_ops as the hook interface for
congestion control algorithms. Only New Reno is implemented. The
patch also adds pacing rate and pacing time helpers.
> The implementation updates RTT estimates when packets are acknowledged,
> reacts to loss and ECN signals, and adjusts the congestion window
> accordingly during packet transmission or acknowledgment processing.
[Severity: Low]
Is this accurate for the transmit side? quic_cong_on_packet_sent() never
changes cong->window. New Reno leaves ops->on_packet_sent as NULL, so the
transmit path only calls quic_cong_update_pacing_time().
The commit body also leaves out the pacing logic this patch adds:
- quic_cong_pace_update() sets pacing_rate = 2 * window / smoothed_rtt,
capped at max_rate.
- quic_cong_update_pacing_time() schedules the next send in nanoseconds
using ktime_get_ns(), with a jitter credit of up to len_ns / 2.
The other timestamps in struct quic_cong are in microseconds.
The function list also leaves out quic_cong_pace_update(),
quic_cong_set_srtt() and quic_cong_set_algo(). Pacing is only mentioned
in the v5/v16 changelog notes, and those are dropped when the patch is
applied.
Could the commit message describe the pacing behavior, and drop the
claim that the window is adjusted on transmit?
> diff --git a/net/quic/cong.c b/net/quic/cong.c
> new file mode 100644
> index 0000000000000..b829755e8ac9e
> --- /dev/null
> +++ b/net/quic/cong.c
> @@ -0,0 +1,292 @@
[ ... ]
> +static void quic_reno_on_packet_acked(struct quic_cong *cong, u64 time,
> + u32 bytes, s64 number)
> +{
> + u64 new_window;
> +
> + if (quic_cong_in_slow_start(cong)) { /* Slow start */
> + new_window = (u64)cong->window + bytes;
> + cong->window = min_t(u64, new_window, cong->max_window);
> + return;
> + }
> + /* Congestion avoidance - cong->window is never zero; it is initialized
> + * by quic_packet_route() during connect/accept.
> + */
> + new_window = div64_ul((u64)cong->mss * bytes, cong->window) +
> + cong->window;
> + cong->window = min_t(u64, new_window, cong->max_window);
> +}
[ ... ]
> +void quic_cong_on_packet_acked(struct quic_cong *cong, u64 time, u32 bytes,
> + s64 number)
> +{
> + if (quic_cong_in_recovery(cong, time))
> + return;
> + cong->ops->on_packet_acked(cong, time, bytes, number);
> +}
[Severity: Medium]
Can cong->window keep growing while the sender is application-limited
or flow-control-limited?
RFC 9002 section 7.8 says the window should not grow when it is
underused. The OnPacketAcked() pseudocode in Appendix B.5 has:
if (IsAppOrFlowControlLimited())
return
quic_cong_on_packet_acked() only checks quic_cong_in_recovery() before
it calls ops->on_packet_acked(). struct quic_cong has no bytes-in-flight
field, and the hooks never receive one, so neither the wrapper nor
quic_reno_on_packet_acked() can apply this check.
In slow start the window grows by bytes on every ACK. A long-lived
connection that sends small request/response traffic could push
cong->window up by roughly the total bytes ever acked, toward
max_window (S32_MAX / 4, about 512MB).
quic_cong_pace_update() then computes the pacing rate from that window:
rate = div64_ul((u64)cong->window * USEC_PER_SEC * 2,
cong->smoothed_rtt);
When bulk data arrives, would the burst then be limited only by the
caller's max_rate?
Nothing in this series calls quic_cong_on_packet_acked() yet, so a later
caller could skip the call when app-limited. If that is the plan, could
the requirement be documented here? For comparison, TCP does this check
inside the algorithm: tcp_reno_cong_avoid() checks
tcp_is_cwnd_limited().
--
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
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 [this message]
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=179434978300.994134.8100379458297117131@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