[PATCH mptcp-net mptcp-next v4 00/15] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port

Matthieu Baerts (NGI0) posted 15 patches 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20260529-mptcp-add-addr6-port-ts-v4-0-cea393fa33a2@kernel.org
Documentation/networking/mptcp-sysctl.rst       |  13 ++
include/net/mptcp.h                             |   3 +-
net/ipv4/tcp_output.c                           |   6 +-
net/mptcp/ctrl.c                                |  18 ++-
net/mptcp/options.c                             |  65 +++-----
net/mptcp/pm.c                                  | 189 ++++++++++++++----------
net/mptcp/pm_kernel.c                           |  22 +--
net/mptcp/pm_userspace.c                        |   6 +-
net/mptcp/protocol.h                            |  46 ++----
net/mptcp/subflow.c                             |   4 +-
tools/testing/selftests/net/mptcp/mptcp_join.sh |  83 +++++------
11 files changed, 240 insertions(+), 215 deletions(-)
[PATCH mptcp-net mptcp-next v4 00/15] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
Posted by Matthieu Baerts (NGI0) 1 week, 3 days ago
Currently, it is possible to add a "signal" MPTCP endpoint with a v6
address and a port, or to directly request to send an ADD_ADDR with a v6
address and a port, but such signalling option cannot be sent when TCP
timestamps is used due to a lack of option space. Instead of simply
dropping such ADD_ADDR, the TCP timestamps can be dropped only for this
packet.

- Patch 1: fix for PREEMPT_RT kernels, for -net.

- Patches 2-4: small cleanups to avoid computing ADD/RM_ADDR twice.

- Patches 5-8: the new feature, controlled by a new sysctl knob.

- Patch 9: extra checks in the selftests.

- Patches 10-15: refactoring/cleanups: some of them were part of a
  previous patch: "mptcp: pm: clearer ADD_ADDR related helpers names"
  [1].

Note that the mptcp/add_addr/add_addr6_port_ts_server.pkt packetdrill
test is supposed to fail with this series, until this PR is applied:

  https://github.com/multipath-tcp/packetdrill/pull/198

Link: https://lore.kernel.org/20260415-mptcp-inc-limits-v5-20-e54c3bf80e4e@kernel.org [1]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v4:
- Patches 2-4: uniform "size" type: signed for all suboptions. (Mat)
- Dropped previous patch 16.
- Link to v3: https://patch.msgid.link/20260520-mptcp-add-addr6-port-ts-v3-0-bffa658a7678@kernel.org

Changes in v3:
- Patch 1: sk_stop_timer() should still be called under rcu.
- Patches 6-7: split + s/has_ts/add_addr_drop_ts/.
- Link to v2: https://patch.msgid.link/20260519-mptcp-add-addr6-port-ts-v2-0-3b36a51e6a86@kernel.org

Changes in v2:
- Patch 1: new.
- Patch 3: reset size in mptcp_pm_add_addr_signal for dropped options.
- Patches 4-5: split from previous patch 3. (Paolo)
- Patch 4: fix typo.
- Patch 5: fix reverse Xmas tree order + change label. (Paolo)
- Patch 6: back to v6 connection.
- Patch 10: fix comment.
- Patch 14: fix typo.
- Link to v1: https://patch.msgid.link/20260518-mptcp-add-addr6-port-ts-v1-0-f1ca26977fcd@kernel.org

---
Matthieu Baerts (NGI0) (15):
      [mptcp-net] mptcp: pm: avoid sleeping while holding rcu_read_lock
      mptcp: options: suboptions sizes can be negative
      mptcp: pm: avoid computing rm_addr size twice
      mptcp: pm: avoid computing add_addr size twice
      mptcp: introduce add_addr_v6_port_drop_ts sysctl knob
      tcp: allow mptcp to drop TS for some packets
      mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
      selftests: mptcp: validate ADD_ADDRv6 + TS + port
      selftests: mptcp: always check sent/dropped ADD_ADDRs
      mptcp: pm: use for_each_subflow helper
      mptcp: pm: rename add_entry structure to add_addr
      mptcp: pm: uniform announced addresses helpers
      mptcp: pm: remove add_ prefix from timer
      mptcp: pm: make mptcp_pm_add_addr_send_ack static
      mptcp: pm: avoid using del_timer directly

 Documentation/networking/mptcp-sysctl.rst       |  13 ++
 include/net/mptcp.h                             |   3 +-
 net/ipv4/tcp_output.c                           |   6 +-
 net/mptcp/ctrl.c                                |  18 ++-
 net/mptcp/options.c                             |  65 +++-----
 net/mptcp/pm.c                                  | 189 ++++++++++++++----------
 net/mptcp/pm_kernel.c                           |  22 +--
 net/mptcp/pm_userspace.c                        |   6 +-
 net/mptcp/protocol.h                            |  46 ++----
 net/mptcp/subflow.c                             |   4 +-
 tools/testing/selftests/net/mptcp/mptcp_join.sh |  83 +++++------
 11 files changed, 240 insertions(+), 215 deletions(-)
