All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@fomichev.me>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Stanislav Fomichev <sdf@google.com>,
	netdev@vger.kernel.org, davem@davemloft.net, ast@kernel.org,
	daniel@iogearbox.net, quentin.monnet@netronome.com
Subject: Re: [PATCH bpf-next 0/6] bpftool: support queue and stack
Date: Wed, 16 Jan 2019 08:52:54 -0800	[thread overview]
Message-ID: <20190116165254.GD726@mini-arch> (raw)
In-Reply-To: <20190115175215.11816afd@cakuba.netronome.com>

On 01/15, Jakub Kicinski wrote:
> On Tue, 15 Jan 2019 15:22:46 -0800, Stanislav Fomichev wrote:
> > This patch series add support for queue/stack manipulations.
> > 
> > It goes like this:
> > 
> > #1 and #2 add support for queue/stack in existing 'update' and 'lookup'
> > commands by permitting empty keys.
> > #3 make sure we don't print empty keys for queue/stack.
> > #4 adds peek command, it's essentially an alias for 'lookup'.
> > #5 adds push/enqueue commands, an alias to 'update'.
> > #6 adds pop/dequeue commands that use bpf_map_lookup_and_delete_elem.
> > 
> > (Not sure whether it makes sense to have push/enqueue + pop/dequeue or
> > just have push/pop for both stack/queue, comments are welcome).
> 
> Other than one part of last patch looks good!
> 
> I'd personally be tempted to only allow the peek/push/pop commands for
> stacks/queues, i.e. for maps which don't have a key.  Right now even
> though the help says:
> 
> 	**bpftool** **map peek**       *MAP*
> 
> it's just an alias to lookup, so key can be specified..
> 
> Could bash completions also only suggest them when the map type is
> right (and perhaps vice versa - not suggest lookup etc.)?
I can look into bash completion. I'm not at all familiar with it.

Also, let me maybe add some checks in the do_lookup/do_update which
print an error in case key is specified when info->key_size is zero (and
the same for value).

      reply	other threads:[~2019-01-16 16:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 23:22 [PATCH bpf-next 0/6] bpftool: support queue and stack Stanislav Fomichev
2019-01-15 23:22 ` [PATCH bpf-next 1/6] bpftool: make key and value optional in update command Stanislav Fomichev
2019-01-15 23:22 ` [PATCH bpf-next 2/6] bpftool: make key optional in lookup command Stanislav Fomichev
2019-01-15 23:22 ` [PATCH bpf-next 3/6] bpftool: don't print empty key/value for maps Stanislav Fomichev
2019-01-15 23:22 ` [PATCH bpf-next 4/6] bpftool: add peek command Stanislav Fomichev
2019-01-15 23:22 ` [PATCH bpf-next 5/6] bpftool: add push and enqueue commands Stanislav Fomichev
2019-01-15 23:22 ` [PATCH bpf-next 6/6] bpftool: add pop and dequeue commands Stanislav Fomichev
2019-01-16  1:46   ` Jakub Kicinski
2019-01-16 16:45     ` Stanislav Fomichev
2019-01-16  1:52 ` [PATCH bpf-next 0/6] bpftool: support queue and stack Jakub Kicinski
2019-01-16 16:52   ` Stanislav Fomichev [this message]

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=20190116165254.GD726@mini-arch \
    --to=sdf@fomichev.me \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=quentin.monnet@netronome.com \
    --cc=sdf@google.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 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.