All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Elston <celston@katalix.com>
To: lartc@vger.kernel.org
Subject: Curious breakage with nested prio qdiscs
Date: Wed, 04 Dec 2013 10:10:15 +0000	[thread overview]
Message-ID: <1386151815.32402.16.camel@Desktop> (raw)

Hi all,

Background: I've implemented a system which requires distinct TBF limits
for a large number of different user sessions. Therefore I'm using two
layers of nested prio qdiscs, each with 16 bands - giving a maximum
total of 256 TBF user session limits. Where packets get queued is
determined by iptables packet marks and tc filters (this bit is not
immediately relevant)

I've discovered either a bug, or a major misunderstanding on my part :) 

The following commands:

tc qdisc add dev eth1 root handle 1: prio bands 16
tc qdisc add dev eth1 parent 1:2 handle 11:2 prio bands 16
tc qdisc add dev eth1 parent 11:2 handle 111: tbf rate 65536 burst 15000 latency 70
tc qdisc del dev eth1 parent 11:2 handle 111: tbf rate 65536 burst 15000 latency 70

prevent any traffic from leaving eth1 (tried on kernels 3.8.19 and
3.2.56)

So that's 2 nested prio qdiscs: one at the root, and one in the second
band of the root prio qdisc/

Then I add a TBF to the second band of the nested prio qdisc and
immediately remove it.  This leaves just the nested prio qdiscs in
place, and me unable to ping anything across eth1.

It seems to matter that the handle of the nested prio qdisc is 11:2 -
the values 11:1 and 11:3 don't cause the same problem.

It seems to matter that the nested prio qdisc is in band 2 of the root
prio qdisc - if I try the same with the nested prio qdisc in 1:1 and 1:3
the problem doesn't occur.

Problems only start when the TBF is deleted - it is possible to do all
the add commands and the interface still works.

One would assume that the delete command simply reverses the add
command, but it seems to have some side effect :(

Any thoughts?

Cheers,

Chris.




             reply	other threads:[~2013-12-04 10:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 10:10 Chris Elston [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-09 11:30 Curious breakage with nested prio qdiscs Chris Elston

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=1386151815.32402.16.camel@Desktop \
    --to=celston@katalix.com \
    --cc=lartc@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.