[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190115175215.11816afd@cakuba.netronome.com>
Date: Tue, 15 Jan 2019 17:52:15 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, ast@...nel.org,
daniel@...earbox.net, quentin.monnet@...ronome.com
Subject: Re: [PATCH bpf-next 0/6] bpftool: support queue and stack
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.)?
Powered by blists - more mailing lists