Skip to content

mptcp: pm: in-kernel: C-flag: handle late ADD_ADDR + misc.

Matthieu Baerts (NGI0) mptcp 1 version In review

Get series with b4
b4 am [email protected] change-id 20251003-c-flag-add-addr-delay-4e9e57789c36

Versions newest first

  1. v1 Latest7 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7mptcp: pm: in-kernel: C-flag: handle late ADD_ADDRnet/mptcp/pm_kernel.c+6 -03 replies
2/7selftests: mptcp: join: mark 'flush re-add' as skipped if not supportedtools/testing/selftests/net/mptcp/mptcp_join.sh+1 -11 reply
3/7selftests: mptcp: join: mark 'delete re-add signal' as skipped if not supportedtools/testing/selftests/net/mptcp/mptcp_join.sh+1 -11 reply
4/7selftests: mptcp: join: mark implicit tests as skipped if not supportedtools/testing/selftests/net/mptcp/mptcp_join.sh+2 -21 reply
5/7selftests: mptcp: join: mark laminar tests as skipped if not supportedtools/testing/selftests/net/mptcp/mptcp_join.sh+5 -51 reply
6/7mptcp: pm: in-kernel: record fullmesh endp nbinclude/uapi/linux/mptcp.h net/mptcp/pm_kernel.c net/mptcp/protocol.h +1 more+40 -43 replies
7/7mptcp: pm: in kernel: only use fullmesh endp if anynet/mptcp/pm_kernel.c tools/testing/selftests/net/mptcp/mptcp_join.sh+8 -82 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchGeliang Tang
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH mptcp-net 0/7] mptcp: pm: in-kernel: C-flag: handle late ADD_ADDR + misc.

On NIPA, the new test validating the special case for the C-flag failed a few times, e.g.

102 default limits, server deny join id 0
syn rx [FAIL] got 0 JOIN[s] syn rx expected 2
Server ns stats

  TcpPassiveOpens                 1                  0.0
  TcpInSegs                       9                  0.0
  TcpOutSegs                      10                 0.0
  TcpExtTW                        1                  0.0
  TcpExtTCPPureAcks               5                  0.0
  TcpExtTCPOrigDataSent           3                  0.0
  TcpExtTCPDelivered              3                  0.0
  MPTcpExtMPCapableSYNRX          1                  0.0
  MPTcpExtMPCapableACKRX          1                  0.0
  MPTcpExtAddAddrTx               1                  0.0
  MPTcpExtEchoAdd                 1                  0.0
  Client ns stats
  TcpActiveOpens                  1                  0.0
  TcpInSegs                       10                 0.0
  TcpOutSegs                      9                  0.0
  TcpExtTCPPureAcks               6                  0.0
  TcpExtTCPOrigDataSent           3                  0.0
  TcpExtTCPDelivered              4                  0.0
  MPTcpExtMPCapableSYNTX          1                  0.0
  MPTcpExtMPCapableSYNACKRX       1                  0.0
  MPTcpExtAddAddr                 1                  0.0
  MPTcpExtEchoAddTx               1                  0.0
        synack rx              [FAIL] got 0 JOIN[s] synack rx expected 2
        ack rx                 [FAIL] got 0 JOIN[s] ack rx expected 2
        join Rx                [FAIL] see above
        syn tx                 [FAIL] got 0 JOIN[s] syn tx expected 2
        join Tx                [FAIL] see above

I had a suspicion about what the issue could be: the ADD_ADDR might have been received with a delay, not when switching to 'fully-established'. The issue was not easy to reproduce on my side, but when I did, the packet capture shown that the ADD_ADDR can indeed be received with a delay, and the client would not try to establish subflows to it as expected.

Patch 1 fixes that, simply by not marking the endpoints as 'used' in the C-flag case, when looking at creating subflows to the remote initial IP address and port: in this case, there is no need to try.

Patches 2 to 5 are not directly related, but seen when working on patch 7: they fix subtests not being marked as 'skipped' on older kernels.

Patches 6 and 7 are for net-next:

- The first one avoids iterating over all endpoints just to check if one of them has the 'fullmesh' flag.

- The second one clarifies what is done when an ADD_ADDR is received and there are endpoints with the fullmesh flag: only these endpoints are used, even if there are none defined for this address family.

---
Matthieu Baerts (NGI0) (7):
mptcp: pm: in-kernel: C-flag: handle late ADD_ADDR
selftests: mptcp: join: mark 'flush re-add' as skipped if not supported
selftests: mptcp: join: mark 'delete re-add signal' as skipped if not supported
selftests: mptcp: join: mark implicit tests as skipped if not supported
selftests: mptcp: join: mark laminar tests as skipped if not supported
mptcp: pm: in-kernel: record fullmesh endp nb
mptcp: pm: in kernel: only use fullmesh endp if any

 include/uapi/linux/mptcp.h                      |  3 +-
 net/mptcp/pm_kernel.c                           | 42 ++++++++++++++++++++++---
 net/mptcp/protocol.h                            |  1 +
 net/mptcp/sockopt.c                             |  2 ++
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 24 ++++++++------
 5 files changed, 57 insertions(+), 15 deletions(-)

---
base-commit: 3afc295b5e6e698696cf1fd75db194db2c7f64cd
change-id: 20251003-c-flag-add-addr-delay-4e9e57789c36

Best regards,

Signature · 1 line
Matthieu Baerts (NGI0) <[email protected]>