[PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter

Geliang Tang posted 5 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1725946276.git.tanggeliang@kylinos.cn
There is a newer version of this series
net/mptcp/bpf.c                               | 54 ++++++++++--
net/mptcp/protocol.h                          |  2 -
.../testing/selftests/bpf/bpf_experimental.h  |  7 ++
.../testing/selftests/bpf/prog_tests/mptcp.c  | 85 +++++++++++++++++++
tools/testing/selftests/bpf/progs/mptcp_bpf.h |  4 +
.../selftests/bpf/progs/mptcp_bpf_iter.c      | 38 +++++++++
6 files changed, 183 insertions(+), 7 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_iter.c
[PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter
Posted by Geliang Tang 1 month ago
From: Geliang Tang <tanggeliang@kylinos.cn>

v3:
 - drop bpf_iter__mptcp_subflow, __diag_push, __diag_pop and
 __diag_ignore_all
 - drop declarations for bpf kfuncs

v2:
 - update patch 1 as Martin and Andrii suggested.
 - fix warnings and errors reported by MPTCP CI.

This patch set adds a mptcp_subflow type bpf_iter, and self tests.

Geliang Tang (5):
  bpf: Add mptcp_subflow bpf_iter
  Squash to "mptcp: add sched_data helpers"
  bpf: Register mptcp tracing kfunc set
  selftests/bpf: Add mptcp_subflow bpf_iter test prog
  selftests/bpf: Add mptcp_subflow bpf_iter subtest

 net/mptcp/bpf.c                               | 54 ++++++++++--
 net/mptcp/protocol.h                          |  2 -
 .../testing/selftests/bpf/bpf_experimental.h  |  7 ++
 .../testing/selftests/bpf/prog_tests/mptcp.c  | 85 +++++++++++++++++++
 tools/testing/selftests/bpf/progs/mptcp_bpf.h |  4 +
 .../selftests/bpf/progs/mptcp_bpf_iter.c      | 38 +++++++++
 6 files changed, 183 insertions(+), 7 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_iter.c

-- 
2.43.0
Re: [PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter
Posted by MPTCP CI 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 (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10786552827

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


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)
Re: [PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter
Posted by MPTCP CI 1 month ago
Hi Geliang,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

  https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10786552828

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

Feel free to reply to this email if you cannot access logs, if you need
some support to fix the error, if this doesn't seem to be caused by your
modifications or if the error is a false positive one.

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Re: [PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter
Posted by Geliang Tang 1 month ago
On Tue, 2024-09-10 at 06:02 +0000, MPTCP CI wrote:
> Hi Geliang,
> 
> Thank you for your modifications, that's great!
> 
> But sadly, our CI spotted some issues with it when trying to build
> it.
> 
> You can find more details there:
> 
>  
> https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10786552828
> 
> Status: failure

These errors reported by CI should be ignored:

Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
net/mptcp/bpf.c:215:17: warning: symbol 'bpf_iter_mptcp_subflow_new'
was not declared. Should it be static?
Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
net/mptcp/bpf.c:228:42: warning: symbol 'bpf_iter_mptcp_subflow_next'
was not declared. Should it be static?
Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
net/mptcp/bpf.c:243:18: warning: symbol
'bpf_iter_mptcp_subflow_destroy' was not declared. Should it be static?
Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
net/mptcp/bpf.c:247:42: warning: symbol 'bpf_mptcp_subflow_ctx_by_pos'
was not declared. Should it be static?

Thanks,
-Geliang

> Initiator: Patchew Applier
> Commits:
> https://github.com/multipath-tcp/mptcp_net-next/commits/ed6d012aaff4
> Patchwork:
> https://patchwork.kernel.org/project/mptcp/list/?series=888713
> 
> Feel free to reply to this email if you cannot access logs, if you
> need
> some support to fix the error, if this doesn't seem to be caused by
> your
> modifications or if the error is a false positive one.
> 
> Cheers,
> MPTCP GH Action bot
> Bot operated by Matthieu Baerts (NGI0 Core)
> 

Re: [PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter
Posted by Matthieu Baerts 1 month ago
Hi Geliang,

On 10/09/2024 08:30, Geliang Tang wrote:
> On Tue, 2024-09-10 at 06:02 +0000, MPTCP CI wrote:
>> Hi Geliang,
>>
>> Thank you for your modifications, that's great!
>>
>> But sadly, our CI spotted some issues with it when trying to build
>> it.
>>
>> You can find more details there:
>>
>>  
>> https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10786552828
>>
>> Status: failure
> 
> These errors reported by CI should be ignored:
> 
> Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> net/mptcp/bpf.c:215:17: warning: symbol 'bpf_iter_mptcp_subflow_new'
> was not declared. Should it be static?
> Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> net/mptcp/bpf.c:228:42: warning: symbol 'bpf_iter_mptcp_subflow_next'
> was not declared. Should it be static?
> Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> net/mptcp/bpf.c:243:18: warning: symbol
> 'bpf_iter_mptcp_subflow_destroy' was not declared. Should it be static?
> Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> net/mptcp/bpf.c:247:42: warning: symbol 'bpf_mptcp_subflow_ctx_by_pos'
> was not declared. Should it be static?

Can we not squash patch 1/5 and 3/5 together?

It is strange to add the helpers but not using them, then register them
in another patch.

Or did you split them to ease the review on BPF side?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

Re: [PATCH mptcp-next v3 0/5] add mptcp_subflow bpf_iter
Posted by Geliang Tang 1 month ago
Hi Matt,

On Tue, 2024-09-10 at 09:56 +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 10/09/2024 08:30, Geliang Tang wrote:
> > On Tue, 2024-09-10 at 06:02 +0000, MPTCP CI wrote:
> > > Hi Geliang,
> > > 
> > > Thank you for your modifications, that's great!
> > > 
> > > But sadly, our CI spotted some issues with it when trying to
> > > build
> > > it.
> > > 
> > > You can find more details there:
> > > 
> > >  
> > > https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10786552828
> > > 
> > > Status: failure
> > 
> > These errors reported by CI should be ignored:
> > 
> > Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> > net/mptcp/bpf.c:215:17: warning: symbol
> > 'bpf_iter_mptcp_subflow_new'
> > was not declared. Should it be static?
> > Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> > net/mptcp/bpf.c:228:42: warning: symbol
> > 'bpf_iter_mptcp_subflow_next'
> > was not declared. Should it be static?
> > Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> > net/mptcp/bpf.c:243:18: warning: symbol
> > 'bpf_iter_mptcp_subflow_destroy' was not declared. Should it be
> > static?
> > Unable to compile mptcp source code with make C=1 net/mptcp/bpf.o:
> > net/mptcp/bpf.c:247:42: warning: symbol
> > 'bpf_mptcp_subflow_ctx_by_pos'
> > was not declared. Should it be static?
> 
> Can we not squash patch 1/5 and 3/5 together?
> 
> It is strange to add the helpers but not using them, then register
> them
> in another patch.

It's a bit strange indeed. It's better to register them in
common_btf_ids in kernel/bpf/helpers.c, not in
bpf_mptcp_sched_kfunc_ids in net/mptcp/bpf.c.

I'll send two squash-to patches to fix this.

Thanks,
-Geliang

> 
> Or did you split them to ease the review on BPF side?
> 
> Cheers,
> Matt