[PATCH mptcp-next v4 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.1733733573.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                               | 34 +++++++++----------
tools/testing/selftests/bpf/progs/mptcp_bpf.h |  1 -
.../selftests/bpf/progs/mptcp_bpf_iters.c     | 11 +++---
6 files changed, 27 insertions(+), 27 deletions(-)
[PATCH mptcp-next v4 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>

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):
  mptcp: update bpf_mptcp_sock_from_subflow
  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                               | 34 +++++++++----------
 tools/testing/selftests/bpf/progs/mptcp_bpf.h |  1 -
 .../selftests/bpf/progs/mptcp_bpf_iters.c     | 11 +++---
 6 files changed, 27 insertions(+), 27 deletions(-)

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

On 09/12/2024 09:47, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> 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.

Thank you for the new versions. I have some additional questions, see my
comment on the individual patches.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v4 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: Unstable: 1 failed test(s): selftest_mptcp_connect 🔴
- 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/12232272946

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


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)