[PATCH mptcp-net v6 00/19] mptcp: pm: increase limits, and related fixes and cleanup

Matthieu Baerts (NGI0) posted 19 patches 1 week, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20260422-mptcp-inc-limits-v6-0-903181771530@kernel.org
net/mptcp/pm.c                                  | 62 +++++++++++------
net/mptcp/pm_kernel.c                           | 90 ++++++++++++++++---------
tools/testing/selftests/net/mptcp/mptcp_join.sh | 33 ++++++++-
tools/testing/selftests/net/mptcp/mptcp_lib.sh  | 16 +++--
tools/testing/selftests/net/mptcp/pm_netlink.sh | 74 ++++++++++++--------
tools/testing/selftests/net/mptcp/pm_nl_ctl.c   |  8 +--
6 files changed, 193 insertions(+), 90 deletions(-)
[PATCH mptcp-net v6 00/19] mptcp: pm: increase limits, and related fixes and cleanup
Posted by Matthieu Baerts (NGI0) 1 week, 5 days ago
The initial intension was to increase the limits, but some fixes were
needed, then when looking at the code around, other fixes had to be
added too. So now I ended up with multiple fixes (including one early
exit while at it), followed by patches increasing limits with some
adaptations required before, some to validate the modifications, and one
small improvement in the selftests.

The patches with a Fixes tag are for -net, the rest for net-next.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v6:
- patch 4: fix label name in commit message + mention next patch.
- patch 7: use min() to improve clarity (Mat)
- patch 15: fix typo.
- patch 20: removed: will be sent in another series after that one.
- Link to v5: https://patch.msgid.link/20260415-mptcp-inc-limits-v5-0-e54c3bf80e4e@kernel.org

Changes in v5:
- patch 5: only set timer_done to true in the timer handler: safer.
- patch 9: fix typo in commit message.
- patch 10: 3rd check expects error, better err msg, rename var.
- Link to v4: https://patch.msgid.link/20260414-mptcp-inc-limits-v4-0-78274edda5dd@kernel.org

Changes in v4:
- patch 5: reset timer_done when the timer is reset.
- patch 10: new: selftests: correctly catch error in 'check output'.
- patch 16: add example with init_shapers to silence AI reviews
- Patch 18: clearer way to check errors (without buggy '&&')
- Link to v3: https://patch.msgid.link/20260413-mptcp-inc-limits-v3-0-dd36c9360432@kernel.org

Changes in v3:
- patch 1: new: retransmit ADD_ADDR for ID 0 with right ID.
- patch 5: moved below + support calling sk_free().
- patch 13: new: allow flushing more than 8 endpoints.
- patch 12: clarify single batch of 8 subflows as known limit.
- patch 16: fix typo in comment.
- Link to v2: https://patch.msgid.link/20260410-mptcp-inc-limits-v2-0-5402209f05d3@kernel.org

Changes in v2:
- patch 2: new: fix potential data-race.
- re-order patches 1 to 5 and use shorter prefix (ADD_ADDR rtx).
- patch 6: restore accidentally deleted icsk->icsk_rto > max check.
- patch 16: fix already present checkpatch warning.
- Link to v1: https://patch.msgid.link/20260409-mptcp-inc-limits-v1-0-0e45fa30d914@kernel.org

---
Matthieu Baerts (NGI0) (19):
      mptcp: pm: kernel: correctly retransmit ADD_ADDR ID 0
      mptcp: pm: ADD_ADDR rtx: fix potential data-race
      mptcp: pm: ADD_ADDR rtx: allow ID 0
      mptcp: pm: ADD_ADDR rtx: always decrease sk refcount
      mptcp: pm: ADD_ADDR rtx: free sk if last
      mptcp: pm: ADD_ADDR rtx: resched blocked ADD_ADDR quicker
      mptcp: pm: ADD_ADDR rtx: skip inactive subflows
      mptcp: pm: retrans ADD_ADDR: return early if no retrans
      mptcp: pm: prio: skip closed subflows
      selftests: mptcp: check output: catch cmd errors
      selftests: mptcp: pm: restrict 'unknown' check to pm_nl_ctl
      mptcp: pm: in-kernel: explicitly limit batches to array size
      mptcp: pm: in-kernel: increase all limits to 64
      mptcp: pm: kernel: allow flushing more than 8 endpoints
      mptcp: pm: in-kernel: increase endpoints limit
      selftests: mptcp: join: allow changing ifaces nr per test
      selftests: mptcp: join: validate 8x8 subflows
      selftests: mptcp: pm: validate new limits
      selftests: mptcp: pm: use simpler send/recv forms

 net/mptcp/pm.c                                  | 62 +++++++++++------
 net/mptcp/pm_kernel.c                           | 90 ++++++++++++++++---------
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 33 ++++++++-
 tools/testing/selftests/net/mptcp/mptcp_lib.sh  | 16 +++--
 tools/testing/selftests/net/mptcp/pm_netlink.sh | 74 ++++++++++++--------
 tools/testing/selftests/net/mptcp/pm_nl_ctl.c   |  8 +--
 6 files changed, 193 insertions(+), 90 deletions(-)
