From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B5BDC43387 for ; Wed, 16 Jan 2019 01:52:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4806220866 for ; Wed, 16 Jan 2019 01:52:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="pWkHGeai" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbfAPBwW (ORCPT ); Tue, 15 Jan 2019 20:52:22 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37848 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbfAPBwV (ORCPT ); Tue, 15 Jan 2019 20:52:21 -0500 Received: by mail-qt1-f193.google.com with SMTP id t33so5404358qtt.4 for ; Tue, 15 Jan 2019 17:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=gTZ9T4LIALdyETlQZd5vsC1Xow5nEfsLPDGXO9NzcZk=; b=pWkHGeaiMAqNyDqHuEbP6/Snirp9qBfc31Y8h+EyVe/dSEv/ZBFHyEsMESEhJyz8WZ Wf+sjlFNDgN0uE7qyGLSoWyTn0TDFDoQe3ybFAXBgeszNbQPCti4Cxu1bbn4d2dPEdp0 c/N2wBvZaMalyIh6MuAsQOXsXMURkGzu/1HlD7dC+Kmfypo06rLiYb3x+LexZTArVmS/ Vpkwt7FXym3ow6RMQnEMVlHG4BEqhyZXhXll+t5bVdhK3t/MFuoH9rbTU24GFstbyWjT QDxWKAEJFu//CPPlEPln6blq226k+az/0tWdGQVzcRWi9juiDKdn7MxMGcMhGjhOqs14 TvxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=gTZ9T4LIALdyETlQZd5vsC1Xow5nEfsLPDGXO9NzcZk=; b=BcJWfeoJquizkW0ZtCDOVhEH2vU1sWcemZXDKcksW72EkJNEEMlbePKNpciDt7r9FE ua8DN4GyViDoSAe8ZsB037O5djGoCB3goIF6e9Lve7DPYuc79clCF1Hb2RxMKTZJEvVi M3i+cTiEqCAERlByeL3G+dItJIIB0nF00S0ZcbY2YM7ibMRuhiKcZ35hIE9f7lBKLokf D9TKP9QFhiIGI7opdQuKLu23i3WDWYM8+bKu3b0VgEJNBLyH/iw9j5eAIfVClZYaGtR2 xZdNkaz5IYx8XX7a9NtuX/2XhccxpUNEorAtLf6se7PmjPBSCK5dwqXYnUYZAX4AfktB ek7Q== X-Gm-Message-State: AJcUukfHP2ZH724H3rCR6IOxkJHe8voJqCY3hxMG1vCGbRL/uy7texE6 c/TvVIBW0k4jA8HgshuojO1UnQ== X-Google-Smtp-Source: ALg8bN4bWO59aeh+PZT5DUmeBK97eKeFi8lHRmKUNkXXOeZi1R4odv2H2D3SK5alifbv2Po0zN0/jA== X-Received: by 2002:aed:2c65:: with SMTP id f92mr5167457qtd.47.1547603540867; Tue, 15 Jan 2019 17:52:20 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id p42sm50906510qte.8.2019.01.15.17.52.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jan 2019 17:52:20 -0800 (PST) Date: Tue, 15 Jan 2019 17:52:15 -0800 From: Jakub Kicinski To: Stanislav Fomichev Cc: 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 Message-ID: <20190115175215.11816afd@cakuba.netronome.com> In-Reply-To: <20190115232252.5736-1-sdf@google.com> References: <20190115232252.5736-1-sdf@google.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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.)?