On Mon, 15 Jun 2020 22:29:28 +0300 Anton Danilov <littlesmilingcl...@gmail.com> wrote:
> There wasn't a way to get a qdisc info by handle or parent, only full > dump of qdisc's with following grep/sed usage. > > The 'qdisc get' command have been added. > > tc qdisc { show | get } [ dev STRING ] [ QDISC_ID ] [ invisible ] > QDISC_ID := { root | ingress | handle QHANDLE | parent CLASSID } > > This change doesn't require any changes in the kernel. > > Signed-off-by: Anton Danilov <littlesmilingcl...@gmail.com> The idea looks good, but you need to conform to the kernel style. Look at these checkpatch warnings. ERROR: space required before the open parenthesis '(' #210: FILE: tc/tc_qdisc.c:397: + if(get_tc_classid(&handle, *argv)) { WARNING: else is not generally useful after a break or return #214: FILE: tc/tc_qdisc.c:401: + break; + } else { ERROR: space required before the open parenthesis '(' #224: FILE: tc/tc_qdisc.c:411: + if(get_qdisc_handle(&handle, *argv)) { WARNING: else is not generally useful after a break or return #228: FILE: tc/tc_qdisc.c:415: + break; + } else { ERROR: space prohibited before that close parenthesis ')' #292: FILE: tc/tc_qdisc.c:478: + || matches(*argv, "lst") == 0 || matches(*argv, "get") == 0 ) total: 3 errors, 2 warnings, 182 lines che