---
base-commit: b3fa12c3ddab70d570c42071efb0edd5dad07060
change-id: 20260403-mptcp-inc-limits-ce9811024066

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-net v6 00/19] mptcp: pm: increase limits, and related fixes and cleanup
Posted by Mat Martineau 6 days, 10 hours ago
On Wed, 22 Apr 2026, Matthieu Baerts (NGI0) wrote:

> The initial intension was to increase the limits, but some fixes were
> needed, then when looking at the code around, other fixes had to be
> added too. So now I ended up with multiple fixes (including one early
> exit while at it), followed by patches increasing limits with some
> adaptations required before, some to validate the modifications, and one
> small improvement in the selftests.
>
> The patches with a Fixes tag are for -net, the rest for net-next.
>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Changes in v6:
> - patch 4: fix label name in commit message + mention next patch.
> - patch 7: use min() to improve clarity (Mat)
> - patch 15: fix typo.
> - patch 20: removed: will be sent in another series after that one.
> - Link to v5: https://patch.msgid.link/20260415-mptcp-inc-limits-v5-0-e54c3bf80e4e@kernel.org

Hi Matthieu -

v6 LGTM, thanks for the updates.

Reviewed-by: Mat Martineau <martineau@kernel.org>

>
> Changes in v5:
> - patch 5: only set timer_done to true in the timer handler: safer.
> - patch 9: fix typo in commit message.
> - patch 10: 3rd check expects error, better err msg, rename var.
> - Link to v4: https://patch.msgid.link/20260414-mptcp-inc-limits-v4-0-78274edda5dd@kernel.org
>
> Changes in v4:
> - patch 5: reset timer_done when the timer is reset.
> - patch 10: new: selftests: correctly catch error in 'check output'.
> - patch 16: add example with init_shapers to silence AI reviews
> - Patch 18: clearer way to check errors (without buggy '&&')
> - Link to v3: https://patch.msgid.link/20260413-mptcp-inc-limits-v3-0-dd36c9360432@kernel.org
>
> Changes in v3:
> - patch 1: new: retransmit ADD_ADDR for ID 0 with right ID.
> - patch 5: moved below + support calling sk_free().
> - patch 13: new: allow flushing more than 8 endpoints.
> - patch 12: clarify single batch of 8 subflows as known limit.
> - patch 16: fix typo in comment.
> - Link to v2: https://patch.msgid.link/20260410-mptcp-inc-limits-v2-0-5402209f05d3@kernel.org
>
> Changes in v2:
> - patch 2: new: fix potential data-race.
> - re-order patches 1 to 5 and use shorter prefix (ADD_ADDR rtx).
> - patch 6: restore accidentally deleted icsk->icsk_rto > max check.
> - patch 16: fix already present checkpatch warning.
> - Link to v1: https://patch.msgid.link/20260409-mptcp-inc-limits-v1-0-0e45fa30d914@kernel.org
>
> ---
> Matthieu Baerts (NGI0) (19):
>      mptcp: pm: kernel: correctly retransmit ADD_ADDR ID 0
>      mptcp: pm: ADD_ADDR rtx: fix potential data-race
>      mptcp: pm: ADD_ADDR rtx: allow ID 0
>      mptcp: pm: ADD_ADDR rtx: always decrease sk refcount
>      mptcp: pm: ADD_ADDR rtx: free sk if last
>      mptcp: pm: ADD_ADDR rtx: resched blocked ADD_ADDR quicker
>      mptcp: pm: ADD_ADDR rtx: skip inactive subflows
>      mptcp: pm: retrans ADD_ADDR: return early if no retrans
>      mptcp: pm: prio: skip closed subflows
>      selftests: mptcp: check output: catch cmd errors
>      selftests: mptcp: pm: restrict 'unknown' check to pm_nl_ctl
>      mptcp: pm: in-kernel: explicitly limit batches to array size
>      mptcp: pm: in-kernel: increase all limits to 64
>      mptcp: pm: kernel: allow flushing more than 8 endpoints
>      mptcp: pm: in-kernel: increase endpoints limit
>      selftests: mptcp: join: allow changing ifaces nr per test
>      selftests: mptcp: join: validate 8x8 subflows
>      selftests: mptcp: pm: validate new limits
>      selftests: mptcp: pm: use simpler send/recv forms
>
> net/mptcp/pm.c                                  | 62 +++++++++++------
> net/mptcp/pm_kernel.c                           | 90 ++++++++++++++++---------
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 33 ++++++++-
> tools/testing/selftests/net/mptcp/mptcp_lib.sh  | 16 +++--
> tools/testing/selftests/net/mptcp/pm_netlink.sh | 74 ++++++++++++--------
> tools/testing/selftests/net/mptcp/pm_nl_ctl.c   |  8 +--
> 6 files changed, 193 insertions(+), 90 deletions(-)
> ---
> base-commit: b3fa12c3ddab70d570c42071efb0edd5dad07060
> change-id: 20260403-mptcp-inc-limits-ce9811024066
>
> Best regards,
> --
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
>
>
Re: [PATCH mptcp-net v6 00/19] mptcp: pm: increase limits, and related fixes and cleanup
Posted by Matthieu Baerts 6 days, 2 hours ago
Hi Mat,

