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} } Could be correct { "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" } } STDOUT malformated : [ { "kind": "noqueue", "handle": "0:", "dev": "lo", "root": true, "refcnt": 2, "options": {} },{ "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} },{ "kind": "pfifo_fast", "handle": "0:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021: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:", "dev": "enp1s0f0", "parent": "8021:1", "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:", "dev": "enp0s31f6", "root": true, "refcnt": 2, "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "mqprio", "handle": "8001:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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:", "dev": "enp1s0f1", "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 } },{ "kind": "mqprio", "handle": "800a:", "dev": "enp1s0f2", "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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a: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:", "dev": "enp1s0f2", "parent": "800a:1", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "mqprio", "handle": "800b:", "dev": "enp1s0f3", "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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b: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:", "dev": "enp1s0f3", "parent": "800b:1", "options": { "bands": 3, "priomap ": [ 1,2,2,2,1,2,0,0,1,1,1,1,1,1,1,1 ], "multiqueue": false } },{ "kind": "dsmark", "handle": "1:", "dev": "enp1s0f3.1900", "root": true, "refcnt": 2, "options": {indices 0x0040 set_tc_index } },{ "kind": "noqueue", "handle": "0:", "dev": "enp1s0f2.10", "root": true, "refcnt": 2, "options": {} } ] Environment : Linux 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux ip utility, iproute2-ss190107 iproute2 4.20.0-2 amd64 networking and traffic control tools Package: iproute2 Status: install ok installed Priority: important Section: net Installed-Size: 2585 Maintainer: Alexander Wirt <formo...@debian.org> Architecture: amd64 Multi-Arch: foreign Version: 4.20.0-2 Replaces: iproute Provides: arpd Depends: debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.27), libcap2 (>= 1:2.10), libdb5.3, libelf1 (>= 0.131), libmnl0 (>= 1.0.3-4~), libselinux1 (>= 2.0.15), libxtables12 (>= 1.6.0+snapshot201611 17), libcap2-bin Recommends: libatm1 (>= 2.4.1-17~) Suggests: iproute2-doc Conflicts: arpd, iproute (<< 20130000-1) Conffiles: /etc/iproute2/bpf_pinning fd070252e6e9996bd04d9d59e4ce21eb /etc/iproute2/ematch_map 0e0f36cafc6a9cf76bc704cfd8f96ece /etc/iproute2/group 3aea2c0e0dd75e13a5f8f48f2936915f /etc/iproute2/nl_protos 393e42fa549d0974eb66d576675779c2 /etc/iproute2/rt_dsfield 4c80d267a84d350d89d88774efe48a0f /etc/iproute2/rt_protos 7b2dc3e981ec34331766ba9d219670aa /etc/iproute2/rt_protos.d/README 88e45597012c565f9a10ffef1bc14312 /etc/iproute2/rt_realms 7137bdf40e8d58c87ac7e3bba503767f /etc/iproute2/rt_scopes 6298b8df09e9bda23ea7da49021ca457 /etc/iproute2/rt_tables a1313318d6778fe6b8c680248ef5a463 /etc/iproute2/rt_tables.d/README 18bfdabbd4d5b14eae350720ea5ff431 Description: networking and traffic control tools The iproute2 suite is a collection of utilities for networking and traffic control. . These tools communicate with the Linux kernel via the (rt)netlink interface, providing advanced features not available through the legacy net-tools commands 'ifconfig' and 'route'. Homepage: https://wiki.linuxfoundation.org/networking/iproute2 I remain at your disposal should you have any questions concerning this matter. Regards, <http://www.ilexia.com/> <https://tinyurl.com/ybzbpf7s> 96 rue Orfila 75020 Paris <http://www.ilexia.com/> www.ilexia.com Roméo GINON CTO <mailto:romeo.gi...@ilexia.com> romeo.gi...@ilexia.com