All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Spiliotis <gspiliot@yahoo.com>
To: lartc@vger.kernel.org
Subject: [LARTC] [tcng] Is there a bug in tcc or my code is wrong?
Date: Thu, 17 Apr 2003 12:55:50 +0000	[thread overview]
Message-ID: <marc-lartc-105058420021749@msgid-missing> (raw)

Dear list members,

I think there must be something wrong with my code or the
tcng package has a small bug...

First, the rules are simple: everything from 10.0.0.80 gets
full priority whereas anything else gets a 80/20 rate
depending if the packets are comming from 10.0.0.1 or not:

# TCSIM input: file demo.tcc
#define FLOW(n) TCP_PCK($ip_src\x10.0.0.##n) \
                        0 x 960 /* 1000-header = 960 bytes
*/

dev eth0 100kbps {
    egress {
        prio {
                class ( 1 ) \
                        if ip_src = 10.0.0.80 { sfq; };
                class ( 2 ) if 1 {
                  htb (quantum 2ms) {
                    class (rate 100kbps, ceil 100kbps) {
                      class (rate 80kbps, ceil 100kbps) \
                        if ip_src = 10.0.0.1 {sfq;}
                      class (rate 20kbps, ceil 100kbps) \
                        if 1 {sfq;}
                    }
                  }
                }
        }
    }
}

every 0.05s until 1s send FLOW(80);
every 0.05s until 6s send FLOW(1);
every 0.05s until 7s send FLOW(2);
time 3s;
every 0.05s until 4s send FLOW(80);
time 10s;
end;

If we graph the above with the command:
tcsim demo.tcc | tcsim_filter src | tcsim_plot -a 20
we see that both 10.0.0.1 and 10.0.0.2 get 50% despite the
fact of the above "if" in the htb class. If we observe the
output from tcc on the above source we can see that we get
the "tc filter" command for the parent htb class and not on
the htb qdisc! This results in the filters for the htb
qdisc never to be consulted! Have a look:

command: tcc demo-src.tcc
....
tc qdisc add dev eth0 handle 1:0 root dsmark indices 4
default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 prio
tc qdisc add dev eth0 handle 3:0 parent 2:1 sfq perturb 1
tc qdisc add dev eth0 handle 4:0 parent 2:2 htb
tc class add dev eth0 parent 4:0 classid 4:1 htb rate
12500bps ceil 12500bps quantum 25000
tc class add dev eth0 parent 4:1 classid 4:2 htb rate
11250bps ceil 12500bps quantum 22500
tc qdisc add dev eth0 handle 5:0 parent 4:2 sfq
tc class add dev eth0 parent 4:1 classid 4:3 htb rate
1250bps ceil 12500bps quantum 2500
tc qdisc add dev eth0 handle 6:0 parent 4:3 sfq
tc filter add dev eth0 parent 4:1 protocol all prio 1 u32
match u32 0xa000001 0xffffffff at 12 classid 4:2
....                          ^^^ oups! should be 4.0!!

Is there something I am missing from the code in order to
attach the filters to the htb qdisc and not the borrowing
class?

George.

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

                 reply	other threads:[~2003-04-17 12:55 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=marc-lartc-105058420021749@msgid-missing \
    --to=gspiliot@yahoo.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.