From: sdf@google.com
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH bpf-next v4] bpf: increase supported cgroup storage value size
Date: Tue, 27 Jul 2021 16:25:51 -0700 [thread overview]
Message-ID: <YQCV/9NtQvtOk0sW@google.com> (raw)
In-Reply-To: <CAEf4BzZJOH1wbQ2BCjaqkYWtW406Oh+UyWt_wM9AtggabY46RQ@mail.gmail.com>
On 07/27, Andrii Nakryiko wrote:
> On Tue, Jul 27, 2021 at 3:23 PM Stanislav Fomichev <sdf@google.com> wrote:
> >
> > Current max cgroup storage value size is 4k (PAGE_SIZE). The other local
> > storages accept up to 64k (BPF_LOCAL_STORAGE_MAX_VALUE_SIZE). Let's
> align
> > max cgroup value size with the other storages.
> >
> > For percpu, the max is 32k (PCPU_MIN_UNIT_SIZE) because percpu
> > allocator is not happy about larger values.
> >
> > netcnt test is extended to exercise those maximum values
> > (non-percpu max size is close to, but not real max).
> >
> > v4:
> > * remove inner union (Andrii Nakryiko)
> > * keep net_cnt on the stack (Andrii Nakryiko)
> >
> > v3:
> > * refine SIZEOF_BPF_LOCAL_STORAGE_ELEM comment (Yonghong Song)
> > * anonymous struct in percpu_net_cnt & net_cnt (Yonghong Song)
> > * reorder free (Yonghong Song)
> >
> > v2:
> > * cap max_value_size instead of BUILD_BUG_ON (Martin KaFai Lau)
> >
> > Cc: Martin KaFai Lau <kafai@fb.com>
> > Cc: Yonghong Song <yhs@fb.com>
> > Cc: Andrii Nakryiko <andrii@kernel.org>
> > Signed-off-by: Stanislav Fomichev <sdf@google.com>
> > ---
> Added Martin's ack and applied to bpf-next. Please carry over received
> Acks between revisions.
Ah, sorry, forgot about it :-(
> It's also a good practice to separate selftest from the kernel (or
> libbpf) changes, unless kernel change doesn't immediately break
> selftest. Please consider doing that for the future.
I've actually seen some back and forth on this one. I used to split
them in the past (assuming it makes it easy to do the
backports/cherry-picks), but I remember at some point it was
suggested not to split them for small changes like this.
Might be a good idea to document this (when and if to separate
libbpf/selftests)
on bpf_devel_QA.rst
> I also just noticed that test_netcnt isn't part of test_progs. It
> would be great to migrate it under the common test_progs
> infrastructure. We've been steadily moving towards that, but there are
> still a bunch of tests that are not run in CI.
SG, I might do a follow up on this one.
next prev parent reply other threads:[~2021-07-27 23:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 22:23 [PATCH bpf-next v4] bpf: increase supported cgroup storage value size Stanislav Fomichev
2021-07-27 23:00 ` patchwork-bot+netdevbpf
2021-07-27 23:00 ` Andrii Nakryiko
2021-07-27 23:25 ` sdf [this message]
2021-07-27 23:48 ` Andrii Nakryiko
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=YQCV/9NtQvtOk0sW@google.com \
--to=sdf@google.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=yhs@fb.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;
as well as URLs for NNTP newsgroup(s).