All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ireneusz Szcześniak" <irek.szczesniak@gmail.com>
To: netdev@vger.kernel.org
Subject: tc: problem with nested classes
Date: Sun, 22 Apr 2012 14:52:09 +0200	[thread overview]
Message-ID: <4F93FEF9.2050307@gmail.com> (raw)

I have a problem understanding nested classes in tc (traffic control).

To introduce the problem, I briefly describe how I think the tc works. 
  There are qdiscs, classes and filters.  A qdisc can have classes, 
and filters configured for this qdisc classify packets.  When a packet 
is enqueue to a qdisc, filters decide which class the packet belongs 
to, i.e. filters classify packets.  Each class has a qdisc, by default 
the pfifo class, and so classifying implies enqueing a packet in the 
queue of class the packet was classified to.

Therefore I would claim that a class cannot have another class as a 
child, because the child should be a qdisc.  However, Example 1 shows 
that I'm wrong.

Example 1
---------

tc qdisc add dev eth0 root handle 1:0 htb
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 10mbit
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 1mbit

In this example class 1:1 is a parent of both classes 1:2 and 1:3.

QUESTION 1: Does class 1:1 have a queue?

Example 2 implements the same functionality as Example 1, I think.

Example 2
---------

tc qdisc add dev eth0 root handle 1:0 htb
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 10mbit
tc qdisc add dev eth0 parent 1:1 handle 2:0 htb
tc class add dev eth0 parent 2:0 classid 2:1 htb rate 1mbit

QUESTION 2: Is there a difference between Example 1 and Example 2?

QUESTION 3: What is "-d" for in "tc -s -d qdisc"

QUESTION 4: How can I view the statistics for default queues of 
classes, those pfifo queues?  "tc -s qdisc" doesn't show them.

QUESTION 5: Why in filters there is used "flowid" instead of "parent"?

I would appreciate it if someone could answer my questions.

-- 
Ireneusz (Irek) Szczesniak
http://www.irkos.org

                 reply	other threads:[~2012-04-22 12:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4F93FEF9.2050307@gmail.com \
    --to=irek.szczesniak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.