From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [PATCH bpf-next] bpf: show in bpftool map overview whether btf is available Date: Wed, 18 Jul 2018 11:08:36 -0700 Message-ID: <20180718110836.3ff5f81a@cakuba.lan> References: <20180718091942.2963-1-daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: alexei.starovoitov@gmail.com, netdev@vger.kernel.org To: Daniel Borkmann Return-path: Received: from mail-pg1-f171.google.com ([209.85.215.171]:39858 "EHLO mail-pg1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeGRSrn (ORCPT ); Wed, 18 Jul 2018 14:47:43 -0400 Received: by mail-pg1-f171.google.com with SMTP id g2-v6so2353899pgs.6 for ; Wed, 18 Jul 2018 11:08:40 -0700 (PDT) In-Reply-To: <20180718091942.2963-1-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: 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?