---
base-commit: 4d6bda29d05f8789f40c095d5d08396ffd6b470f
change-id: 20260508-mptcp-add-addr6-port-ts-371653e0f843

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-net mptcp-next v4 00/15] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
Posted by MPTCP CI 1 week, 3 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): Unstable: 1 failed test(s): packetdrill_add_addr ⚠️ 
- 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/26616464627

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


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)
Re: [PATCH mptcp-net mptcp-next v4 00/15] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
Posted by Mat Martineau 1 week, 2 days ago
On Fri, 29 May 2026, Matthieu Baerts (NGI0) wrote:

> Currently, it is possible to add a "signal" MPTCP endpoint with a v6
> address and a port, or to directly request to send an ADD_ADDR with a v6
> address and a port, but such signalling option cannot be sent when TCP
> timestamps is used due to a lack of option space. Instead of simply
> dropping such ADD_ADDR, the TCP timestamps can be dropped only for this
> packet.
>
> - Patch 1: fix for PREEMPT_RT kernels, for -net.
>
> - Patches 2-4: small cleanups to avoid computing ADD/RM_ADDR twice.
>
> - Patches 5-8: the new feature, controlled by a new sysctl knob.
>
> - Patch 9: extra checks in the selftests.
>
> - Patches 10-15: refactoring/cleanups: some of them were part of a
>  previous patch: "mptcp: pm: clearer ADD_ADDR related helpers names"
>  [1].
>
> Note that the mptcp/add_addr/add_addr6_port_ts_server.pkt packetdrill
> test is supposed to fail with this series, until this PR is applied:
>
>  https://github.com/multipath-tcp/packetdrill/pull/198
>
> Link: https://lore.kernel.org/20260415-mptcp-inc-limits-v5-20-e54c3bf80e4e@kernel.org [1]
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Changes in v4:
> - Patches 2-4: uniform "size" type: signed for all suboptions. (Mat)
> - Dropped previous patch 16.
> - Link to v3: https://patch.msgid.link/20260520-mptcp-add-addr6-port-ts-v3-0-bffa658a7678@kernel.org

Hi Matthieu -

Thank you for the updates in v4, all of my concerns are addressed and I 
agree that this approach to fitting ADD_ADDR headers w/ IPv6 seems like 
the best tradeoff.

I'll also give a +1 on the packetdrill PR.

For the series:

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

>
> Changes in v3:
> - Patch 1: sk_stop_timer() should still be called under rcu.
> - Patches 6-7: split + s/has_ts/add_addr_drop_ts/.
> - Link to v2: https://patch.msgid.link/20260519-mptcp-add-addr6-port-ts-v2-0-3b36a51e6a86@kernel.org
>
> Changes in v2:
> - Patch 1: new.
> - Patch 3: reset size in mptcp_pm_add_addr_signal for dropped options.
> - Patches 4-5: split from previous patch 3. (Paolo)
> - Patch 4: fix typo.
> - Patch 5: fix reverse Xmas tree order + change label. (Paolo)
> - Patch 6: back to v6 connection.
> - Patch 10: fix comment.
> - Patch 14: fix typo.
> - Link to v1: https://patch.msgid.link/20260518-mptcp-add-addr6-port-ts-v1-0-f1ca26977fcd@kernel.org
>
> ---
> Matthieu Baerts (NGI0) (15):
>      [mptcp-net] mptcp: pm: avoid sleeping while holding rcu_read_lock
>      mptcp: options: suboptions sizes can be negative
>      mptcp: pm: avoid computing rm_addr size twice
>      mptcp: pm: avoid computing add_addr size twice
>      mptcp: introduce add_addr_v6_port_drop_ts sysctl knob
>      tcp: allow mptcp to drop TS for some packets
>      mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
>      selftests: mptcp: validate ADD_ADDRv6 + TS + port
>      selftests: mptcp: always check sent/dropped ADD_ADDRs
>      mptcp: pm: use for_each_subflow helper
>      mptcp: pm: rename add_entry structure to add_addr
>      mptcp: pm: uniform announced addresses helpers
>      mptcp: pm: remove add_ prefix from timer
>      mptcp: pm: make mptcp_pm_add_addr_send_ack static
>      mptcp: pm: avoid using del_timer directly
>
> Documentation/networking/mptcp-sysctl.rst       |  13 ++
> include/net/mptcp.h                             |   3 +-
> net/ipv4/tcp_output.c                           |   6 +-
> net/mptcp/ctrl.c                                |  18 ++-
> net/mptcp/options.c                             |  65 +++-----
> net/mptcp/pm.c                                  | 189 ++++++++++++++----------
> net/mptcp/pm_kernel.c                           |  22 +--
> net/mptcp/pm_userspace.c                        |   6 +-
> net/mptcp/protocol.h                            |  46 ++----
> net/mptcp/subflow.c                             |   4 +-
> tools/testing/selftests/net/mptcp/mptcp_join.sh |  83 +++++------
> 11 files changed, 240 insertions(+), 215 deletions(-)
> ---
> base-commit: 4d6bda29d05f8789f40c095d5d08396ffd6b470f
> change-id: 20260508-mptcp-add-addr6-port-ts-371653e0f843
>
> Best regards,
> --
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
>
>
Re: [PATCH mptcp-net mptcp-next v4 00/15] mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
Posted by Matthieu Baerts 1 week, 1 day ago
Hi Mat,

