Netdev List
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: Eric Dumazet <edumazet@kernel.org>,
	Neal Cardwell <ncardwell@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Mat Martineau <martineau@kernel.org>,
	Simon Horman <horms@kernel.org>,
	Kuniyuki Iwashima <kuni1840@gmail.com>,
	netdev@vger.kernel.org, mptcp@lists.linux.dev
Subject: Re: [PATCH v3 net-next 3/7] tcp: Stop collapsing if not bloated.
Date: Fri, 20 Nov 2026 15:58:35 +0100	[thread overview]
Message-ID: <929c8f04-182f-49a4-8190-f21fc2aae881@kernel.org> (raw)
In-Reply-To: <20261119071649.374106-4-kuniyu@google.com>

Hi Kuniyuki,

On 19/11/2026 08:15, Kuniyuki Iwashima wrote:
> Even when a skb is not bloated, tcp_collapse() starts collapsing
> if the next skb has overlapping data.
> 
> Also, tcp_collapse() does not stop until it reaches the tail or
> unmergable skb (SYN/FIN, unreadable frags).

(...)

> On the other hand, if an overlapping skb on the OOO rbtree cannot
> be collapsed, we skip the range instead of breaking out, as
> splitting the range could insert the tail nskb after that skb and
> break the same rbtree ordering.

Thank you for having added this ...

> Another notable thing is that tcp_skb_can_collapse_rx() now checks
> candidates against the first skb before mptcp_skb_ext_move(),
> not against each nskb.
> 
> When a skb with an MPTCP ext spans multiple nskbs, collapsing
> previously stopped at the next skb with the same ext because later
> nskbs lacked the ext.
> 
>    skb1 (ext A),                  skb2 (ext A)
>   nskb1 (ext A), nskb2 (no ext)             ^
>                         ^- not collapsible -'
> 
> Now such skbs are also collapsed with the redundant ext dropped,
> while the first nskb still carries the same mapping in sequence
> order.
> 
>    skb1 (ext A),                  skb2 (ext A)
>   nskb1 (ext A), nskb2 (no ext) <-' collapsed into nskb2

... and that!

Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  parent reply	other threads:[~2026-11-20 14:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  7:15 [PATCH v3 net-next 0/7] tcp: Prevent tcp_collapse() from bloating queue Kuniyuki Iwashima
2026-11-19  7:15 ` [PATCH v3 net-next 1/7] tcp: Refactor the first loop in tcp_collapse() Kuniyuki Iwashima
2026-11-19  7:15 ` [PATCH v3 net-next 2/7] tcp: Don't collapse high density skb Kuniyuki Iwashima
2026-11-19  7:15 ` [PATCH v3 net-next 3/7] tcp: Stop collapsing if not bloated Kuniyuki Iwashima
2026-11-19  7:39   ` Eric Dumazet
2026-11-20 14:58   ` Matthieu Baerts [this message]
2026-11-19  7:15 ` [PATCH v3 net-next 4/7] tcp: Skip collapsing if collapsed skb is less-dense Kuniyuki Iwashima
2026-11-19  7:41   ` Eric Dumazet
2026-11-19  7:15 ` [PATCH v3 net-next 5/7] tcp: Allocate all new skb before collapsing Kuniyuki Iwashima
2026-11-19  7:44   ` Eric Dumazet
2026-11-19 20:02     ` Kuniyuki Iwashima
2026-11-19  7:15 ` [PATCH v3 net-next 6/7] tcp: Batch memory accounting in tcp_collapse() Kuniyuki Iwashima
2026-11-19  7:15 ` [PATCH v3 net-next 7/7] selftest: packetdrill: Add test for tcp_collapse() Kuniyuki Iwashima
2026-11-19  7:45   ` Eric Dumazet

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=929c8f04-182f-49a4-8190-f21fc2aae881@kernel.org \
    --to=matttbe@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=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --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