From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>
Cc: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH bpf-next/net v2 7/7] selftests/bpf: Add mptcp_subflow bpf_iter subtest
Date: Fri, 24 Jan 2025 10:13:38 +0100 [thread overview]
Message-ID: <71409ffc-ef6c-4520-941c-ec048c7e4ac0@kernel.org> (raw)
In-Reply-To: <5313b129-72b1-4fdc-954e-e2d0a141a99c@linux.dev>
Hi Geliang,
(only with the MPTCP list)
On 24/01/2025 02:38, Martin KaFai Lau wrote:
> On 12/19/24 7:46 AM, Matthieu Baerts (NGI0) wrote:
>> +SEC("cgroup/getsockopt")
>> +int iters_subflow(struct bpf_sockopt *ctx)
>> +{
>> + struct mptcp_subflow_context *subflow;
>> + struct bpf_sock *sk = ctx->sk;
>> + struct sock *ssk = NULL;
>> + struct mptcp_sock *msk;
>> + int local_ids = 0;
>> +
>> + if (ctx->level != SOL_TCP || ctx->optname != TCP_IS_MPTCP)
>> + return 1;
>> +
>> + msk = bpf_skc_to_mptcp_sock(sk);
>> + if (!msk || msk->pm.server_side || !msk->pm.subflows)
>> + return 1;
>> +
>> + msk = bpf_mptcp_sock_acquire(msk);
>> + if (!msk)
>> + return 1;
>> + bpf_for_each(mptcp_subflow, subflow, msk) {
>> + /* Here MPTCP-specific packet scheduler kfunc can be called:
>> + * this test is not doing anything really useful, only to
>> + * verify the iteration works.
>> + */
>> +
>> + local_ids += subflow->subflow_id;
>> +
>> + /* only to check the following kfunc works */
>> + ssk = mptcp_subflow_tcp_sock(subflow);
>
> It is good to have test cases to exercise the new iter and kfunc. Thanks.
>
> However, it seems not useful to show how it will be used in the future
> packet/subflow scheduler. iiuc, the core piece is in bpf_struct_ops.
> Without it, it is hard to comment. Any RFC patches ready to be posted?
If it is easier, we can probably share a link to your git repo
containing the WIP patches.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-01-24 9:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 15:46 [PATCH bpf-next/net v2 0/7] bpf: Add mptcp_subflow bpf_iter support Matthieu Baerts (NGI0)
2024-12-19 15:46 ` [PATCH bpf-next/net v2 1/7] bpf: Extend bpf_skc_to_mptcp_sock to MPTCP sock Matthieu Baerts (NGI0)
2024-12-19 15:46 ` [PATCH bpf-next/net v2 2/7] bpf: Allow use of skc_to_mptcp_sock in cg_sockopt Matthieu Baerts (NGI0)
2024-12-19 15:46 ` [PATCH bpf-next/net v2 3/7] bpf: Register mptcp common kfunc set Matthieu Baerts (NGI0)
2024-12-19 15:46 ` [PATCH bpf-next/net v2 4/7] bpf: Add mptcp_subflow bpf_iter Matthieu Baerts (NGI0)
2025-01-24 0:47 ` Martin KaFai Lau
2025-01-24 9:10 ` Matthieu Baerts
2025-01-30 12:05 ` Matthieu Baerts
2024-12-19 15:46 ` [PATCH bpf-next/net v2 5/7] bpf: Acquire and release mptcp socket Matthieu Baerts (NGI0)
2025-01-24 1:26 ` Martin KaFai Lau
2024-12-19 15:46 ` [PATCH bpf-next/net v2 6/7] selftests/bpf: More endpoints for endpoint_init Matthieu Baerts (NGI0)
2024-12-19 15:46 ` [PATCH bpf-next/net v2 7/7] selftests/bpf: Add mptcp_subflow bpf_iter subtest Matthieu Baerts (NGI0)
2025-01-24 1:38 ` Martin KaFai Lau
2025-01-24 9:13 ` Matthieu Baerts [this message]
2025-01-15 9:39 ` [PATCH bpf-next/net v2 0/7] bpf: Add mptcp_subflow bpf_iter support Matthieu Baerts
2025-01-17 0:06 ` Martin KaFai Lau
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=71409ffc-ef6c-4520-941c-ec048c7e4ac0@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
/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