[PATCH mptcp-next v10 00/13] BPF packet scheduler updates part 1

Geliang Tang posted 13 patches 10 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1687746021.git.geliang.tang@suse.com
Maintainers: Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, Mat Martineau <martineau@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Mykola Lysenko <mykolal@fb.com>, Shuah Khan <shuah@kernel.org>
There is a newer version of this series
include/linux/bpf.h                           |   2 +
include/linux/bpf_types.h                     |   1 +
include/linux/btf_ids.h                       |   1 +
include/net/mptcp.h                           |  11 +-
include/uapi/linux/bpf.h                      |  40 +++
kernel/bpf/helpers.c                          |   4 +
kernel/bpf/syscall.c                          |   6 +-
kernel/bpf/verifier.c                         |  14 +-
net/mptcp/bpf.c                               | 245 ++++++++++++++++++
net/mptcp/protocol.c                          |  10 +-
net/mptcp/protocol.h                          |   7 +-
net/mptcp/sched.c                             |  46 +++-
tools/include/uapi/linux/bpf.h                |  40 +++
tools/lib/bpf/libbpf.c                        |   1 +
tools/lib/bpf/libbpf_probes.c                 |   1 +
tools/testing/selftests/bpf/bpf_tcp_helpers.h |  20 +-
.../selftests/bpf/progs/mptcp_bpf_bkup.c      |  17 +-
.../selftests/bpf/progs/mptcp_bpf_first.c     |   8 +-
.../selftests/bpf/progs/mptcp_bpf_red.c       |  12 +-
.../selftests/bpf/progs/mptcp_bpf_rr.c        |  43 ++-
20 files changed, 475 insertions(+), 54 deletions(-)
[PATCH mptcp-next v10 00/13] BPF packet scheduler updates part 1
Posted by Geliang Tang 10 months, 1 week ago
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/cover.1665753926.git.geliang.tang@suse.com/ [1]
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/342
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/349

Geliang Tang (13):
  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"
  bpf: Add mptcp_storage map type
  bpf: Add mptcp_storage helpers
  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/linux/bpf.h                           |   2 +
 include/linux/bpf_types.h                     |   1 +
 include/linux/btf_ids.h                       |   1 +
 include/net/mptcp.h                           |  11 +-
 include/uapi/linux/bpf.h                      |  40 +++
 kernel/bpf/helpers.c                          |   4 +
 kernel/bpf/syscall.c                          |   6 +-
 kernel/bpf/verifier.c                         |  14 +-
 net/mptcp/bpf.c                               | 245 ++++++++++++++++++
 net/mptcp/protocol.c                          |  10 +-
 net/mptcp/protocol.h                          |   7 +-
 net/mptcp/sched.c                             |  46 +++-
 tools/include/uapi/linux/bpf.h                |  40 +++
 tools/lib/bpf/libbpf.c                        |   1 +
 tools/lib/bpf/libbpf_probes.c                 |   1 +
 tools/testing/selftests/bpf/bpf_tcp_helpers.h |  20 +-
 .../selftests/bpf/progs/mptcp_bpf_bkup.c      |  17 +-
 .../selftests/bpf/progs/mptcp_bpf_first.c     |   8 +-
 .../selftests/bpf/progs/mptcp_bpf_red.c       |  12 +-
 .../selftests/bpf/progs/mptcp_bpf_rr.c        |  43 ++-
 20 files changed, 475 insertions(+), 54 deletions(-)

-- 
2.35.3