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.