All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Salopek <denis.salopek@sartura.hr>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
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: Tue, 16 Feb 2021 19:00:16 +0100	[thread overview]
Message-ID: <YCwIMN3btcpQbIxZ@gmail.com> (raw)
In-Reply-To: <CAEf4Bzab4fZm04xR+3DYEHNaxAoaNM+hZFdYWGJ_qk1fNyAitQ@mail.gmail.com>

On Mon, Feb 08, 2021 at 09:44:59PM -0800, Andrii Nakryiko wrote:
> 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!
> 

Hi Andrii,

I'll also implement the LRU and per-CPU ones and resubmit. I don't quite
understand the test_progs, what kind of test(s) exactly should I add there?

Denis

> >  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-16 18:00 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
2021-02-16 18:00   ` Denis Salopek [this message]
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=YCwIMN3btcpQbIxZ@gmail.com \
    --to=denis.salopek@sartura.hr \
    --cc=andrii.nakryiko@gmail.com \
    --cc=bpf@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.