* [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning"
@ 2026-07-31 10:18 Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 1/2] Squash to "mptcp: explicitly drop over memory limits" Matthieu Baerts (NGI0)
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-07-31 10:18 UTC (permalink / raw)
To: MPTCP Linux; +Cc: Matthieu Baerts (NGI0)
Addressing comments reported by Clashiko [1], but not detected before
with the AI review tools using a different model version.
Note: the last comment from the 3rd patch has not been addressed, as it
is not clear to me whether this comment is valid:
---------------------------------- 8< ----------------------------------
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 72b1fa3ca71c..5f7d8340a3d9 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
[ ... ]
> @@ -682,6 +693,16 @@ static void __mptcp_add_backlog(struct sock *sk,
> return;
> }
>
> + /* Similar additional allowance as plain TCP. */
> + limit = READ_ONCE(sk->sk_rcvbuf);
> + limit += (limit >> 1) + 64 * 1024;
> + limit = min_t(u64, limit, UINT_MAX);
> + if (msk->backlog_len > limit && !__mptcp_check_fallback(msk)) {
> + __MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_BACKLOGDROP);
> + kfree_skb_reason(skb, SKB_DROP_REASON_SOCKET_BACKLOG);
> + return;
> + }
> +
[Low]
The check compares the current backlog_len against limit before the
incoming skb's truesize is added (the truesize is folded in at the
account: label further down). Was that intentional?
TCP's sk_add_backlog() analog compares queue_size + skb->truesize
against the limit, so a single skb can push msk->backlog_len past
limit here and the drop only fires on the next admission. The overshoot
is bounded by one skb's truesize and the commit message already notes
"This is not a complete fix for the stall issue, as the drop strategy
needs refinements that will come in the next patches.", so perhaps this
is one of the follow-up items?
---------------------------------- 8< ----------------------------------
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260724-net-next-mptcp-oooq-pruning-v1-0-5dd4dec63a54%40kernel.org
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v2:
- patch 1: s/MPTCP_INC_STATS/NET_INC_STATS/
- Link to v1: https://patch.msgid.link/20260731-mptcp-squash-ooo-pruning-v1-0-a5f5115e1e24@kernel.org
---
Matthieu Baerts (NGI0) (2):
Squash to "mptcp: explicitly drop over memory limits"
Squash to "mptcp: implemented OoO queue pruning"
net/mptcp/mib.c | 2 +-
net/mptcp/mib.h | 4 ++--
net/mptcp/options.c | 6 +++++-
net/mptcp/protocol.c | 2 +-
4 files changed, 9 insertions(+), 5 deletions(-)
---
base-commit: 23c7cb4262d954b810468b0e661d48af82b418d5
change-id: 20260730-mptcp-squash-ooo-pruning-53d668d4c2aa
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH mptcp-next v2 1/2] Squash to "mptcp: explicitly drop over memory limits"
2026-07-31 10:18 [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning" Matthieu Baerts (NGI0)
@ 2026-07-31 10:18 ` Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 2/2] Squash to "mptcp: implemented OoO queue pruning" Matthieu Baerts (NGI0)
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-07-31 10:18 UTC (permalink / raw)
To: MPTCP Linux; +Cc: Matthieu Baerts (NGI0)
Address comments from Clashiko [1]:
- mib: typo: "constrains" -> "constraints".
- mptcp_over_limit: precise it is not only 0-win, but retrans, dup or
old acks.
- mptcp_over_limit: bump LINUX_MIB_TCPRCVQDROP, as previously discussed
in [2].
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260724-net-next-mptcp-oooq-pruning-v1-0-5dd4dec63a54%40kernel.org?part=3 [1]
Link: https://lore.kernel.org/b5244dd4-205d-4abd-8ea5-fd879a97038f@redhat.com
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/mib.h | 2 +-
net/mptcp/options.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
index 18f35f7e0a2d..25f360724c57 100644
--- a/net/mptcp/mib.h
+++ b/net/mptcp/mib.h
@@ -89,7 +89,7 @@ enum linux_mptcp_mib_field {
MPTCP_MIB_FALLBACKFAILED, /* Can't fallback due to msk status */
MPTCP_MIB_WINPROBE, /* MPTCP-level zero window probe */
MPTCP_MIB_BACKLOGDROP, /* Backlog over memory limit */
- MPTCP_MIB_RCVPRUNED, /* Dropped due to memory constrains */
+ MPTCP_MIB_RCVPRUNED, /* Dropped due to memory constraints */
MPTCP_MIB_OFO_PRUNED, /* MPTCP-level OoO queue pruned */
__MPTCP_MIB_MAX
};
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index d6b009319839..7c0bce3780c5 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1193,7 +1193,7 @@ static bool mptcp_over_limit(struct sock *sk, struct sock *ssk,
if (likely(mem <= READ_ONCE(sk->sk_rcvbuf)))
return false;
- /* Avoid silently dropping pure acks, fin or zero win probes. */
+ /* Avoid silently dropping pure acks, fin or already-acked segments. */
if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq ||
TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN ||
!after(TCP_SKB_CB(skb)->end_seq, tcp_sk(ssk)->rcv_nxt))
@@ -1202,6 +1202,10 @@ static bool mptcp_over_limit(struct sock *sk, struct sock *ssk,
/* Dropped due to memory constraints, schedule an ack. */
inet_csk(ssk)->icsk_ack.pending |= ICSK_ACK_NOMEM | ICSK_ACK_NOW;
inet_csk_schedule_ack(ssk);
+
+ /* In fallback mode: skb is dropped before the TCP recv queue. */
+ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPRCVQDROP);
+
return true;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH mptcp-next v2 2/2] Squash to "mptcp: implemented OoO queue pruning"
2026-07-31 10:18 [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning" Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 1/2] Squash to "mptcp: explicitly drop over memory limits" Matthieu Baerts (NGI0)
@ 2026-07-31 10:18 ` Matthieu Baerts (NGI0)
2026-07-31 11:25 ` [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order " MPTCP CI
2026-07-31 12:22 ` Geliang Tang
3 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-07-31 10:18 UTC (permalink / raw)
To: MPTCP Linux; +Cc: Matthieu Baerts (NGI0)
Uniform the new counter with the other OFO ones.
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260724-net-next-mptcp-oooq-pruning-v1-0-5dd4dec63a54%40kernel.org?part=5
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/mib.c | 2 +-
net/mptcp/mib.h | 2 +-
net/mptcp/protocol.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
index d9bd4f4afcc0..2569385bab7c 100644
--- a/net/mptcp/mib.c
+++ b/net/mptcp/mib.c
@@ -87,7 +87,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
SNMP_MIB_ITEM("WinProbe", MPTCP_MIB_WINPROBE),
SNMP_MIB_ITEM("BacklogDrop", MPTCP_MIB_BACKLOGDROP),
SNMP_MIB_ITEM("RcvPruned", MPTCP_MIB_RCVPRUNED),
- SNMP_MIB_ITEM("OfoPruned", MPTCP_MIB_OFO_PRUNED),
+ SNMP_MIB_ITEM("OFOPruned", MPTCP_MIB_OFOPRUNED),
};
/* mptcp_mib_alloc - allocate percpu mib counters
diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
index 25f360724c57..3a3425e258a7 100644
--- a/net/mptcp/mib.h
+++ b/net/mptcp/mib.h
@@ -90,7 +90,7 @@ enum linux_mptcp_mib_field {
MPTCP_MIB_WINPROBE, /* MPTCP-level zero window probe */
MPTCP_MIB_BACKLOGDROP, /* Backlog over memory limit */
MPTCP_MIB_RCVPRUNED, /* Dropped due to memory constraints */
- MPTCP_MIB_OFO_PRUNED, /* MPTCP-level OoO queue pruned */
+ MPTCP_MIB_OFOPRUNED, /* MPTCP-level OoO queue pruned */
__MPTCP_MIB_MAX
};
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 90dc894cb976..f387f24904da 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -416,7 +416,7 @@ static bool mptcp_prune_ofo_queue(struct sock *sk, u64 seq)
} while (node);
if (pruned)
- MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_OFO_PRUNED);
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_OFOPRUNED);
out:
mem = (unsigned int)sk_rmem_alloc_get(sk);
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning"
2026-07-31 10:18 [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning" Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 1/2] Squash to "mptcp: explicitly drop over memory limits" Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 2/2] Squash to "mptcp: implemented OoO queue pruning" Matthieu Baerts (NGI0)
@ 2026-07-31 11:25 ` MPTCP CI
2026-07-31 12:22 ` Geliang Tang
3 siblings, 0 replies; 6+ messages in thread
From: MPTCP CI @ 2026-07-31 11:25 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/30624237503
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/94cf0d3c0576
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1138063
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normal
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning"
2026-07-31 10:18 [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning" Matthieu Baerts (NGI0)
` (2 preceding siblings ...)
2026-07-31 11:25 ` [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order " MPTCP CI
@ 2026-07-31 12:22 ` Geliang Tang
2026-07-31 14:07 ` Matthieu Baerts
3 siblings, 1 reply; 6+ messages in thread
From: Geliang Tang @ 2026-07-31 12:22 UTC (permalink / raw)
To: Matthieu Baerts (NGI0), MPTCP Linux
Hi Matt,
On Fri, 2026-07-31 at 12:18 +0200, Matthieu Baerts (NGI0) wrote:
> Addressing comments reported by Clashiko [1], but not detected before
> with the AI review tools using a different model version.
>
> Note: the last comment from the 3rd patch has not been addressed, as
> it
> is not clear to me whether this comment is valid:
>
> ---------------------------------- 8< -------------------------------
> ---
>
> > diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> > index 72b1fa3ca71c..5f7d8340a3d9 100644
> > --- a/net/mptcp/protocol.c
> > +++ b/net/mptcp/protocol.c
>
> [ ... ]
>
> > @@ -682,6 +693,16 @@ static void __mptcp_add_backlog(struct sock
> > *sk,
> > return;
> > }
> >
> > + /* Similar additional allowance as plain TCP. */
> > + limit = READ_ONCE(sk->sk_rcvbuf);
> > + limit += (limit >> 1) + 64 * 1024;
> > + limit = min_t(u64, limit, UINT_MAX);
> > + if (msk->backlog_len > limit &&
> > !__mptcp_check_fallback(msk)) {
> > + __MPTCP_INC_STATS(sock_net(sk),
> > MPTCP_MIB_BACKLOGDROP);
> > + kfree_skb_reason(skb,
> > SKB_DROP_REASON_SOCKET_BACKLOG);
> > + return;
> > + }
> > +
>
> [Low]
> The check compares the current backlog_len against limit before the
> incoming skb's truesize is added (the truesize is folded in at the
> account: label further down). Was that intentional?
> TCP's sk_add_backlog() analog compares queue_size + skb->truesize
> against the limit, so a single skb can push msk->backlog_len past
> limit here and the drop only fires on the next admission. The
> overshoot
> is bounded by one skb's truesize and the commit message already notes
> "This is not a complete fix for the stall issue, as the drop strategy
> needs refinements that will come in the next patches.", so perhaps
> this
> is one of the follow-up items?
>
> ---------------------------------- 8< -------------------------------
> ---
>
> Link:
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260724-net-next-mptcp-oooq-pruning-v1-0-5dd4dec63a54%40kernel.org
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
v2 looks good to me!
Reviewed-by: Geliang Tang <geliang@kernel.org>
Thanks,
-Geliang
> ---
> Changes in v2:
> - patch 1: s/MPTCP_INC_STATS/NET_INC_STATS/
> - Link to v1:
> https://patch.msgid.link/20260731-mptcp-squash-ooo-pruning-v1-0-a5f5115e1e24@kernel.org
>
> ---
> Matthieu Baerts (NGI0) (2):
> Squash to "mptcp: explicitly drop over memory limits"
> Squash to "mptcp: implemented OoO queue pruning"
>
> net/mptcp/mib.c | 2 +-
> net/mptcp/mib.h | 4 ++--
> net/mptcp/options.c | 6 +++++-
> net/mptcp/protocol.c | 2 +-
> 4 files changed, 9 insertions(+), 5 deletions(-)
> ---
> base-commit: 23c7cb4262d954b810468b0e661d48af82b418d5
> change-id: 20260730-mptcp-squash-ooo-pruning-53d668d4c2aa
>
> Best regards,
> --
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning"
2026-07-31 12:22 ` Geliang Tang
@ 2026-07-31 14:07 ` Matthieu Baerts
0 siblings, 0 replies; 6+ messages in thread
From: Matthieu Baerts @ 2026-07-31 14:07 UTC (permalink / raw)
To: Geliang Tang, MPTCP Linux
Hi Geliang,
On 31/07/2026 14:22, Geliang Tang wrote:
> Hi Matt,
>
> On Fri, 2026-07-31 at 12:18 +0200, Matthieu Baerts (NGI0) wrote:
>> Addressing comments reported by Clashiko [1], but not detected before
>> with the AI review tools using a different model version.
(...)
> v2 looks good to me!
>
> Reviewed-by: Geliang Tang <geliang@kernel.org>
Thanks!
Now in our tree:
- 49287a4134e2: "squashed" (with conflicts) in "mptcp: explicitly drop
over memory limits"
- 286cb9242882: mptcp: more precise comment for TCPRCVQDROP
- 555d2505efd7: conflict in t/mptcp-implemented-OoO-queue-pruning
- 56f9f21024c6: "squashed" patch 2/2 in "mptcp: implemented OoO queue
pruning"
- Results: 3a875e9130e6..e5730411f842 (export)
Tests are now in progress:
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/43b421437483dba551b2a21907703aea295b02c0/checks
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-31 14:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 10:18 [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order queue pruning" Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 1/2] Squash to "mptcp: explicitly drop over memory limits" Matthieu Baerts (NGI0)
2026-07-31 10:18 ` [PATCH mptcp-next v2 2/2] Squash to "mptcp: implemented OoO queue pruning" Matthieu Baerts (NGI0)
2026-07-31 11:25 ` [PATCH mptcp-next v2 0/2] Squash to "mptcp: out-of-order " MPTCP CI
2026-07-31 12:22 ` Geliang Tang
2026-07-31 14:07 ` Matthieu Baerts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox