Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp845215img; Wed, 20 Mar 2019 12:06:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIjBkj1WpujH53bJ7e1uC4O7TTCM8aF1zOzfEuBEtk9LIXUARuySNiL/a8hIrhIoVipdiU X-Received: by 2002:a17:902:1aa:: with SMTP id b39mr8791423plb.317.1553108778887; Wed, 20 Mar 2019 12:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553108778; cv=none; d=google.com; s=arc-20160816; b=pyZ0IydiiLKecc9/QvxHILAnIWd0CIFCaFOjSwUsP1ulOhrJ0rI1fhsIcCWkgGJOdr oYzDFlpJJnm8+v/H0IW7H70UXBtneVxw28X9W5zaxG4jtDXh+ZXJKYjqvsgHm5mJag+B zWBg2Dq4rhWGIXspdim/A4uhnd0Wy38qnuMuTpb1SM1tKKlHRYIfwP4yFOiywb/+LrmK RLpaJdw1w5hDSgSdoaoc6qpTXj+ypj+0OZ95OneuoYbCiqxfKO2ghHhSkGI3582y7IOe BjvmCpk8IsSjDYkLY30DhAuw2fopGN2ZFg9ffRyvt3BDVRCAiK7Cz1ne5RIlBgtZCHbL ks1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=TroIgZLRE0sqz8nvE56EoIevjhw7nnL6S4j85a24D9E=; b=q/SdBtfR9mrC3dV2+GPIdv7xYS8Hhc/daUemE39/ZSN2ONYkMilILovHB5eoEucbdd SDf6NAZ0sR7Y6AgAV4EgGp/Ghqt8uHHco1xCPLw8i2u/+b+y9OvWWmCwUv9e2n0S7Rox 56zX7WX1EznUcmZd4zQhkkNhbQ/PZE4PFsBdnsqyyVM0kqjY7DEKTthAAySbG3xn+Tv+ 3mzX6m93hc1xc8/Me9BsW4ypO6RSxEB9u5wQwPAC+MGjA35kHu9JSy54lceJXssmrHS2 j63nCpWz8iWMDPqzxOc7vHMPh2QhRJrwDtqpOBmR3rKoSq+kmFuq6+cYSnR6892Tp4Au C7cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=N0v1Kct3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s36si2556330pld.342.2019.03.20.12.06.03; Wed, 20 Mar 2019 12:06:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=N0v1Kct3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfCTTFP (ORCPT + 99 others); Wed, 20 Mar 2019 15:05:15 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50734 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbfCTTFO (ORCPT ); Wed, 20 Mar 2019 15:05:14 -0400 Received: by mail-wm1-f68.google.com with SMTP id z11so365426wmi.0 for ; Wed, 20 Mar 2019 12:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TroIgZLRE0sqz8nvE56EoIevjhw7nnL6S4j85a24D9E=; b=N0v1Kct3dlASD1WMaCYDSS+tU/O6zt/D3OH/7Y/RuMB5GfUQefM+ce29gg8U/1hWSz wDKRDU5jNsh7HKUd0909GqZ75GPWes5bL732FyrazmbnvFIuA/aF+Pa0E/pvpic3zzA5 yAG/omm1SN/hlFsyMieHJUE4kE669O2kCutIrFKX3lZPlXMwDzvBZBykbDQGBLYt6kJs R+pjS3DYoV5neCzUJliP+OwqWgtczC8X651Kq2M2pe7UfKMYaifRI3Sb5Y4tZiZ386Xm 6vjLZv3lMtirDgGJxWvFKqY4g3nVOLCk+P5n7VwC2Gno9oTwnKfm72Ob3L4WE2dIonHl maIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=TroIgZLRE0sqz8nvE56EoIevjhw7nnL6S4j85a24D9E=; b=lgPSCuFb5tD0QdTghpx8l/Hi65PMpKYnPYIRIyQxHhXQL0vWZS+nRHZuEbJWNUuRZ8 SRPUX6DmG73tn5rKKVZxM7Kqs0+xJjkXA6xEymkE3qLkNVDD9tuG4PKkrp7TbjeqAYBe eUGL9BMyc7xPOHgmI1ihoA2XyXy5U+hrF/u0mnsGuk+RAqXMeDfxmIc6ejkFBzBpPRcp 6bzwSfuU4FF5E28tjb3Dkcf/ZJI09GM9ksLwlqjRS1SuPY65LbU0njf6n/tD5HYjl+Al K9U3lN3zdFq0y8XCq67+GqACHzf86B/dV/Exr7D1T4LmGWkGn66k2vmOBzhX+Te9E/Sc vDyQ== X-Gm-Message-State: APjAAAXx8TqD1jgA6bm2BfqO662tQ7lb3Oq96rgM9PP+IAmxmgfcMLI7 58b66CL8udVyD+Fkz2B145mDqg== X-Received: by 2002:a1c:4d12:: with SMTP id o18mr9987253wmh.74.1553108712368; Wed, 20 Mar 2019 12:05:12 -0700 (PDT) Received: from [172.20.1.106] ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id w8sm4154825wmc.0.2019.03.20.12.05.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 12:05:11 -0700 (PDT) Subject: Re: [PATCH bpf-next v1 5/7] tools: bpftool: support loading map by fd from parent process To: Alban Crequy , ast@kernel.org, daniel@iogearbox.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alban@kinvolk.io, iago@kinvolk.io References: <20190320173332.18105-1-alban@kinvolk.io> <20190320173332.18105-5-alban@kinvolk.io> From: Quentin Monnet Openpgp: preference=signencrypt Autocrypt: addr=quentin.monnet@netronome.com; prefer-encrypt=mutual; keydata= mQINBFnqRlsBEADfkCdH/bkkfjbglpUeGssNbYr/TD4aopXiDZ0dL2EwafFImsGOWmCIIva2 MofTQHQ0tFbwY3Ir74exzU9X0aUqrtHirQHLkKeMwExgDxJYysYsZGfM5WfW7j8X4aVwYtfs AVRXxAOy6/bw1Mccq8ZMTYKhdCgS3BfC7qK+VYC4bhM2AOWxSQWlH5WKQaRbqGOVLyq8Jlxk 2FGLThUsPRlXKz4nl+GabKCX6x3rioSuNoHoWdoPDKsRgYGbP9LKRRQy3ZeJha4x+apy8rAM jcGHppIrciyfH38+LdV1FVi6sCx8sRKX++ypQc3fa6O7d7mKLr6uy16xS9U7zauLu1FYLy2U N/F1c4F+bOlPMndxEzNc/XqMOM9JZu1XLluqbi2C6JWGy0IYfoyirddKpwzEtKIwiDBI08JJ Cv4jtTWKeX8pjTmstay0yWbe0sTINPh+iDw+ybMwgXhr4A/jZ1wcKmPCFOpb7U3JYC+ysD6m 6+O/eOs21wVag/LnnMuOKHZa2oNsi6Zl0Cs6C7Vve87jtj+3xgeZ8NLvYyWrQhIHRu1tUeuf T8qdexDphTguMGJbA8iOrncHXjpxWhMWykIyN4TYrNwnyhqP9UgqRPLwJt5qB1FVfjfAlaPV sfsxuOEwvuIt19B/3pAP0nbevNymR3QpMPRl4m3zXCy+KPaSSQAR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sfmFuTTliRb3Fl2Q27cEr7kNKlsz/t6vLSEN2 j8x+tWD8x53SEOSn94g2AyJA9Txh2xBhWGuZ9CpBuXjtPrnRSd8xdrw36AL53goTt/NiLHUd RHhSHGnKaQ6MfrTge5Q0h5A= Message-ID: <3db33f2e-f75f-d217-3315-158436523974@netronome.com> Date: Wed, 20 Mar 2019 19:05:11 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190320173332.18105-5-alban@kinvolk.io> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019-03-20 18:33 UTC+0100 ~ Alban Crequy > From: Alban Crequy > > Using a file descriptor passed by the parent process enables > applications to fork a bpftool command to inspect a map they know by > file descriptor even when they don't support bpffs or map ids. > > Documentation and bash completion updated as well. > > Signed-off-by: Alban Crequy > --- > tools/bpf/bpftool/Documentation/bpftool-map.rst | 8 ++++++++ > tools/bpf/bpftool/bash-completion/bpftool | 10 +++++----- > tools/bpf/bpftool/map.c | 13 +++++++++++++ > 3 files changed, 26 insertions(+), 5 deletions(-) > > diff --git a/tools/bpf/bpftool/Documentation/bpftool-map.rst b/tools/bpf/bpftool/Documentation/bpftool-map.rst > index dfd8352fa453..658fe2fb8ecf 100644 > --- a/tools/bpf/bpftool/Documentation/bpftool-map.rst > +++ b/tools/bpf/bpftool/Documentation/bpftool-map.rst > @@ -265,6 +265,14 @@ would be lost as soon as bpftool exits). > > anon_inode:bpf-map > > +**# bpftool map exec pinned /sys/fs/bpf/foo fd 99 cmd -- bpftool map show fd 99** > + > +:: > + > + 10: hash name some_map flags 0x0 > + key 4B value 8B max_entries 2048 memlock 167936B > + > + Could you please also update the description of the command higher in that page, and in the interactive help?