Skip to content

add bpf_stale scheduler

Geliang Tang mptcp 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 3 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v13 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- init sk_storage in .init, delete it in .release.
We invoke bpf_sk_storage_get() to get the sk_storage map many times. Only the first call is the slow path (see bpf_local_storage_lookup in kernel/bpf/bpf_local_storage.c), alloc the map and cache it. The subsequent calls are all in fast path, the cache hits. So we should first call bpf_sk_storage_get in .init, then call it many times in .get_subflow.
- if no subflow is scheduled, it should return '-1' to indicate an error.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Squash to "selftests/bpf: Add bpf_bkup scheduler"tools/testing/selftests/bpf/progs/mptcp_bpf_bkup.c+3 -10 replies
2/5Squash to "selftests/bpf: Add bpf_rr scheduler"tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c+2 -00 replies
3/5Squash to "selftests/bpf: Add bpf_burst scheduler"tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c+2 -00 replies
4/5selftests/bpf: Add bpf_stale schedulertools/testing/selftests/bpf/bpf_tcp_helpers.h tools/testing/selftests/bpf/progs/mptcp_bpf_stale.c+153 -01 reply
5/5selftests/bpf: Add bpf_stale testtools/testing/selftests/bpf/prog_tests/mptcp.c+38 -00 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH mptcp-next v3 0/5] add bpf_stale scheduler

v3:
- init sk_storage in .init, delete it in .release.
We invoke bpf_sk_storage_get() to get the sk_storage map many times. Only the first call is the slow path (see bpf_local_storage_lookup in kernel/bpf/bpf_local_storage.c), alloc the map and cache it. The subsequent calls are all in fast path, the cache hits. So we should first call bpf_sk_storage_get in .init, then call it many times in .get_subflow.
- if no subflow is scheduled, it should return '-1' to indicate an error.

v2:
- store subflow ids instead of storing subflow pointers in sk_storage.

v1:
- This patchset adds the new bpf_stale scheduler. Use sk_storage to save the stale map instead of using subflow->stale flag to manage it.

Geliang Tang (5):
Squash to "selftests/bpf: Add bpf_bkup scheduler" Squash to "selftests/bpf: Add bpf_rr scheduler" Squash to "selftests/bpf: Add bpf_burst scheduler" selftests/bpf: Add bpf_stale scheduler selftests/bpf: Add bpf_stale test

 tools/testing/selftests/bpf/bpf_tcp_helpers.h |   1 +
 .../testing/selftests/bpf/prog_tests/mptcp.c  |  38 +++++
 .../selftests/bpf/progs/mptcp_bpf_bkup.c      |   4 +-
 .../selftests/bpf/progs/mptcp_bpf_burst.c     |   2 +
 .../selftests/bpf/progs/mptcp_bpf_rr.c        |   2 +
 .../selftests/bpf/progs/mptcp_bpf_stale.c     | 152 ++++++++++++++++++
 6 files changed, 198 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_stale.c
Signature · 1 line
2.35.3