On Sat, 2020-11-28 at 12:21 +0000, Luca Boccassi wrote: > As reported by a Debian user, mqprio output in json mode is > invalid: > > { > "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} > } > > json-ify it, while trying to maintain the same formatting > for standard output. > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972784 > > Reported-by: Roméo GINON <romeo.gi...@ilexia.com> > Signed-off-by: Luca Boccassi <bl...@debian.org> > --- > v1: I do not have hardware where I can configure mqprio, so I can't > really > test this apart from compiling it. Stephen and David, do you have > machines > where you can quickly check that this works as expected? Thanks! > > v2: the original reporter tested the patch and reported this is the > new output: > > { > "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" > } > } > > Changed in v2 to make the inner queues arrays anonymous > ("" -> NULL for open/close_json_array) > > Still would appreciate testing from someone else who has hardware > that supports this feature and can enable this, as I am flying blind.
The reporter confirmed the json output is now valid with this patch on the debian bug report. -- Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part