[PATCH mptcp-next v5 0/5] Squash to "Add mptcp_subflow bpf_iter support"

Geliang Tang posted 5 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1733886326.git.tanggeliang@kylinos.cn
There is a newer version of this series
include/net/mptcp.h                           |  4 +-
kernel/bpf/cgroup.c                           |  2 +
net/core/filter.c                             |  2 +-
net/mptcp/bpf.c                               | 41 +++++++++++--------
tools/testing/selftests/bpf/progs/mptcp_bpf.h |  1 -
.../selftests/bpf/progs/mptcp_bpf_iters.c     | 11 +++--
6 files changed, 33 insertions(+), 28 deletions(-)
[PATCH mptcp-next v5 0/5] Squash to "Add mptcp_subflow bpf_iter support"
Posted by Geliang Tang 1 year, 1 month ago
From: Geliang Tang <tanggeliang@kylinos.cn>

v5:
 - update subjects and commit logs as Matt suggested (thanks).
 - avoid repeating checks in patch 1.
 - do stricter checks on subflows in patch 3.

v4:
 - CI reports the following BUILD_BUG_ON fails on i386:

 BUILD_BUG_ON(sizeof(struct bpf_iter_mptcp_subflow_kern) !=
 	      sizeof(struct bpf_iter_mptcp_subflow))

 Just like in bpf_iter_task_new(), change this "!=" to ">".

v3:
 - check sock_owned_by_user_nocheck(sk)/spin_is_locked(&sk->sk_lock.slock),
   instead of lockdep_sock_is_held(sk).
 - add "sizeof" and "alignof" checks.
 - drop bpf_mptcp_sk() and bpf_mptcp_subflow_tcp_sock() definitions. Use
   bpf_skc_to_mptcp_sock() and mptcp_subflow_tcp_sock() in mptcp_subflow
   bpf_iter selftests instead.

v2:
 - add CONFIG_LOCKDEP check in patch 2 to fix the build error reported
   by CI.

Address Martin's comments in v1.

Geliang Tang (5):
  bpf: Extend bpf_skc_to_mptcp_sock to MPTCP sock
  bpf: Allow use of skc_to_mptcp_sock in cg_sockopt
  Squash to "bpf: Register mptcp common kfunc set"
  Squash to "bpf: Add mptcp_subflow bpf_iter"
  Squash to "selftests/bpf: Add mptcp_subflow bpf_iter subtest"

 include/net/mptcp.h                           |  4 +-
 kernel/bpf/cgroup.c                           |  2 +
 net/core/filter.c                             |  2 +-
 net/mptcp/bpf.c                               | 41 +++++++++++--------
 tools/testing/selftests/bpf/progs/mptcp_bpf.h |  1 -
 .../selftests/bpf/progs/mptcp_bpf_iters.c     | 11 +++--
 6 files changed, 33 insertions(+), 28 deletions(-)

-- 
2.45.2
Re: [PATCH mptcp-next v5 0/5] Squash to "Add mptcp_subflow bpf_iter support"
Posted by Matthieu Baerts 1 year ago
Hi Geliang,

On 11/12/2024 04:11, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v5:
>  - update subjects and commit logs as Matt suggested (thanks).
>  - avoid repeating checks in patch 1.
>  - do stricter checks on subflows in patch 3.

(...)

> Geliang Tang (5):
>   bpf: Extend bpf_skc_to_mptcp_sock to MPTCP sock
>   bpf: Allow use of skc_to_mptcp_sock in cg_sockopt
>   Squash to "bpf: Register mptcp common kfunc set"
>   Squash to "bpf: Add mptcp_subflow bpf_iter"
>   Squash to "selftests/bpf: Add mptcp_subflow bpf_iter subtest"

Now in our tree (feat. for others):

New patches for t/upstream:
- 3bf01409a687: bpf: Extend bpf_skc_to_mptcp_sock to MPTCP sock
- d2ffc05b82a9: bpf: Allow use of skc_to_mptcp_sock in cg_sockopt
- 9b47f4d07c92: conflict in t/mptcp-add-bpf_mptcp_sched_ops
- Results: 498a056df60d..dae99806910c (export)

- faea6b4bce3f: "squashed" (with conflicts) patch 3/5 in "bpf: Register
mptcp common kfunc set"
- 7d181ebbf2e9: conflict in t/bpf-Add-mptcp_subflow-bpf_iter
- 53df7927f9db: "squashed" patch 4/5 in "bpf: Add mptcp_subflow bpf_iter"
- 0c9027dda516: "squashed" patch 5/5 in "selftests/bpf: Add
mptcp_subflow bpf_iter subtest"
- Results: dae99806910c..e296bce75fd2 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/11567dcf5c1dc57b7447ad68efcdac83d90d28c2/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v5 0/5] Squash to "Add mptcp_subflow bpf_iter support"
Posted by Matthieu Baerts 1 year ago
Hi Geliang,

On 11/12/2024 04:11, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v5:
>  - update subjects and commit logs as Matt suggested (thanks).
>  - avoid repeating checks in patch 1.
>  - do stricter checks on subflows in patch 3.

Thank you for the new version, it looks good to me!

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v5 0/5] Squash to "Add mptcp_subflow bpf_iter support"
Posted by MPTCP CI 1 year, 1 month ago
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-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/12269151441

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


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)