Re: [PATCH iproute2-next] tc: full JSON support for 'bpf' actions

2019-02-06 Thread Davide Caratti
On Tue, 2019-02-05 at 14:59 -0800, David Ahern wrote: > On 2/5/19 2:53 PM, Stephen Hemminger wrote: > > On Thu, 31 Jan 2019 18:58:09 +0100 > > Davide Caratti wrote: > > > > > + print_uint(PRINT_ANY, "code", "%hu ", ops[i].code); > > > + print_uint(PRINT_ANY, "jt", "%hhu ", ops[i].

Re: [PATCH iproute2-next] tc: full JSON support for 'bpf' actions

2019-02-05 Thread David Ahern
On 2/5/19 2:53 PM, Stephen Hemminger wrote: > On Thu, 31 Jan 2019 18:58:09 +0100 > Davide Caratti wrote: > >> +print_uint(PRINT_ANY, "code", "%hu ", ops[i].code); >> +print_uint(PRINT_ANY, "jt", "%hhu ", ops[i].jt); >> +print_uint(PRINT_ANY, "jf", "%hhu ", ops[

Re: [PATCH iproute2-next] tc: full JSON support for 'bpf' actions

2019-02-05 Thread Stephen Hemminger
On Thu, 31 Jan 2019 18:58:09 +0100 Davide Caratti wrote: > + print_uint(PRINT_ANY, "code", "%hu ", ops[i].code); > + print_uint(PRINT_ANY, "jt", "%hhu ", ops[i].jt); > + print_uint(PRINT_ANY, "jf", "%hhu ", ops[i].jf); Did you know that print_uint promotes the

Re: [PATCH iproute2-next] tc: full JSON support for 'bpf' actions

2019-02-03 Thread David Ahern
On 1/31/19 10:58 AM, Davide Caratti wrote: > Add full JSON output support in the dump of 'act_bpf'. > > Example using eBPF: > > # tc actions flush action bpf > # tc action add action bpf object bpf/action.o section 'action-ok' > # tc -j action list action bpf | jq > [ >{ > "total act

[PATCH iproute2-next] tc: full JSON support for 'bpf' actions

2019-01-31 Thread Davide Caratti
Add full JSON output support in the dump of 'act_bpf'. Example using eBPF: # tc actions flush action bpf # tc action add action bpf object bpf/action.o section 'action-ok' # tc -j action list action bpf | jq [ { "total acts": 1 }, { "actions": [ { "order": 0