net/mptcp/mib.c | 7 ++ net/mptcp/mib.h | 7 ++ net/mptcp/protocol.c | 1 + net/mptcp/subflow.c | 10 ++ .../testing/selftests/net/mptcp/mptcp_join.sh | 93 +++++++++++++++++++ 5 files changed, 118 insertions(+)
MPTCP_RST_EMPTCP (reset reason 1) is currently used as a catch-all for
several distinct conditions across subflow setup, authentication, and
data-path validation. This series adds per-event MIB counters at each
of those use sites and validates them from mptcp_join.sh.
Patch 1 adds seven counters (MD5SigReset, MPJoinSynAckNoMPJoin,
MPJoinAckNoMPJoin, MPJoinAckNoCtx, MPJoinNoIdFound, DssReset,
MPJoinNotEstablished) and increments them in mib.c/mib.h, subflow.c and
protocol.c.
Patch 2 adds named env-var expectations for each counter: the
JOIN-related ones in chk_join_nr() and the two reset ones in
chk_rst_nr(), both on fixed namespaces. It also adds one test inside
signal_address_tests that triggers MPJoinSynAckNoMPJoin from the
existing ns1/ns2 setup.
v4 (this version):
patch 1: add MPJoinNoIdFound for an MP_JOIN that carries a valid token
but for which the path manager returns no local id; it
reaches the same MPTCP_RST_EMPTCP that MPJoinNoTokenFound
only counts the no-token half of (Matt).
patch 2: move the MPJoin* checks into chk_join_nr() with fixed
namespaces, leaving only MD5SigReset and DssReset in
chk_rst_nr() (Matt); rename the env vars (join_* / rst_md5sig
/ rst_dss); the new test uses mptcp_lib_wait_local_port_listen()
and asserts with chk_join_nr().
v3: https://lore.kernel.org/all/20260512103331.1934343-1-shardul.b@mpiricsoftware.com/
v2: https://lore.kernel.org/all/20260509183335.969018-1-shardul.b@mpiricsoftware.com/
v1: https://lore.kernel.org/all/20260421095646.3741956-1-shardul.b@mpiricsoftware.com/
Shardul Bankar (2):
mptcp: add per-event MIB counters for MPTCP_RST_EMPTCP resets
selftests: mptcp: check per-event MPTCP_RST_EMPTCP counters
net/mptcp/mib.c | 7 ++
net/mptcp/mib.h | 7 ++
net/mptcp/protocol.c | 1 +
net/mptcp/subflow.c | 10 ++
.../testing/selftests/net/mptcp/mptcp_join.sh | 93 +++++++++++++++++++
5 files changed, 118 insertions(+)
--
2.34.1
Hi Shardul, On 11/06/2026 22:32, Shardul Bankar wrote: > MPTCP_RST_EMPTCP (reset reason 1) is currently used as a catch-all for > several distinct conditions across subflow setup, authentication, and > data-path validation. This series adds per-event MIB counters at each > of those use sites and validates them from mptcp_join.sh. > > Patch 1 adds seven counters (MD5SigReset, MPJoinSynAckNoMPJoin, > MPJoinAckNoMPJoin, MPJoinAckNoCtx, MPJoinNoIdFound, DssReset, > MPJoinNotEstablished) and increments them in mib.c/mib.h, subflow.c and > protocol.c. > > Patch 2 adds named env-var expectations for each counter: the > JOIN-related ones in chk_join_nr() and the two reset ones in > chk_rst_nr(), both on fixed namespaces. It also adds one test inside > signal_address_tests that triggers MPJoinSynAckNoMPJoin from the > existing ns1/ns2 setup. > > v4 (this version): > patch 1: add MPJoinNoIdFound for an MP_JOIN that carries a valid token > but for which the path manager returns no local id; it > reaches the same MPTCP_RST_EMPTCP that MPJoinNoTokenFound > only counts the no-token half of (Matt). > patch 2: move the MPJoin* checks into chk_join_nr() with fixed > namespaces, leaving only MD5SigReset and DssReset in > chk_rst_nr() (Matt); rename the env vars (join_* / rst_md5sig > / rst_dss); the new test uses mptcp_lib_wait_local_port_listen() > and asserts with chk_join_nr(). Thank you for the v4, and sorry for the exceptionally long delay! The new version looks good to me: Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> New patches for t/upstream: - 4ef5be975394: mptcp: add per-event MIB counters for MPTCP_RST_EMPTCP resets - 69359746fd42: selftests: mptcp: check per-event MPTCP_RST_EMPTCP counters - Results: b67053e5e63b..25452f1bb469 (export) Tests are now in progress: - export: https://github.com/multipath-tcp/mptcp_net-next/commit/d53994ceed37c0dd4cd6c780d5f0a108c7f5bab2/checks Cheers, Matt -- Sponsored by the NGI0 Core fund.
Hi Shardul,
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): 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/27376133346
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/5d23d993f27c
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1110277
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)
© 2016 - 2026 Red Hat, Inc.