mbox series

[bpf-next,v2,0/8] add netns helpers

Message ID cover.1715821541.git.tanggeliang@kylinos.cn (mailing list archive)
Headers show
Series add netns helpers | expand

Message

Geliang Tang May 16, 2024, 1:13 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

This patchset addresses Alexei's comment for commit "Handle SIGINT
when creating netns" [1]. Export local helpers create_netns() and
cleanup_netns() defined in mptcp.c into network_helpers.c as generic
ones. For this another helper unshare_netns() is added to replace
the existing local helpers create_netns().

v2:
 - drop patch 9, it breaks CI
 - delete netns first before adding it in patch 4
 - move cleanup_netns behind create_netns in patch 6

[1]
https://patchwork.kernel.org/project/mptcp/patch/20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-1-e2bcbdf49857@kernel.org/

Geliang Tang (8):
  selftests/bpf: Add unshare_netns helper
  selftests/bpf: Use unshare_netns helper
  selftests/bpf: Drop duplicate create_netns
  selftests/bpf: Export create_netns helper
  selftests/bpf: Use create_netns helper
  selftests/bpf: Export cleanup_netns helper
  selftests/bpf: Use cleanup_netns helper
  selftests/bpf: Use netns helpers in lwt tests

 tools/testing/selftests/bpf/network_helpers.c | 68 +++++++++++++++++++
 tools/testing/selftests/bpf/network_helpers.h |  3 +
 .../selftests/bpf/prog_tests/assign_reuse.c   | 12 +---
 .../selftests/bpf/prog_tests/bind_perm.c      | 11 +--
 .../bpf/prog_tests/bpf_iter_setsockopt.c      | 13 +---
 .../bpf/prog_tests/btf_skc_cls_ingress.c      |  6 +-
 .../selftests/bpf/prog_tests/crypto_sanity.c  |  3 +-
 .../selftests/bpf/prog_tests/decap_sanity.c   |  6 +-
 .../selftests/bpf/prog_tests/fib_lookup.c     |  8 +--
 .../selftests/bpf/prog_tests/lwt_helpers.h    | 26 ++-----
 .../selftests/bpf/prog_tests/lwt_redirect.c   |  2 -
 .../selftests/bpf/prog_tests/lwt_reroute.c    |  2 -
 .../testing/selftests/bpf/prog_tests/mptcp.c  | 22 +-----
 .../bpf/prog_tests/ns_current_pid_tgid.c      |  9 +--
 .../selftests/bpf/prog_tests/setget_sockopt.c | 10 +--
 .../selftests/bpf/prog_tests/sk_assign.c      |  4 +-
 .../selftests/bpf/prog_tests/sock_destroy.c   |  9 +--
 .../selftests/bpf/prog_tests/sock_fields.c    | 13 +---
 .../bpf/prog_tests/sock_iter_batch.c          |  9 +--
 .../bpf/prog_tests/tcp_custom_syncookie.c     |  5 +-
 .../bpf/prog_tests/tcp_hdr_options.c          | 13 +---
 .../bpf/prog_tests/xdp_dev_bound_only.c       |  3 +-
 .../bpf/prog_tests/xdp_do_redirect.c          |  4 +-
 23 files changed, 106 insertions(+), 155 deletions(-)

Comments

MPTCP CI May 16, 2024, 2:01 a.m. UTC | #1
Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf (only bpftest_all): Script error! ❓
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/9104996269

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/5396ea8608af
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=853539


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)