From: netdev-bot+sashiko@kernel.org
To: kuniyu@google.com
Cc: edumazet@kernel.org, ncardwell@google.com, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
kuni1840@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v1 net-next 3/8] tcp: Stop collapsing if not bloated.
Date: Sun, 15 Nov 2026 04:10:51 +0000 [thread overview]
Message-ID: <179471585136.2199510.5242413969655893867@kernel.org> (raw)
In-Reply-To: <20261114040101.1043546-4-kuniyu@google.com>
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 header comment on tcp_collapse() in net/ipv4/tcp_input.c
(line 5841-5842) was edited by this patch to read "Collapse contiguous…
--
tcp: Stop collapsing if not bloated.
This commit changes tcp_collapse() so it only collapses ranges of bloated
skbs. It no longer starts collapsing because the next skb overlaps, and it
no longer runs on until the tail. The end parameter is dropped. A local
sub_end is computed for each bloated range, and the function restarts the
search after each range.
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index e07f433474093..5bd42a74c6f58 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -5839,7 +5839,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
> }
>
> /* Collapse contiguous sequence of skbs head..tail with
> - * sequence numbers start..end.
> + * sequence numbers start..sub_end.
[Severity: Low]
This isn't a bug, but should this header comment for tcp_collapse() be
reworded rather than just renamed?
sub_end is a local variable, not a parameter. The second loop recomputes
it for each bloated sub-range, and it changes after every goto restart.
Someone reading the function's contract won't know what sub_end refers to.
The comment also still says head..tail is collapsed as one contiguous run.
With this patch, non-bloated skbs are skipped, each sub-range stops at the
first non-bloated, non-overlapping skb, and only the bloated sub-ranges
inside head..tail are collapsed.
The comment above the caller, tcp_collapse_ofo_queue(), has the same
mismatch:
/* Collapse ofo queue. Algorithm: select contiguous sequence of skbs
* and tcp_collapse() them until all the queue is collapsed.
*/
The last patch in the series still leaves the header comment as
start..sub_end.
> *
> * If tail is NULL, this means until the end of the queue.
> *
> @@ -5848,15 +5848,18 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
> */
> static void
> tcp_collapse(struct sock *sk, struct sk_buff_head *list, struct rb_root *root,
> - struct sk_buff *head, struct sk_buff *tail, u32 start, u32 end)
> + struct sk_buff *head, struct sk_buff *tail, u32 start)
> {
> struct sk_buff *skb = head, *n;
> struct sk_buff_head tmp;
> u8 scaling_ratio;
> + u32 sub_end;
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261114040101.1043546-1-kuniyu%40google.com
next prev parent reply other threads:[~2026-11-15 4:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 4:00 [PATCH v1 net-next 0/8] tcp: Prevent tcp_collapse() from bloating queue Kuniyuki Iwashima
2026-11-14 4:00 ` [PATCH v1 net-next 1/8] tcp: Clean up the first loop in tcp_collapse() Kuniyuki Iwashima
2026-11-14 15:32 ` Eric Dumazet
2026-11-14 16:07 ` Kuniyuki Iwashima
2026-11-15 4:10 ` netdev-bot+sashiko
2026-11-14 4:00 ` [PATCH v1 net-next 2/8] tcp: Don't collapse high density skb Kuniyuki Iwashima
2026-11-14 15:33 ` Eric Dumazet
2026-11-14 4:00 ` [PATCH v1 net-next 3/8] tcp: Stop collapsing if not bloated Kuniyuki Iwashima
2026-11-14 15:35 ` Eric Dumazet
2026-11-15 4:10 ` netdev-bot+sashiko [this message]
2026-11-14 4:00 ` [PATCH v1 net-next 4/8] net: Move SKB_SMALL_HEAD_CACHE_SIZE to skbuff.h Kuniyuki Iwashima
2026-11-14 4:00 ` [PATCH v1 net-next 5/8] tcp: Skip collapsing if collapsed skb is less-dense Kuniyuki Iwashima
2026-11-14 15:36 ` Eric Dumazet
2026-11-14 16:18 ` Kuniyuki Iwashima
2026-11-14 4:00 ` [PATCH v1 net-next 6/8] tcp: Allocate all new skb before collapsing Kuniyuki Iwashima
2026-11-14 15:37 ` Eric Dumazet
2026-11-15 4:10 ` netdev-bot+sashiko
2026-11-14 4:00 ` [PATCH v1 net-next 7/8] tcp: Batch memory accounting in tcp_collapse() Kuniyuki Iwashima
2026-11-14 15:38 ` Eric Dumazet
2026-11-14 4:00 ` [PATCH v1 net-next 8/8] selftest: packetdrill: Add test for tcp_collapse() Kuniyuki Iwashima
2026-11-14 15:39 ` Eric Dumazet
2026-11-14 16:20 ` Kuniyuki Iwashima
2026-11-15 4:10 ` netdev-bot+sashiko
2026-11-14 15:31 ` [PATCH v1 net-next 0/8] tcp: Prevent tcp_collapse() from bloating queue Eric Dumazet
2026-11-14 16:06 ` Kuniyuki Iwashima
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=179471585136.2199510.5242413969655893867@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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