On 29/04/2026 02:09, Mat Martineau wrote:
> On Wed, 22 Apr 2026, Matthieu Baerts (NGI0) wrote:
> 
>> The initial intension was to increase the limits, but some fixes were
>> needed, then when looking at the code around, other fixes had to be
>> added too. So now I ended up with multiple fixes (including one early
>> exit while at it), followed by patches increasing limits with some
>> adaptations required before, some to validate the modifications, and one
>> small improvement in the selftests.
>>
>> The patches with a Fixes tag are for -net, the rest for net-next.
>>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> ---
>> Changes in v6:
>> - patch 4: fix label name in commit message + mention next patch.
>> - patch 7: use min() to improve clarity (Mat)
>> - patch 15: fix typo.
>> - patch 20: removed: will be sent in another series after that one.
>> - Link to v5: https://patch.msgid.link/20260415-mptcp-inc-limits-v5-0-
>> e54c3bf80e4e@kernel.org
> 
> Hi Matthieu -
> 
> v6 LGTM, thanks for the updates.
Thank you for the review!

Now in our tree:

New patches for t/upstream-net and t/upstream:
- 4cd1d0bb0a77: mptcp: pm: kernel: correctly retransmit ADD_ADDR ID 0
- 24d6e9230abb: mptcp: pm: ADD_ADDR rtx: fix potential data-race
- 1d62197aebe7: mptcp: pm: ADD_ADDR rtx: allow ID 0
- 3e8311058b8a: mptcp: pm: ADD_ADDR rtx: always decrease sk refcount
- c7492016b448: mptcp: pm: ADD_ADDR rtx: free sk if last
- 999a20ff8f59: mptcp: pm: ADD_ADDR rtx: resched blocked ADD_ADDR quicker
- 20269ec49bd8: mptcp: pm: ADD_ADDR rtx: skip inactive subflows
- a91b0640998b: mptcp: pm: ADD_ADDR rtx: return early if no retrans
- 09b51d25b19b: mptcp: pm: prio: skip closed subflows
- 53421f820dd0: selftests: mptcp: check output: catch cmd errors
- f1dcf11f1a08: selftests: mptcp: pm: restrict 'unknown' check to pm_nl_ctl
- Results: 90cb02b20cf2..2a1f2d9ea26c (export-net)
- Results: f68dc562c883..eff6f637e315 (export)

New patches for t/upstream:
- 43bbf39ee203: mptcp: pm: in-kernel: explicitly limit batches to array size
- aec0321c2d29: mptcp: pm: in-kernel: increase all limits to 64
- a6d8f6739145: mptcp: pm: kernel: allow flushing more than 8 endpoints
- db7b26d14b03: mptcp: pm: in-kernel: increase endpoints limit
- 4097388c8d85: selftests: mptcp: join: allow changing ifaces nr per test
- b72b1d12a597: selftests: mptcp: join: validate 8x8 subflows
- 67c280697ab2: selftests: mptcp: pm: validate new limits
- dade65b5a91d: selftests: mptcp: pm: use simpler send/recv forms
- Results: eff6f637e315..d56fb1eba9f2 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/6f73a831d415e285b7e49565b9079495b7274a89/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/ea2792a55b2660faf08c4a65ad46d7b87adf6f1c/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-net v6 00/19] mptcp: pm: increase limits, and related fixes and cleanup
Posted by MPTCP CI 1 week, 5 days ago
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): Unstable: 2 failed test(s): packetdrill_fastopen packetdrill_mp_capable ⚠️ 
- 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/24791273302

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/5f1ff4c3eff3
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1084373


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)