lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 15 Jun 2020 16:12:19 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Anton Danilov <littlesmilingcloud@...il.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] tc: qdisc: filter qdisc's by parent/handle
 specification

On Mon, 15 Jun 2020 22:29:28 +0300
Anton Danilov <littlesmilingcloud@...il.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 <littlesmilingcloud@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