On 30/05/2026 04:12, Mat Martineau wrote:
> On Fri, 29 May 2026, Matthieu Baerts (NGI0) wrote:
> 
>> Currently, it is possible to add a "signal" MPTCP endpoint with a v6
>> address and a port, or to directly request to send an ADD_ADDR with a v6
>> address and a port, but such signalling option cannot be sent when TCP
>> timestamps is used due to a lack of option space. Instead of simply
>> dropping such ADD_ADDR, the TCP timestamps can be dropped only for this
>> packet.
>>
>> - Patch 1: fix for PREEMPT_RT kernels, for -net.
>>
>> - Patches 2-4: small cleanups to avoid computing ADD/RM_ADDR twice.
>>
>> - Patches 5-8: the new feature, controlled by a new sysctl knob.
>>
>> - Patch 9: extra checks in the selftests.
>>
>> - Patches 10-15: refactoring/cleanups: some of them were part of a
>>  previous patch: "mptcp: pm: clearer ADD_ADDR related helpers names"
>>  [1].
>>
>> Note that the mptcp/add_addr/add_addr6_port_ts_server.pkt packetdrill
>> test is supposed to fail with this series, until this PR is applied:
>>
>>  https://github.com/multipath-tcp/packetdrill/pull/198
>>
>> Link: https://lore.kernel.org/20260415-mptcp-inc-limits-v5-20-
>> e54c3bf80e4e@kernel.org [1]
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> ---
>> Changes in v4:
>> - Patches 2-4: uniform "size" type: signed for all suboptions. (Mat)
>> - Dropped previous patch 16.
>> - Link to v3: https://patch.msgid.link/20260520-mptcp-add-addr6-port-
>> ts-v3-0-bffa658a7678@kernel.org
> 
> Hi Matthieu -
> 
> Thank you for the updates in v4, all of my concerns are addressed and I
> agree that this approach to fitting ADD_ADDR headers w/ IPv6 seems like
> the best tradeoff.
> 
> I'll also give a +1 on the packetdrill PR.

Thank you! Merged!
> For the series:
> 
> Reviewed-by: Mat Martineau <martineau@kernel.org>

Thank you for the review! Now in our tree:

New patches for t/upstream-net and t/upstream:
- c619bf382586: mptcp: pm: avoid sleeping while holding rcu_read_lock
- Results: ba5ea3e35898..b744d5cbf545 (export-net)
- Results: 24c473fa6c91..0a3014718f01 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/8f01bd3c80a4051904fdb16bc4a7d2d56e01b102/checks

New patches for t/upstream:
- 140b3313d086: mptcp: options: suboptions sizes can be negative
- ecb59042f997: mptcp: pm: avoid computing rm_addr size twice
- e152c63b3234: mptcp: pm: avoid computing add_addr size twice
- 3e1f23bf6d20: mptcp: introduce add_addr_v6_port_drop_ts sysctl knob
- be190e710733: tcp: allow mptcp to drop TS for some packets
- 2bbbbbf511cf: mptcp: pm: drop TCP TS with ADD_ADDRv6 + port
- 12de239a0b82: selftests: mptcp: validate ADD_ADDRv6 + TS + port
- a701782ba7ce: selftests: mptcp: always check sent/dropped ADD_ADDRs
- f72cd39ee480: mptcp: pm: use for_each_subflow helper
- 29db124b818c: mptcp: pm: rename add_entry structure to add_addr
- 35e6e38f8cad: mptcp: pm: uniform announced addresses helpers
- 5b33e846c45a: mptcp: pm: remove add_ prefix from timer
- 1c5f13b9f12e: mptcp: pm: make mptcp_pm_add_addr_send_ack static
- 54551d64573b: mptcp: pm: avoid using del_timer directly
- Results: 0a3014718f01..75370a1de11f (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/228692121494a157d7050d141422c9b49c19ca25/checks

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