From: Jakub Kicinski Subject: Re: [PATCH iproute2 5/5] bpf: implement btf handling and map annotation Date: Wed, 18 Jul 2018 18:01:32 -0700 Message-ID: <20180718180132.4818fa08@cakuba.netronome.com> References: <20180717233122.29390-1-daniel@iogearbox.net> <20180717233122.29390-6-daniel@iogearbox.net> <20180717172743.6e5e1231@cakuba.lan> <20180718235234.mffkuwph4w3ja4rs@kafai-mbp.dhcp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Daniel Borkmann , , , To: Martin KaFai Lau Return-path: Received: from mail-qk0-f195.google.com ([209.85.220.195]:40538 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730635AbeGSBmH (ORCPT ); Wed, 18 Jul 2018 21:42:07 -0400 Received: by mail-qk0-f195.google.com with SMTP id c126-v6so3439907qkd.7 for ; Wed, 18 Jul 2018 18:01:37 -0700 (PDT) In-Reply-To: <20180718235234.mffkuwph4w3ja4rs@kafai-mbp.dhcp.thefacebook.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 18 Jul 2018 16:52:34 -0700, Martin KaFai Lau wrote: > On Tue, Jul 17, 2018 at 05:27:43PM -0700, Jakub Kicinski wrote: > > On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote: > > > # bpftool map dump id 386 > > > [{ > > > "key": 0, > > > "value": { > > > "": { > > > "value": 0, > > > "ifindex": 0, > > > "mac": [] > > > } > > > } > > > },{ > > > "key": 1, > > > "value": { > > > "": { > > > "value": 0, > > > "ifindex": 0, > > > "mac": [] > > > } > > > } > > > },{ > > > [...] > > > > Ugh, the empty keys ("") look worrying, we should probably improve > > handling of anonymous structs in bpftool :S > Note that the kernel's btf_verifier_log is using "(anon)" in this case. > Not sure if it is a good idea for json. "(anon)" sounds good, we should probably add some id to it in JSON in case there are multiple.