From: Geliang Tang <geliang.tang@suse.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v8 13/17] selftests/bpf: Add bpf_burst scheduler
Date: Tue, 13 Jun 2023 22:03:38 +0800 [thread overview]
Message-ID: <20230613140338.GA22458@bogon> (raw)
In-Reply-To: <b8e34248d35aa358e60966c95d22453dd1b89ba9.camel@redhat.com>
On Tue, Jun 13, 2023 at 03:36:32PM +0200, Paolo Abeni wrote:
> On Tue, 2023-06-13 at 20:32 +0800, Geliang Tang wrote:
> > On Mon, Jun 12, 2023 at 04:22:31PM +0200, Paolo Abeni wrote:
> > > """
> > > Basically any access to:
> > >
> > > btf_type.array_field[valid_and_validated_variable_index]
> > >
> > > is not allowed.
> > > """
> > >
> > > The above should be:
> > >
> > > for (int i=0; i < data->number_of_subflows; i++) {
> > > context = mptcp_subflow_ctx_by_pos(i);
> > > // ...
> > > }
> >
> > "for (int i = 0; i < data->subflows; i++)" will get an error too:
> >
> > The sequence of 8193 jumps is too complex.
>
> Oops, the joy of loop unrolling! :( I almost forgot about that.
>
> I guess/hope/think that changing this definition:
>
> struct mptcp_sched_data {
> struct sock *last_snd;
> int snd_burst;
> bool reinject;
> int subflows;
> struct mptcp_subflow_context *contexts[MPTCP_SUBFLOWS_MAX];
> };
>
> to:
>
> struct mptcp_sched_data {
> struct sock *last_snd;
> int snd_burst;
> bool reinject;
> s8 subflow;
> struct mptcp_subflow_context *contexts[MPTCP_SUBFLOWS_MAX];
> };
>
> should "address" the issue (basically 'subflow' should have the minimum
> size possible.
>
> Or possibly even better, simply:
>
> for (int i = 0; i < < MIN(data->subflows, MPTCP_SUBFLOWS_MAX); i++)
>
>
> Or you could try using the bpf_loop() helper, even if that *looks*
> slow.
"for (int i = 0; i < min(data->subflows, MPTCP_SUBFLOWS_MAX); i++)"
doesn't work but this works:
for (int i = 0; i < data->subflows && i < MPTCP_SUBFLOWS_MAX; i++)
So I just updated the patch and sent it to ML, named "mptcp: make the
contexts array of sched_data invisible in BPF". Please give me some
suggestions about it.
Thanks,
-Geliang
>
>
> Cheers,
>
> Paolo
>
next prev parent reply other threads:[~2023-06-13 14:03 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 5:46 [PATCH mptcp-next v8 00/17] BPF packet scheduler updates Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 01/17] Squash to "mptcp: drop last_snd and MPTCP_RESET_SCHEDULER" Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 02/17] Squash to "mptcp: add struct mptcp_sched_ops" Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 03/17] Squash to "mptcp: add scheduler wrappers" Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 04/17] mptcp: add last_snd in sched_data Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 05/17] mptcp: add snd_burst " Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 06/17] mptcp: register default scheduler Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 07/17] Squash to "bpf: Add bpf_mptcp_sched_ops" Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 08/17] Squash to "selftests/bpf: Add mptcp sched structs" Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 09/17] Squash to "selftests/bpf: Add bpf_rr scheduler" Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 10/17] mptcp: add two wrappers needed by bpf_burst Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 11/17] bpf: Add bpf_burst write accesses Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 12/17] bpf: Export more bpf_burst related functions Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 13/17] selftests/bpf: Add bpf_burst scheduler Geliang Tang
2023-06-09 9:57 ` Paolo Abeni
2023-06-09 13:32 ` Geliang Tang
2023-06-09 14:40 ` Paolo Abeni
2023-06-10 1:45 ` Geliang Tang
2023-06-12 11:05 ` Paolo Abeni
2023-06-12 13:29 ` Geliang Tang
2023-06-12 14:22 ` Paolo Abeni
2023-06-13 5:36 ` Geliang Tang
2023-06-13 9:35 ` Paolo Abeni
2023-06-13 12:32 ` Geliang Tang
2023-06-13 13:36 ` Paolo Abeni
2023-06-13 14:03 ` Geliang Tang [this message]
2023-06-13 14:18 ` Paolo Abeni
2023-06-08 5:46 ` [PATCH mptcp-next v8 14/17] selftests/bpf: Add bpf_burst test Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 15/17] bpf: Add subflow bit flags write accesses Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 16/17] selftests/bpf: Add bpf_stale scheduler Geliang Tang
2023-06-08 5:46 ` [PATCH mptcp-next v8 17/17] selftests/bpf: Add bpf_stale test Geliang Tang
2023-06-08 6:29 ` selftests/bpf: Add bpf_stale test: Build Failure MPTCP CI
2023-06-08 6:56 ` selftests/bpf: Add bpf_stale test: Tests Results MPTCP CI
2023-06-13 10:08 ` selftests/bpf: Add bpf_stale test: Build Failure MPTCP CI
2023-06-13 10:57 ` selftests/bpf: Add bpf_stale test: Tests Results MPTCP CI
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=20230613140338.GA22458@bogon \
--to=geliang.tang@suse.com \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
/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