Skip to content

BPF packet scheduler updates part 1

Geliang Tang mptcp 12 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest11 patches 9 repliesIn review
  2. v1013 patches 7 repliesSuperseded
  3. v923 patches 4 repliesSuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v817 patches17 repliesSuperseded
v719 patches7 repliesSuperseded
v618 patches2 repliesSuperseded
v518 patches2 repliesSuperseded
v414 patches2 repliesSuperseded
v3 posting 2/215 patches2 repliesSuperseded
v3 posting 1/23 of 15 patches0 repliesSuperseded
v212 patches2 repliesSuperseded
v18 patches2 repliesSuperseded

Changes in v11 from the cover letter

- use sk_storage instead of mptcp_storage.
- drop mptcp_storage.

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11Squash to "mptcp: drop last_snd and MPTCP_RESET_SCHEDULER"net/mptcp/protocol.c net/mptcp/protocol.h+0 -100 replies
2/11Squash to "mptcp: add struct mptcp_sched_ops"include/net/mptcp.h+6 -50 replies
3/11Squash to "mptcp: add sched_data_set_contexts helper"net/mptcp/protocol.h net/mptcp/sched.c+11 -02 replies
4/11mptcp: register default schedulernet/mptcp/protocol.c net/mptcp/protocol.h net/mptcp/sched.c+37 -20 replies
5/11Squash to "bpf: Add bpf_mptcp_sched_ops"net/mptcp/bpf.c+15 -10 replies
6/11Squash to "bpf: Add bpf_mptcp_sched_kfunc_set"net/mptcp/bpf.c+1 -00 replies
7/11Squash to "selftests/bpf: Add mptcp sched structs"tools/testing/selftests/bpf/bpf_tcp_helpers.h+8 -60 replies
8/11Squash to "selftests/bpf: Add bpf_first scheduler"tools/testing/selftests/bpf/progs/mptcp_bpf_first.c+6 -60 replies
9/11Squash to "selftests/bpf: Add bpf_bkup scheduler"tools/testing/selftests/bpf/progs/mptcp_bpf_bkup.c+12 -90 replies
10/11Squash to "selftests/bpf: Add bpf_rr scheduler"tools/testing/selftests/bpf/bpf_tcp_helpers.h tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c+39 -112 replies
11/11Squash to "selftests/bpf: Add bpf_red scheduler"tools/testing/selftests/bpf/progs/mptcp_bpf_red.c+8 -82 replies

Reviews trailers per patch

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

Read the v11 thread

Cover letter [PATCH mptcp-next v11 00/11] BPF packet scheduler updates part 1

v11:
- use sk_storage instead of mptcp_storage.
- drop mptcp_storage.

v10:
- add mptcp_storage map type.
- update scheduler API.

v9:
- merge 'Squash to "BPF packet scheduler updates v8"' and 'mptcp:
make the contexts array of sched_data invisible in BPF'

v8:
address Paolo's comments in v7:
- add sched_data into mptcp_sock as new field, not an pointer.
- drop rename __mptcp_set_timeout, export mptcp_set_timeout into BPF context instead.
- add a comment in bpf_burst to explan why not use
"ssk = send_info[SSK_MODE_ACTIVE].ssk;" directly.
- move mptcp_subflow_tcp_sock into bpf_tcp_helpers.h.

v7:
- drop more last_snd, only set it in bpf_rr.
- 1-10: save sched_data at mptcp_sock, for issues #342
- 11-16: add bpf_burst scheduler
- 17-19: add bpf_stale scheduler, for issues #349

v6:
- Only update patches 14, 15. Add a helper bpf_mptcp_subflow_ctx, fix bug in bpf_burst_get_retrans().

v5:
- 1-9: save sched_data at mptcp_sock, for issues #342
- 10-15: add bpf_burst scheduler
- 16-18: add bpf_stale scheduler, for issues #349

v4:
- drop "mptcp: add three helpers for bpf_burst", implement the helpers in the bpf context directly.

v3:
- address Florian's comments in v2.
- split into three more patches.

v2:
- fix this error reported by CI:

KASAN: slab-use-after-free in __mptcp_close_ssk (net/mptcp/protocol.c:2461)
 - add bpf burst scheduler.

This patchset adds sched_data pointer into mptcp_sock to to save some data at MPTCP and subflows levels.

With these changes, the old patch "mptcp: register default scheduler" in
[1] now works.

https://patchwork.kernel.org/project/mptcp/cover/[email protected]/ [1]

Geliang Tang (11):
Squash to "mptcp: drop last_snd and MPTCP_RESET_SCHEDULER" Squash to "mptcp: add struct mptcp_sched_ops" Squash to "mptcp: add sched_data_set_contexts helper"
mptcp: register default scheduler
Squash to "bpf: Add bpf_mptcp_sched_ops"
Squash to "bpf: Add bpf_mptcp_sched_kfunc_set" Squash to "selftests/bpf: Add mptcp sched structs" Squash to "selftests/bpf: Add bpf_first scheduler" Squash to "selftests/bpf: Add bpf_bkup scheduler" Squash to "selftests/bpf: Add bpf_rr scheduler" Squash to "selftests/bpf: Add bpf_red scheduler"

 include/net/mptcp.h                           | 11 +++--
 net/mptcp/bpf.c                               | 17 ++++++-
 net/mptcp/protocol.c                          | 10 +---
 net/mptcp/protocol.h                          |  4 +-
 net/mptcp/sched.c                             | 46 ++++++++++++++++++-
 tools/testing/selftests/bpf/bpf_tcp_helpers.h | 20 +++++---
 .../selftests/bpf/progs/mptcp_bpf_bkup.c      | 21 +++++----
 .../selftests/bpf/progs/mptcp_bpf_first.c     | 12 ++---
 .../selftests/bpf/progs/mptcp_bpf_red.c       | 16 +++----
 .../selftests/bpf/progs/mptcp_bpf_rr.c        | 44 ++++++++++++++----
 10 files changed, 143 insertions(+), 58 deletions(-)
Signature · 1 line
2.35.3