From: Stephen Hemminger <stephen@networkplumber.org>
To: Anton Danilov <littlesmilingcloud@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] tc: qdisc: filter qdisc's by parent/handle specification
Date: Mon, 15 Jun 2020 16:12:19 -0700 [thread overview]
Message-ID: <20200615161219.23d15ed8@hermes.lan> (raw)
In-Reply-To: <20200615192928.6667-1-littlesmilingcloud@gmail.com>
On Mon, 15 Jun 2020 22:29:28 +0300
Anton Danilov <littlesmilingcloud@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 <littlesmilingcloud@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
prev parent reply other threads:[~2020-06-15 23:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 19:29 [PATCH iproute2] tc: qdisc: filter qdisc's by parent/handle specification Anton Danilov
2020-06-15 23:12 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615161219.23d15ed8@hermes.lan \
--to=stephen@networkplumber.org \
--cc=littlesmilingcloud@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).