public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Pedro Tammela <pctammela@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Pedro Tammela <pctammela@mojatatu.com>,
	David Verbeiren <david.verbeiren@tessares.net>,
	Matthieu Baerts <matthieu.baerts@tessares.net>,
	"(open list:BPF \\(Safe dynamic programs and tools\\))" 
	<netdev@vger.kernel.org>,
	bpf@vger.kernel.org (open list:BPF \(Safe dynamic programs and
	tools\)),
	"(open list:BPF \\(Safe dynamic programs and tools\\) open
	list)"  <linux-kernel@vger.kernel.org>,
	"(open list:BPF \\(Safe dynamic programs and tools\\) open list
	open list:KERNEL SELFTEST FRAMEWORK)"
	<linux-kselftest@vger.kernel.org> (open list:BPF \(Safe dynamic
	programs and tools\) open list open list:KERNEL SELFTEST
	FRAMEWORK)
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Subject: RE: [PATCH bpf-next 1/3] bpf: add batched ops support for percpu array
Date: Mon, 05 Apr 2021 18:42:21 -0700	[thread overview]
Message-ID: <606bbc7db9d66_d464620822@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <20210404200256.300532-2-pctammela@mojatatu.com>

Pedro Tammela wrote:
> Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com>
> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
> ---

A commit message describing some of the change details and a note it uses
the for-each cpu copies (same as normal syscall on percpu map) and not the
per-cpu ones would be nice. I at least had to go and check the generic_map*
batch operations.

Also something about why generic_map_delete_batch is omitted?

>  kernel/bpf/arraymap.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
> index 463d25e1e67e..3c4105603f9d 100644
> --- a/kernel/bpf/arraymap.c
> +++ b/kernel/bpf/arraymap.c
> @@ -698,6 +698,8 @@ const struct bpf_map_ops percpu_array_map_ops = {
>  	.map_delete_elem = array_map_delete_elem,
>  	.map_seq_show_elem = percpu_array_map_seq_show_elem,
>  	.map_check_btf = array_map_check_btf,
> +	.map_lookup_batch = generic_map_lookup_batch,
> +	.map_update_batch = generic_map_update_batch,
>  	.map_set_for_each_callback_args = map_set_for_each_callback_args,
>  	.map_for_each_callback = bpf_for_each_array_elem,
>  	.map_btf_name = "bpf_array",
> -- 
> 2.25.1
> 



  reply	other threads:[~2021-04-06  1:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04 20:02 [PATCH bpf-next 0/3] add batched ops support for percpu array Pedro Tammela
2021-04-04 20:02 ` [PATCH bpf-next 1/3] bpf: " Pedro Tammela
2021-04-06  1:42   ` John Fastabend [this message]
2021-04-04 20:02 ` [PATCH bpf-next 2/3] libbpf: selftests: refactor 'BPF_PERCPU_TYPE()' and 'bpf_percpu()' macros Pedro Tammela
2021-04-06  5:14   ` John Fastabend
2021-04-04 20:02 ` [PATCH bpf-next 3/3] bpf: selftests: update array map tests for per-cpu batched ops Pedro Tammela

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=606bbc7db9d66_d464620822@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=david.verbeiren@tessares.net \
    --cc=jhs@mojatatu.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=matthieu.baerts@tessares.net \
    --cc=netdev@vger.kernel.org \
    --cc=pctammela@gmail.com \
    --cc=pctammela@mojatatu.com \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --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