Re: [PATCH iproute2-next v2] tc: full JSON support for 'bpf' filter
From: David Ahern <hidden>
Date: 2020-05-05 16:21:21
From: David Ahern <hidden>
Date: 2020-05-05 16:21:21
On 4/30/20 12:03 PM, Davide Caratti wrote:
example using eBPF:
# tc filter add dev dummy0 ingress bpf \
> direct-action obj ./bpf/filter.o sec tc-ingress
# tc -j filter show dev dummy0 ingress | jq
[
{
"protocol": "all",
"pref": 49152,
"kind": "bpf",
"chain": 0
},
{
"protocol": "all",
"pref": 49152,
"kind": "bpf",
"chain": 0,
"options": {
"handle": "0x1",
"bpf_name": "filter.o:[tc-ingress]",
"direct-action": true,
"not_in_hw": true,
"prog": {
"id": 101,
"tag": "a04f5eef06a7f555",
"jited": 1
}
}
}
]
v2:
- use print_nl(), thanks to Andrea Claudi
- use print_0xhex() for filter handle, thanks to Stephen Hemminger
Signed-off-by: Davide Caratti <redacted>
---
tc/f_bpf.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
applied to iproute2-next. Thanks,