Skip to content

mptcp: add core-enforced subflow avoid flag

Kalpan Jani mptcp 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest2 patches 2 repliesIn review
  2. v72 patches 0 repliesSuperseded
  3. v62 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches3 repliesSuperseded
v42 patches1 replySuperseded
v32 patches1 replySuperseded
v22 patches0 repliesSuperseded
v12 patches2 repliesSuperseded

Changes in v8 from the cover letter

- Enforce avoid preference in core send and retransmission selection.
- Preserve active/backup priorities and avoided fallback candidates.
- Exercise core filtering and persistent state in the BPF selftest.
- Handle scheduler success without a selected subflow correctly.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mptcp: sched: add subflow avoid flag for BPF schedulersinclude/uapi/linux/mptcp.h net/mptcp/bpf.c net/mptcp/diag.c +3 more+186 -380 replies
2/2selftests: mptcp: bpf: exercise the subflow avoid flag across roundstools/testing/selftests/bpf/prog_tests/mptcp.c tools/testing/selftests/bpf/progs/mptcp_bpf_avoid.c+101 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH mptcp-next v8 0/2] mptcp: add core-enforced subflow avoid flag

The MPTCP scheduler needs a persistent way for BPF schedulers to mark subflows that should be avoided across scheduling rounds.

This series introduces a scheduler-owned avoid flag in mptcp_subflow_context, exposes it to BPF struct_ops schedulers through a kfunc, and exports its state through MPTCP diagnostics.

The MPTCP core enforces the avoid preference for send and retransmission selection. Non-avoided subflows are preferred while preserving the existing active/backup selection priorities. Avoided subflows remain available as fallback candidates.

When a BPF scheduler schedules both avoided and non-avoided subflows, the core drops the avoided selections. If only avoided subflows are selected, the core retries through the default selector.

The second patch adds a BPF struct_ops selftest that deliberately schedules avoided and non-avoided subflows and checks core filtering and persistent avoid state across scheduling rounds.

Changes since v7:
- Enforce avoid preference in core send and retransmission selection.
- Preserve active/backup priorities and avoided fallback candidates.
- Exercise core filtering and persistent state in the BPF selftest.
- Handle scheduler success without a selected subflow correctly.

Kalpan Jani (2):
mptcp: sched: add subflow avoid flag for BPF schedulers
selftests: mptcp: bpf: exercise the subflow avoid flag across rounds

 include/uapi/linux/mptcp.h                    |   1 +
 net/mptcp/bpf.c                               |   1 +
 net/mptcp/diag.c                              |   2 +
 net/mptcp/protocol.c                          |  76 +++++++---
 net/mptcp/protocol.h                          |   3 +
 net/mptcp/sched.c                             | 141 ++++++++++++++++--
 .../testing/selftests/bpf/prog_tests/mptcp.c  |  15 ++
 .../selftests/bpf/progs/mptcp_bpf_avoid.c     |  86 +++++++++++
 8 files changed, 287 insertions(+), 38 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_avoid.c
Signature · 1 line
2.43.0