bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Denis Salopek <denis.salopek@sartura.hr>
Cc: bpf <bpf@vger.kernel.org>, Luka Perkov <luka.perkov@sartura.hr>,
	Luka Oreskovic <luka.oreskovic@sartura.hr>,
	Juraj Vijtiuk <juraj.vijtiuk@sartura.hr>
Subject: Re: [PATCH bpf-next] bpf: add lookup_and_delete_elem support to hashtab
Date: Mon, 8 Feb 2021 21:44:59 -0800	[thread overview]
Message-ID: <CAEf4Bzab4fZm04xR+3DYEHNaxAoaNM+hZFdYWGJ_qk1fNyAitQ@mail.gmail.com> (raw)
In-Reply-To: <YBGe5WFzSc3Z8Oh5@gmail.com>

On Wed, Jan 27, 2021 at 9:15 AM Denis Salopek <denis.salopek@sartura.hr> wrote:
>
> Extend the existing bpf_map_lookup_and_delete_elem() functionality to
> hashtab maps, in addition to stacks and queues.
> Create a new hashtab bpf_map_ops function that does lookup and deletion
> of the element under the same bucket lock and add the created map_ops to
> bpf.h.
> Add the appropriate test case to 'maps' selftests.
>
> Signed-off-by: Denis Salopek <denis.salopek@sartura.hr>
> Cc: Juraj Vijtiuk <juraj.vijtiuk@sartura.hr>
> Cc: Luka Oreskovic <luka.oreskovic@sartura.hr>
> Cc: Luka Perkov <luka.perkov@sartura.hr>
> ---

I think this patch somehow got lost, even though it seems like a good
addition. I'd recommend rebasing and re-submitting to let people take
a fresh look at this.

It would also be nice to have a test_progs test added, not just
test_maps. I'd also look at supporting lookup_and_delete for other
kinds of hash maps (LRU, per-CPU), so that the support is more
complete. Thanks!

>  include/linux/bpf.h                     |  1 +
>  kernel/bpf/hashtab.c                    | 38 +++++++++++++++++++++++++
>  kernel/bpf/syscall.c                    |  9 ++++++
>  tools/testing/selftests/bpf/test_maps.c |  7 +++++
>  4 files changed, 55 insertions(+)
>

[...]

  reply	other threads:[~2021-02-09  5:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 17:12 [PATCH bpf-next] bpf: add lookup_and_delete_elem support to hashtab Denis Salopek
2021-02-09  5:44 ` Andrii Nakryiko [this message]
2021-02-16 18:00   ` Denis Salopek
2021-02-23  0:53     ` Andrii Nakryiko
     [not found] ` <74e61161-3330-88b8-aa18-84d7357cd945@iogearbox.net>
2021-02-10 17:56   ` Denis Salopek
2021-02-11  0:25     ` Daniel Borkmann
2021-02-16 19:46       ` Denis Salopek

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=CAEf4Bzab4fZm04xR+3DYEHNaxAoaNM+hZFdYWGJ_qk1fNyAitQ@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=denis.salopek@sartura.hr \
    --cc=juraj.vijtiuk@sartura.hr \
    --cc=luka.oreskovic@sartura.hr \
    --cc=luka.perkov@sartura.hr \
    /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).