From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>,
mptcp@lists.linux.dev, Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v9 0/7] add mptcp_subflow bpf_iter
Date: Tue, 15 Oct 2024 12:59:28 +0200 [thread overview]
Message-ID: <c869bcb2-121d-49dc-9da4-199ad8f8a692@kernel.org> (raw)
In-Reply-To: <651738088acd25abefb3f20f4120d608a1ac3966.camel@kernel.org>
On 15/10/2024 11:20, Geliang Tang wrote:
> Hi Matt,
>
> On Tue, 2024-10-15 at 11:01 +0200, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> Thank you for your reply!
>>
>> On 15/10/2024 09:27, Geliang Tang wrote:
>>> Hi Matt,
>>>
>>> Thanks for this review.
>>>
>>> On Mon, 2024-10-14 at 18:08 +0200, Matthieu Baerts wrote:
>>>> Hi Geliang,
>>>>
>>>> On 09/10/2024 12:05, 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/11252652867
>>>>
>>>> I was looking at applying this series, but there are some issues
>>>> reported by the CI:
>>>>
>>>> warning: symbol 'bpf_*mptcp_*' was not declared. Should it be
>>>> static?
>>>>
>>>> Could it be possible to have a fix for that please before
>>>> applying
>>>> the
>>>> series?
>>>
>>> No fix is needed, just ignore these warnings.
>>
>> If possible, I would prefer not to ignore these warnings, because
>> other
>> CI might report the same issue. I didn't check, but can you not
>> simply
>> declare these new helpers as "static"? It looks like we can have
>> kfunc
>> declared as static, no?
>
> No, "static" doesn't work.
Could we declare them in protocol.h? Or is it not enough?
>>> This error is also
>>> reported in other places:
>>>
>>> $ make C=1 -o net/socket.o
>>> CALL scripts/checksyscalls.sh
>>> DESCEND objtool
>>> INSTALL libsubcmd_headers
>>> DESCEND bpf/resolve_btfids
>>> INSTALL libsubcmd_headers
>>> CC net/socket.o
>>> CHECK net/socket.c
>>> net/socket.c:1704:21: warning: symbol 'update_socket_protocol' was
>>> not
>>> declared. Should it be static?
>>
>> In this example, you are showing one symbol that has been added for
>> MPTCP, maybe we forgot something :)
>
> Do you mean we should name it as "mptcp_update_socket_protocol"? No
> need. It's a public hook for any protocol.
No sorry, I just wanted to say that it is probably not a good example,
because this helper has been introduced by you, and we have maybe missed
something to avoid the warning.
>>> It seems that it is because "-Wmissing-declarations" is not
>>> recognized
>>> by sparse
>>
>> I don't see complains about that when introducing new kfunc, maybe we
>> are supposed to do something else to avoid that?
>
> I have no idea yet. You can listen to the opinions of BPF maintainers
> when you are in upstream.
I will try to get an answer before, just not to have to modify the CI to
ignore all these cases if there is no need to.
>>>> I guess you are missing __bpf_kfunc_start_defs() and
>>>> __bpf_kfunc_end_defs() around the declaration of the BPF
>>>> dedicated
>>>> kfunc, no?
>>>
>>> No. __bpf_kfunc_start_defs() and __bpf_kfunc_end_defs() are indeed
>>> used
>>> in patch 2.
>>
>> Thanks, I missed that.
>>
>>>> Also, where should I apply these patches? Before "mptcp: add
>>>> sched_data
>>>> helpers"?
>>>
>>> Yes, before "mptcp: add sched_data helpers", after "selftests/bpf:
>>> Add
>>> mptcp subflow subtest".
>>
>> OK!
>>
>>>> But then there should not be any dependences on the BPF
>>>> scheduler work (and I think that would be better without this
>>>> dependence, see my comment on patch 4/7)
>>>
>>> This set doesn't have any dependence on the BPF packet scheduler
>>> since
>>> the selftest is added as a ftrace. It somehow depends on packet
>>> scheduler since it invoke some packet scheduler functions such as
>>> mptcp_subflow_active() and bpf_mptcp_subflow_tcp_sock().
>>
>> OK, but if I insert the series just after "selftests/bpf: Add mptcp
>> subflow subtest",
>
> "selftests/bpf: Add mptcp subflow subtest" has been upstreamed. It
> should be before "mptcp: add sched_data helpers".
>
>> it will not have access to mptcp_subflow_active().
>
> The access to mptcp_subflow_active() is added in patch 1 "bpf: Register
> mptcp common kfunc set" in this set.
Ah OK, I didn't know I had to include them in patch 1: the commit
message mentions them, but it was not clear to me that I had to import
them from another patch when resolving the conflicts.
Next time, don't hesitate to add a squash-to patch before, removing the
code from one commit (even if it is going to be placed after), and
mention the order ;)
>
> The whole order is (from bottom to top):
>
> selftests/bpf: Add bpf scheduler test
> bpf: Add bpf_mptcp_sched_kfunc_set
> bpf: Add bpf_mptcp_sched_ops
> mptcp: add sched_data helpers
> selftests/bpf: Add mptcp_subflow bpf_iter subtest
> Squash to "selftests/bpf: Add bpf scheduler test"
> selftests/bpf: More endpoints for endpoint_init
> selftests/bpf: Add mptcp_subflow bpf_iter test prog
> bpf: Add mptcp_sock acquire and release helpers
> bpf: Add mptcp_subflow bpf_iter
> bpf: Register mptcp common kfunc set
> selftests/bpf: Add mptcp subflow subtest
> selftests/bpf: Add getsockopt to inspect mptcp subflow
> selftests/bpf: Add mptcp subflow example
Thanks, that's clearer!
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-10-15 10:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 9:45 [PATCH mptcp-next v9 0/7] add mptcp_subflow bpf_iter Geliang Tang
2024-10-09 9:45 ` [PATCH mptcp-next v9 1/7] bpf: Register mptcp common kfunc set Geliang Tang
2024-10-09 9:45 ` [PATCH mptcp-next v9 2/7] bpf: Add mptcp_subflow bpf_iter Geliang Tang
2024-10-09 9:45 ` [PATCH mptcp-next v9 3/7] bpf: Add mptcp_sock acquire and release helpers Geliang Tang
2024-10-09 9:45 ` [PATCH mptcp-next v9 4/7] selftests/bpf: Add mptcp_subflow bpf_iter test prog Geliang Tang
2024-10-14 16:06 ` Matthieu Baerts
2024-10-15 7:59 ` Geliang Tang
2024-10-15 10:47 ` Matthieu Baerts
2024-10-18 1:22 ` Geliang Tang
2024-10-18 10:56 ` Matthieu Baerts
2024-10-09 9:45 ` [PATCH mptcp-next v9 5/7] selftests/bpf: More endpoints for endpoint_init Geliang Tang
2024-10-09 9:45 ` [PATCH mptcp-next v9 6/7] Squash to "selftests/bpf: Add bpf scheduler test" Geliang Tang
2024-10-09 9:45 ` [PATCH mptcp-next v9 7/7] selftests/bpf: Add mptcp_subflow bpf_iter subtest Geliang Tang
2024-10-09 10:05 ` [PATCH mptcp-next v9 0/7] add mptcp_subflow bpf_iter MPTCP CI
2024-10-14 16:08 ` Matthieu Baerts
2024-10-15 7:27 ` Geliang Tang
2024-10-15 9:01 ` Matthieu Baerts
2024-10-15 9:20 ` Geliang Tang
2024-10-15 10:59 ` Matthieu Baerts [this message]
2024-10-15 11:07 ` Matthieu Baerts
2024-10-18 1:35 ` Geliang Tang
2024-10-15 9:38 ` Geliang Tang
2024-10-15 11:10 ` Matthieu Baerts
2024-10-09 10:54 ` MPTCP CI
2024-10-11 22:27 ` Mat Martineau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c869bcb2-121d-49dc-9da4-199ad8f8a692@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=tanggeliang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox