From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH bpf-next] bpf: show in bpftool map overview whether btf is available Date: Thu, 19 Jul 2018 17:45:57 +0200 Message-ID: <22a5d2b8-7303-ec64-2cfe-7d9b00ebe67d@iogearbox.net> References: <20180718091942.2963-1-daniel@iogearbox.net> <20180718110836.3ff5f81a@cakuba.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: alexei.starovoitov@gmail.com, netdev@vger.kernel.org To: Jakub Kicinski Return-path: Received: from www62.your-server.de ([213.133.104.62]:49912 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731236AbeGSQ3p (ORCPT ); Thu, 19 Jul 2018 12:29:45 -0400 In-Reply-To: <20180718110836.3ff5f81a@cakuba.lan> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 07/18/2018 08:08 PM, Jakub Kicinski wrote: > On Wed, 18 Jul 2018 11:19:42 +0200, Daniel Borkmann wrote: >> For a quick overview in 'bpftool map' display 'btf' if it's >> available for the dump for a specific map: >> >> # bpftool map list >> 11: array flags 0x0 btf >> key 4B value 20B max_entries 40 memlock 4096B >> >> # bpftool --json --pretty map list >> [{ >> "id": 11, >> "type": "array", >> "flags": 0, >> "btf_available": true, >> "bytes_key": 4, >> "bytes_value": 20, >> "max_entries": 40, >> "bytes_memlock": 4096 >> } >> ] >> >> Signed-off-by: Daniel Borkmann > > Hmm.. would it make sense to provide the actual BTF IDs instead of just > yes/no? At least in JSON? Yeah that sounds reasonable to me. I think in that case it needs to be BTF id as well as key and value id inside that BTF object to make some sense out of it (BTF id alone would not be enough). Probably makes sense to show the same information in plain text output then.