The MPTCP scheduler needs a persistent way for BPF schedulers to
mark a subflow as one that should be avoided across scheduling
rounds.
The existing stale and scheduled states do not provide this
scheduler-owned behaviour.
This series introduces an avoid flag in mptcp_subflow_context,
exposes it to BPF struct_ops schedulers through a kfunc, and
exports its state through MPTCP diagnostics.
BPF schedulers can set the flag and must explicitly check it when
selecting subflows. The flag does not change the behaviour of the
default in-kernel scheduler.
The second patch adds a BPF struct_ops selftest that marks a
subflow as avoided once and verifies that it remains skipped
across subsequent scheduling rounds.
Changes since v6:
- Removed unreachable avoid checks from the default send and
retransmission subflow pickers.
- Clarified that BPF schedulers must explicitly honour the
avoid flag.
- Updated the first patch description to reflect BPF scheduler
ownership.
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.h | 3 +
net/mptcp/sched.c | 6 ++
.../testing/selftests/bpf/prog_tests/mptcp.c | 15 ++++
.../selftests/bpf/progs/mptcp_bpf_avoid.c | 87 +++++++++++++++++++
7 files changed, 115 insertions(+)
create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_avoid.c
--
2.43.0