[PATCH mptcp-next v4 0/7] BPF 'force to MPTCP'

Geliang Tang posted 7 patches 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1688540074.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>, "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>, Matthieu Baerts <matthieu.baerts@tessares.net>, Mat Martineau <martineau@kernel.org>
include/linux/bpf-cgroup-defs.h               |   1 +
include/linux/bpf-cgroup.h                    |  14 ++
include/linux/bpf_types.h                     |   2 +
include/uapi/linux/bpf.h                      |   8 ++
kernel/bpf/cgroup.c                           |  90 +++++++++++++
kernel/bpf/syscall.c                          |   7 +
kernel/bpf/verifier.c                         |   1 +
net/socket.c                                  |   6 +
tools/include/uapi/linux/bpf.h                |   8 ++
tools/lib/bpf/libbpf.c                        |   3 +
tools/lib/bpf/libbpf_probes.c                 |   1 +
.../bpf/cgroup_getset_retval_hooks.h          |   1 +
.../testing/selftests/bpf/prog_tests/mptcp.c  | 124 +++++++++++++++---
.../selftests/bpf/prog_tests/section_names.c  |   5 +
tools/testing/selftests/bpf/progs/mptcpify.c  |  26 ++++
15 files changed, 277 insertions(+), 20 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/mptcpify.c
[PATCH mptcp-next v4 0/7] BPF 'force to MPTCP'
Posted by Geliang Tang 10 months ago
v4:
 - add hooks in __sock_create().

v3:
 - add a wrapper socket_create(), the bpf hooks will added in this
   wrapper.

v2:
 - Address issue #79 "allow 'force to MPTCP' mode: BPF".
 - Define the prog in patch 3 in SEC "cgroup/sock_create" instead of
  "sockops".
 - Update other patches correspondingly.

v1:

This series depends on the two netns patches, should be inserted before
the BPF scheduler series:
  selftests/bpf: use random netns name for mptcp
  selftests/bpf: add two mptcp netns helpers
  bpf: Add bpf_mptcpify helper
  selftests/bpf: Test bpf_mptcpify helper
  selftests/bpf: Add mptcpify selftest
  mptcp: refactor push_pending logic

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/79

Geliang Tang (7):
  bpf: Add new prog type sockinit
  bpf: Run a sockinit program
  net: socket: run sockinit hooks
  libbpf: Support sockinit hook
  selftests/bpf: Add mptcpify program
  Squash to "selftests/bpf: add two mptcp netns helpers"
  selftests/bpf: Add mptcpify selftest

 include/linux/bpf-cgroup-defs.h               |   1 +
 include/linux/bpf-cgroup.h                    |  14 ++
 include/linux/bpf_types.h                     |   2 +
 include/uapi/linux/bpf.h                      |   8 ++
 kernel/bpf/cgroup.c                           |  90 +++++++++++++
 kernel/bpf/syscall.c                          |   7 +
 kernel/bpf/verifier.c                         |   1 +
 net/socket.c                                  |   6 +
 tools/include/uapi/linux/bpf.h                |   8 ++
 tools/lib/bpf/libbpf.c                        |   3 +
 tools/lib/bpf/libbpf_probes.c                 |   1 +
 .../bpf/cgroup_getset_retval_hooks.h          |   1 +
 .../testing/selftests/bpf/prog_tests/mptcp.c  | 124 +++++++++++++++---
 .../selftests/bpf/prog_tests/section_names.c  |   5 +
 tools/testing/selftests/bpf/progs/mptcpify.c  |  26 ++++
 15 files changed, 277 insertions(+), 20 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/mptcpify.c

-- 
2.35.3
Re: [PATCH mptcp-next v4 0/7] BPF 'force to MPTCP'
Posted by Matthieu Baerts 10 months ago
Hi Geliang,

On 05/07/2023 08:56, Geliang Tang wrote:
> v4:
>  - add hooks in __sock_create().

Thank you for this new version!

I had a very quick look: it seems nice!

Personally, I don't know the BPF environment well enough to give a good
review and judge if the direction you took is the good one. Then, I
wonder if it would not be better to rebase this series on top of
bpf-next and send a first (RFC?) version to BPF maintainers to get some
feedbacks (with MPTCP list in CC of course). WDYT?

In this case, it will be important to mention in the cover-letter what
is the goal (e.g. create a different socket and the main use-case is
MPTCP) and why it is interesting to do that with BPF (see my previous
email [1] -- I also updated the ticket [2]). Don't hesitate to add a
link to the v3 explaining what was the limitations.
I can help reviewing the new cover-letter if needed.

[1]
https://lore.kernel.org/mptcp/7d4ccbc9-17b6-28cf-9046-c7f81401ee60@tessares.net/
[2] https://github.com/multipath-tcp/mptcp_net-next/issues/79

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net