[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f4806731521546b0bb7011b8c570b52b@poessinger.com>
Date: Thu, 13 Oct 2022 11:17:30 +0000
From: Christian Pössinger <christian@...ssinger.com>
To: "'netdev@...r.kernel.org'" <netdev@...r.kernel.org>
Subject: iproute2/tc invalid JSON in 6.0.0 for flowid
Dear Maintainers,
I am new to the reporting process for iproute2 and this is only my second post
thus please bear with me and my MTA.
$ tc -V
tc utility, iproute2-6.0.0, libbpf 0.3.0
$ tc qdisc add dev eth1 handle ffff: ingress
$ tc filter add dev eth1 parent ffff: prio 20 protocol all u32 match ip dport 80 \
0xffff action police rate 100000 conform-exceed drop burst 15k flowid ffff:1
$ tc qdisc show dev eth1
qdisc mq 0: root
qdisc pfifo_fast 0: parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc ingress ffff: parent ffff:fff1 ----------------
$ tc filter show dev eth1 ingress
filter parent ffff: protocol all pref 20 u32 chain 0
filter parent ffff: protocol all pref 20 u32 chain 0 fh 800: ht divisor 1
filter parent ffff: protocol all pref 20 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid ffff:1 not_in_hw
match 00000050/0000ffff at 20
action order 1: police 0x1 rate 100Kbit burst 15Kb mtu 2Kb action drop overhead 0b
ref 1 bind 1
That output looks good but my use-case is machine reading (JSON) the output
of tc.
$ tc -json filter show dev eth1 ingress
[{"parent":"ffff:","protocol":"all","pref":20,"kind":"u32","chain":0},
{"parent":"ffff:","protocol":"all","pref":20,"kind":"u32","chain":0,"options":{"fh":"800:","ht_divisor":1}},
{"parent":"ffff:","protocol":"all","pref":20,"kind":"u32","chain":0,"options":{"fh":"800::800","order":2048,"key_ht":"800","bkt":"0"flowid ffff:1 ,"not_in_hw":true,"match":{"value":"50","mask":"ffff","offmask":"","off":20},"actions":[{"order":1,"kind":"police","index":1,"control_action":{"type":"drop"},"overhead":0,"ref":1,"bind":1}]}}]
This actually contains invalid JSON here
... "bkt":"0"flowid ffff:1 ,"not_in_hw":true, ...
It should actually read:
... "bkt":"0","flowid":"ffff:1","not_in_hw":true, ...
If you can point me to the location which could be responsible for this issue, I am happy to submit a fix to the net tree.
Thanks in advance,
Christian Poessinger
Powered by blists - more mailing lists