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-16: 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 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) (16):
[mptcp-net] mptcp: pm: avoid sleeping while holding rcu_read_lock
mptcp: options: ADD_ADDR size 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
mptcp: pm: avoid confusing check_id in del_timer
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 | 43 ++----
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, 232 insertions(+), 201 deletions(-)
---
base-commit: 08d7466136ffa606d823f1fc4879f97d366d9e92
change-id: 20260508-mptcp-add-addr6-port-ts-371653e0f843
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>