From: Daniel Borkmann <daniel@iogearbox.net>
To: Vadim Kochan <vadim4j@gmail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] tc class: Show class names from file
Date: Sun, 15 Mar 2015 21:47:00 +0100 [thread overview]
Message-ID: <5505EFC4.1070403@iogearbox.net> (raw)
In-Reply-To: <1425400878-7608-1-git-send-email-vadim4j@gmail.com>
Hi Vadim,
On 03/03/2015 05:41 PM, Vadim Kochan wrote:
> From: Vadim Kochan <vadim4j@gmail.com>
>
> It is possible to use class names from file /etc/iproute2/cls_names
> which tc will use when showing class info:
>
> # tc/tc -nm class show dev lo
> class htb 1:10 parent 1:1 leaf 10: prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> class htb 1:1 root rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> class htb web#1:20 parent 1:1 leaf 20: prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> class htb 1:2 root rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b
> class htb 1:30 parent 1:1 leaf 30: prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
> class htb voip#1:40 parent 1:2 leaf 40: prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b
> class htb 1:50 parent 1:2 leaf 50: prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b
> class htb 1:60 parent 1:2 leaf 60: prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b
>
> or to specify via file path:
>
> # tc/tc -nm -cf /tmp/cls_names class show dev lo
>
> Class names file contains simple "maj:min name" structure:
>
> 1:20 web
> 1:40 voip
>
> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
in your patch, there are a couple of malloc() calls in your db
creation, that you should check if they actually fail, see i.e.
db_names_alloc(). Would be good if you could follow-up with a fix.
Thanks,
Daniel
next prev parent reply other threads:[~2015-03-15 20:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 16:41 [PATCH iproute2] tc class: Show class names from file Vadim Kochan
2015-03-03 17:58 ` Stephen Hemminger
2015-03-03 18:52 ` Vadim Kochan
2015-03-06 0:27 ` Stephen Hemminger
2015-03-06 11:06 ` Vadim Kochan
2015-03-15 19:29 ` Stephen Hemminger
2015-03-15 20:47 ` Daniel Borkmann [this message]
2015-03-16 13:22 ` Vadim Kochan
2015-03-16 14:46 ` Daniel Borkmann
2015-03-16 14:42 ` Vadim Kochan
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=5505EFC4.1070403@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=vadim4j@gmail.com \
/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).