All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net v3 0/2] mptcp: pm: fix ADD_ADDR timer infinite retry on option space shortage
@ 2026-05-07 12:52 Li Xiasong
  2026-05-07 12:52 ` [PATCH mptcp-net v3 1/2] mptcp: pm: fix ADD_ADDR timer infinite retry on option space insufficient Li Xiasong
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Li Xiasong @ 2026-05-07 12:52 UTC (permalink / raw)
  To: mptcp; +Cc: weiyongjun1, yuehaibing, zhangchangzhong

This series fixes a bug where the ADD_ADDR timer can keep rescheduling
indefinitely when TCP option space is insufficient, blocking subsequent
addresses in the endpoint list from being announced.

The issue is reproducible when sending an IPv6 ADD_ADDR with port while
tcp_timestamps is enabled. In that case, option space may be exhausted on
pure ACKs, and ADD_ADDR retransmission can stall PM forward progress.

Patch 1 clears the signal in this path, skips the matching ADD_ADDR
retransmission entry, and preserves PM state-machine progression.

Note on concurrency: timer cancellation in this path is best-effort.
A concurrent add_timer callback that acquires pm.lock first may still
perform one final ADD_ADDR send attempt before cancel state is applied.
After cancel sets entry->retrans_times to ADD_ADDR_RETRANS_MAX, the
callback-side check prevents further ADD_ADDR retransmissions.

Patch 2 adds a selftest to cover this behavior and prevent regressions.

Patch summary:
  - patch 1: mptcp: pm: fix ADD_ADDR timer infinite retry on option space
    insufficient
  - patch 2: selftests: mptcp: join: cover ADD_ADDR tx drop and list
    progress

Changes since v2:
  - document the possible timer-cancel race window in the commit message
    and code comments
  - keep best-effort cancellation semantics (possible one extra send
    attempt under lock-order race), while preventing further retries via
    retrans_times gating
  - selftests: remove the redundant ADD_ADDR tx-drop subtest that
    duplicated existing coverage for list progression behavior
  - link to v2:
    https://lore.kernel.org/mptcp/20260430112026.343691-1-lixiasong1@huawei.com/

Changes since v1:
  - add explicit MIB accounting for this drop path:
    - MPTCP_MIB_ADDADDRTXDROP for non-echo ADD_ADDR
    - MPTCP_MIB_ECHOADDTXDROP for echo ADD_ADDR
  - add explicit handling to stop the matching ADD_ADDR retransmission
    timer when skipping non-echo ADD_ADDR on pure-ACK option-space
    exhaustion
  - keep PM forward progress by advancing PM state after a successful
    skip of the matching ADD_ADDR entry
  - add selftest to verify IPv6 ADD_ADDR with port tx-drop when
    tcp_timestamps is enabled
  - link to v1:
    https://lore.kernel.org/netdev/20260418100018.2219500-1-lixiasong1@huawei.com/

Thanks to Matthieu Baerts for the detailed review and suggestions.

Li Xiasong (2):
  mptcp: pm: fix ADD_ADDR timer infinite retry on option space
    insufficient
  selftests: mptcp: join: cover ADD_ADDR tx drop and list progress

 net/mptcp/pm.c                                | 56 +++++++++++++++----
 .../testing/selftests/net/mptcp/mptcp_join.sh | 31 ++++++++++
 2 files changed, 77 insertions(+), 10 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-08 11:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 12:52 [PATCH mptcp-net v3 0/2] mptcp: pm: fix ADD_ADDR timer infinite retry on option space shortage Li Xiasong
2026-05-07 12:52 ` [PATCH mptcp-net v3 1/2] mptcp: pm: fix ADD_ADDR timer infinite retry on option space insufficient Li Xiasong
2026-05-07 12:52 ` [PATCH mptcp-net v3 2/2] selftests: mptcp: join: cover ADD_ADDR tx drop and list progress Li Xiasong
2026-05-08 11:37   ` Matthieu Baerts
2026-05-07 13:40 ` [PATCH mptcp-net v3 0/2] mptcp: pm: fix ADD_ADDR timer infinite retry on option space shortage MPTCP CI
2026-05-08 11:37 ` Matthieu Baerts
2026-05-08 11:47 ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.