[PATCH net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry on id 0 removal

Kalpan Jani posted 2 patches 1 week, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20260622092838.1267134-1-kalpan.jani@mpiricsoftware.com
net/mptcp/pm_kernel.c                         |  8 ++
.../net/mptcp/mptcp_id0_stale_anno.sh         | 85 +++++++++++++++++++
2 files changed, 93 insertions(+)
create mode 100755 tools/testing/selftests/net/mptcp/mptcp_id0_stale_anno.sh
[PATCH net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry on id 0 removal
Posted by Kalpan Jani 1 week, 5 days ago
Hi Tao, Matt,

Thank you Tao for identifying the port mismatch in v3 and providing a
deterministic reproducer — both are incorporated in this series.

The problem with v3: mptcp_remove_anno_list_by_saddr() compares
addresses with use_port=true. Signal endpoints added without an
explicit port are stored in the anno_list with port 0, but msk_local
carries the connection's actual local port. So the v3 lookup always
missed the stale entry, making the patch a no-op. Confirmed with a
temporary printk showing msk_local.port=5000 and announced=0 on v3,
and announced=1 after clearing the port.

This series:

Patch 1 fixes mptcp_nl_remove_id_zero_address() to tear down the
pending ADD_ADDR symmetrically with the non-zero id path: copy
msk_local, clear the port, call mptcp_remove_anno_list_by_saddr(),
and decrement add_addr_signaled if announced.

Patch 2 adds the regression test based on Tao's reproducer. Verified:
  - unpatched kernel: WARNING: net/mptcp/pm fires, test reports FAIL
  - patched kernel:   no WARNING, test reports PASS

Tested with mptcp/mptcp-upstream-virtme-docker auto-normal. All
existing selftests pass (packetdrill_add_addr failure is pre-existing
and unrelated to this series).

Kalpan Jani (2):
  mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint
  selftests: mptcp: add regression test for stale ADD_ADDR on id 0
    removal

 net/mptcp/pm_kernel.c                         |  8 ++
 .../net/mptcp/mptcp_id0_stale_anno.sh         | 85 +++++++++++++++++++
 2 files changed, 93 insertions(+)
 create mode 100755 tools/testing/selftests/net/mptcp/mptcp_id0_stale_anno.sh

-- 
2.43.0

Re: [PATCH net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry on id 0 removal
Posted by MPTCP CI 1 week, 5 days ago
Hi Kalpan,

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): Script error! ❓
- KVM Validation: normal (only selftest_mptcp_join): Script error! ❓
- KVM Validation: debug (except selftest_mptcp_join): Script error! ❓
- KVM Validation: debug (only selftest_mptcp_join): Script error! ❓
- KVM Validation: btf-normal (only bpftest_all): Script error! ❓
- KVM Validation: btf-debug (only bpftest_all): Script error! ❓
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/27944189431

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


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 net v4 0/2] mptcp: pm: fix stale ADD_ADDR entry on id 0 removal
Posted by MPTCP CI 1 week, 5 days ago
Hi Kalpan,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

  https://github.com/multipath-tcp/mptcp_net-next/actions/runs/27944189360

Status: failure
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/279ca4d41984
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1114633

Feel free to reply to this email if you cannot access logs, if you need
some support to fix the error, if this doesn't seem to be caused by your
modifications or if the error is a false positive one.

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
[PATCH net v4 1/2] mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint
Posted by Tao Cui 1 week, 2 days ago
From: Tao Cui <cuitao@kylinos.cn>

Hi Kalpan,

The CI build failure is just a leftover rename: patch 1 calls
mptcp_remove_anno_list_by_saddr(), which was renamed to
mptcp_pm_announced_remove() in 7d4dacc8ccca and no longer exists in the
current tree. One-liner:

  -	announced = mptcp_remove_anno_list_by_saddr(msk, &anno_addr);
  +	announced = mptcp_pm_announced_remove(msk, &anno_addr);

Cheers,
Tao