[PATCH net-next v3 0/7] mptcp: out-of-order queue pruning

Matthieu Baerts (NGI0) posted 7 patches 1 week, 1 day ago
Failed in applying to current master (apply log)
net/mptcp/mib.c      |   3 +
net/mptcp/mib.h      |   3 +
net/mptcp/options.c  |  32 +++++-
net/mptcp/pm.c       |  41 +++++---
net/mptcp/protocol.c | 290 ++++++++++++++++++++++++++++++++++++---------------
net/mptcp/protocol.h |  11 +-
6 files changed, 273 insertions(+), 107 deletions(-)
[PATCH net-next v3 0/7] mptcp: out-of-order queue pruning
Posted by Matthieu Baerts (NGI0) 1 week, 1 day ago
Under memory pressure, a pruning of the MPTCP-level OoO queue might be
required as last resort, to avoid too long recoveries, or even stalls.
Geliang and Gang managed to reproduce this behaviour, and Paolo
improved the situation thanks to the following patches:

- Patches 1-3: improve the MPTCP-level retransmission schema to make
  recoveries from memory pressure/after MPTCP-level drop significantly
  faster.

- Patches 4-5: make the admission check way stricter for incoming
  packets exceeding the memory limits, with some exceptions for fallback
  sockets.

- Patches 6-7: implement OoO queue pruning for MPTCP.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v3:
- Address comments from Clashiko.
- Patches 2, 6: new
- Patch 3: many cleanups, needed after patch 2.
- Patch 4: check backlog and rcvbuf separately + do not drop rst
- Patch 7: prune only for new data + reorganize code to follow TCP
- Link to v2: https://patch.msgid.link/20260731-net-next-mptcp-oooq-pruning-v2-0-24838164fa21@kernel.org

Changes in v2:
- Address comments from Clashiko.
- Patch 3: typo, comment, bump TCP MIB counter.
- Patch 5: uniform MIB counter name.
- Rebased.
- Link to v1: https://patch.msgid.link/20260724-net-next-mptcp-oooq-pruning-v1-0-5dd4dec63a54@kernel.org

---
Paolo Abeni (7):
      mptcp: move the retrans loop to a separate helper
      mptcp: move the stale logic out of retrans scheduler
      mptcp: let the retrans scheduler do its job
      mptcp: explicitly drop over memory limits
      mptcp: enforce hard limit on backlog flushing
      mptcp: avoid code duplication in __mptcp_move_skb()
      mptcp: implemented OoO queue pruning

 net/mptcp/mib.c      |   3 +
 net/mptcp/mib.h      |   3 +
 net/mptcp/options.c  |  32 +++++-
 net/mptcp/pm.c       |  41 +++++---
 net/mptcp/protocol.c | 290 ++++++++++++++++++++++++++++++++++++---------------
 net/mptcp/protocol.h |  11 +-
 6 files changed, 273 insertions(+), 107 deletions(-)
---
base-commit: 4fa4977a0d900f936bcae5cd2c510be5554e8dd6
change-id: 20260724-net-next-mptcp-oooq-pruning-48566d10dbd0

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH net-next v3 0/7] mptcp: out-of-order queue pruning
Posted by Paolo Abeni 5 days, 9 hours ago
On 8/7/26 3:49 PM, Matthieu Baerts (NGI0) wrote:
> Under memory pressure, a pruning of the MPTCP-level OoO queue might be
> required as last resort, to avoid too long recoveries, or even stalls.
> Geliang and Gang managed to reproduce this behaviour, and Paolo
> improved the situation thanks to the following patches:
> 
> - Patches 1-3: improve the MPTCP-level retransmission schema to make
>   recoveries from memory pressure/after MPTCP-level drop significantly
>   faster.
> 
> - Patches 4-5: make the admission check way stricter for incoming
>   packets exceeding the memory limits, with some exceptions for fallback
>   sockets.
> 
> - Patches 6-7: implement OoO queue pruning for MPTCP.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Sashiko has a few comments on this series, but IMHO only patches 2 and 7
really need some adjustment, and changes there (fix the stale/retrans
race, wrong unlikely, and too early OoO prune) should be handled as
follow-ups.

/P
Re: [PATCH net-next v3 0/7] mptcp: out-of-order queue pruning
Posted by Matthieu Baerts 5 days, 8 hours ago
Hi Paolo,

On 10/08/2026 11:53, Paolo Abeni wrote:
> On 8/7/26 3:49 PM, Matthieu Baerts (NGI0) wrote:
>> Under memory pressure, a pruning of the MPTCP-level OoO queue might be
>> required as last resort, to avoid too long recoveries, or even stalls.
>> Geliang and Gang managed to reproduce this behaviour, and Paolo
>> improved the situation thanks to the following patches:
>>
>> - Patches 1-3: improve the MPTCP-level retransmission schema to make
>>   recoveries from memory pressure/after MPTCP-level drop significantly
>>   faster.
>>
>> - Patches 4-5: make the admission check way stricter for incoming
>>   packets exceeding the memory limits, with some exceptions for fallback
>>   sockets.
>>
>> - Patches 6-7: implement OoO queue pruning for MPTCP.
>>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Sashiko has a few comments on this series, but IMHO only patches 2 and 7
> really need some adjustment, and changes there (fix the stale/retrans
> race, wrong unlikely, and too early OoO prune) should be handled as
> follow-ups.

Thank you for having checked. I agree with you, follow-ups seems better
for fix these "details".

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH net-next v3 0/7] mptcp: out-of-order queue pruning
Posted by patchwork-bot+netdevbpf@kernel.org 3 days, 18 hours ago
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 07 Aug 2026 15:49:00 +0200 you wrote:
> Under memory pressure, a pruning of the MPTCP-level OoO queue might be
> required as last resort, to avoid too long recoveries, or even stalls.
> Geliang and Gang managed to reproduce this behaviour, and Paolo
> improved the situation thanks to the following patches:
> 
> - Patches 1-3: improve the MPTCP-level retransmission schema to make
>   recoveries from memory pressure/after MPTCP-level drop significantly
>   faster.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/7] mptcp: move the retrans loop to a separate helper
    https://git.kernel.org/netdev/net-next/c/789e6a844b51
  - [net-next,v3,2/7] mptcp: move the stale logic out of retrans scheduler
    https://git.kernel.org/netdev/net-next/c/6cafe51e0f98
  - [net-next,v3,3/7] mptcp: let the retrans scheduler do its job
    https://git.kernel.org/netdev/net-next/c/96d846e3e2a7
  - [net-next,v3,4/7] mptcp: explicitly drop over memory limits
    https://git.kernel.org/netdev/net-next/c/e0e4d56b0505
  - [net-next,v3,5/7] mptcp: enforce hard limit on backlog flushing
    https://git.kernel.org/netdev/net-next/c/b1224c4b40f6
  - [net-next,v3,6/7] mptcp: avoid code duplication in __mptcp_move_skb()
    https://git.kernel.org/netdev/net-next/c/996643574cc8
  - [net-next,v3,7/7] mptcp: implemented OoO queue pruning
    https://git.kernel.org/netdev/net-next/c/e468d371180d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html