Hello,
It's better but still malformated (ip utility, iproute2-ss190107 + patch 1407305 ). Please find below output result. Thank you for your consideration, let me know if you need more tests. tc -j -p qdisc show dev enp1s0f0 [ { "kind": "mqprio", "handle": "8001:", "root": true, "options": { "tc": 2, "map": [ 0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0 ], "queues": [ "": [ 0,3 ], "": [ 4,7 ] ], "mode": "channel", "shaper": "dcb" } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:8", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:7", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:6", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:5", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:4", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:3", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:2", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "pfifo_fast", "handle": "0:", "parent": "8001:1", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } } ] tc qdisc show dev enp1s0f0 qdisc mqprio 8001: root tc 2 map 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 queues:(0:3) (4:7) mode:channel shaper:dcb qdisc pfifo_fast 0: parent 8001:8 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 8001:7 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 8001:6 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 8001:5 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 8001:4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 8001:3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 8001: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 8001:1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 Regards, Romeo GINON -----Message d'origine----- De : Luca Boccassi <bl...@debian.org> Envoyé : 27 novembre 2020 16:31 À : 972...@bugs.debian.org Cc : romeo.gi...@ilexia.com Objet : Re: Malformated JSON on tc qdisc Control: tags -1 forwarded patch On Fri, 23 Oct 2020 16:08:31 +0200 =?iso-8859-1?Q?ILEXIA_-_Rom=E9o_GINON?= < <mailto:romeo.gi...@ilexia.com> romeo.gi...@ilexia.com> wrote: > Package: iproute2 > > Version: 4.20.0-2 > > Severity : important > > > > I have some issues with JSON output on tc qdisc. > > > > Impact : tc command return malformated json when using mqprio with > priomap or dsmark. > > On both test case ("kind": "dsmark" or "kind": "mqprio" with "root": > true) associated "options" are not in a valid json format. > > > > > > Test Case : > > 1: /usr/sbin/tc qdisc add dev $IFACE root mqprio num_tc 2 queues 4@0 > 4@4 hw > 1 mode channel map 0 0 0 1 0 1 0 0' > > 2: /usr/sbin/tc qdisc add dev $IFACE handle 1:0 root dsmark indices > 64 set_tc_index > > > > Command : tc -j -p qdisc show > > > > > > > Malformated > > > { > > "kind": "mqprio", > > "handle": "8021:", > > "dev": "enp1s0f0", > > "root": true, > > "options": { tc 2 map 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 > > queues:(0:3) (4:7) > > mode:channel > > shaper:dcb} > I sent a patch upstream to json-ify the output, but I do not have hardware capable of configuring mqprio. If you do and want to help test it, it's here: <https://patchwork.ozlabs.org/project/netdev/patch/20201127152625.61874-1-bl...@debian.org/> https://patchwork.ozlabs.org/project/netdev/patch/20201127152625.61874-1-bl...@debian.org/ -- Kind regards, Luca Boccassi