netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Kochan <vadim4j@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Vadim Kochan <vadim4j@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 v3] tc: Show classes in tree view
Date: Wed, 24 Dec 2014 23:09:35 +0200	[thread overview]
Message-ID: <20141224210935.GA24242@angus-think.lan> (raw)
In-Reply-To: <20141224121416.77a7a713@urahara>

On Wed, Dec 24, 2014 at 12:14:16PM -0800, Stephen Hemminger wrote:
> On Wed, 24 Dec 2014 02:46:16 +0200
> Vadim Kochan <vadim4j@gmail.com> wrote:
> 
> > From: Vadim Kochan <vadim4j@gmail.com>
> > 
> > Added new '-t[ree]' which shows classes dependency
> > in the tree view. Meanwhile only generic stats info
> > is supported.
> > 
> > e.g.:
> > 
> > $ tc/tc -t class show dev tap0
> > +---(1:2) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > |    +---(1:40) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> > |    +---(1:50) htb rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > |    |    +---(1:51) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > |    |
> > |    +---(1:60) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > |
> > +---(1:1) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> >      +---(1:10) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> >      +---(1:20) htb prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> >      +---(1:30) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > 
> > $ tc/tc -t -s class show dev tap0
> > +---(1:2) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > |    |    Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> > |    |    rate 0bit 0pps backlog 0b 0p requeues 0
> > |    |
> > |    +---(1:40) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> > |    |          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> > |    |          rate 0bit 0pps backlog 0b 0p requeues 0
> > |    |
> > |    +---(1:50) htb rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> > |    |    |     Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> > |    |    |     rate 0bit 0pps backlog 0b 0p requeues 0
> > |    |    |
> > |    |    +---(1:51) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > |    |               Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> > |    |               rate 0bit 0pps backlog 0b 0p requeues 0
> > |    |
> > |    +---(1:60) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> > |               Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> > |               rate 0bit 0pps backlog 0b 0p requeues 0
> > |
> > +---(1:1) htb rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> >      |    Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> >      |    rate 0bit 0pps backlog 0b 0p requeues 0
> >      |
> >      +---(1:10) htb prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> >      |          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> >      |          rate 0bit 0pps backlog 0b 0p requeues 0
> >      |
> >      +---(1:20) htb prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> >      |          Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> >      |          rate 0bit 0pps backlog 0b 0p requeues 0
> >      |
> >      +---(1:30) htb prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> >                 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
> >                 rate 0bit 0pps backlog 0b 0p requeues 0
> > 
> > Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> > ---
> > Changes v3:
> >     Fixed wrong brackets style
> > 
> > Changes v2:
> >     Removed "Date:" from commit message which was added by mistake.
> > 
> > Changes RFC -> PATCH:
> >     #1 get rid of INIT_HLIST_NODE
> >     #2 added sample output to commit message
> >     #3 use "show_tree=1" instead of "show_tree++"
> >     #4 no need update include/hlist.h (because of #1)
> >     #5 changed a little tree output: parentheses around class id instead of qdisc name
> > 
> >  tc/tc.c        |   5 +-
> >  tc/tc_class.c  | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> >  tc/tc_common.h |   2 +
> >  3 files changed, 165 insertions(+), 3 deletions(-)
> 
> I don't get strict about checkpatch. But ran this patch through and there are some minor
> things that would be good to fix.
>   1. Split long lines like:
> WARNING: line over 80 characters
> #198: FILE: tc/tc_class.c:219:
> +static void tree_cls_show(FILE *fp, char *buf, struct hlist_head *root_list, int level)
> 
>   2. Don't use variable name 'childs', makes sense to call it children instead??
> 
>   3. Don't use space before * as in:
> ERROR: "foo * bar" should be "foo *bar"
> #285: FILE: tc/tc_class.c:305:
> +	struct rtattr * tb[TCA_MAX+1] = {};
> 
> 
> 
> 

I will fix them.

  reply	other threads:[~2014-12-24 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24  0:46 [PATCH iproute2 v3] tc: Show classes in tree view Vadim Kochan
2014-12-24 20:14 ` Stephen Hemminger
2014-12-24 21:09   ` Vadim Kochan [this message]
2014-12-24 20:42 ` Stephen Hemminger

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=20141224210935.GA24242@angus-think.lan \
    --to=vadim4j@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).