Re: [LARTC] Data collection in Linux TC queue

2004-07-13 Thread Catalin BOIE
Dear All,
Would you guy have any advices concerning how to get some data like
queue length, pkt size, and so forth, from the running queue.
Queue len, bytes, bps, pps, packets can be obtain by using libnetlink.
What do you mean by pkt size? An average or something for every packet?
Right now, I modified the queue disc to print out some info I want using
printk() and use syslogd to catch those info up. The problem is, in
burst, syslogd can't catch all the msg the queue sent out.
Are there any standard or better way to collect those info from the
queue disc ?
Thank you very much in advance for every advices.
--
Sipat Triukose [EMAIL PROTECTED]
Case Western Reserve University
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Data collection in Linux TC queue

2004-07-13 Thread Catalin BOIE
On Tue, 13 Jul 2004, Sipat Triukose wrote:
Dear Catalin BOIE,
Thank you very much for your advice. I might want to collect pkt size of
all pkt ever enqueue during a period of time. Would you mind please give
me more detail regarding how to use libnetlink or direct me to any
helpful sources. Thank you very much.
You can check out last iproute2 sources.
http://developer.osdl.org/dev/iproute2/

On Tue, 2004-07-13 at 06:13, Catalin BOIE wrote:
Dear All,
Would you guy have any advices concerning how to get some data like
queue length, pkt size, and so forth, from the running queue.
Queue len, bytes, bps, pps, packets can be obtain by using libnetlink.
What do you mean by pkt size? An average or something for every packet?
Right now, I modified the queue disc to print out some info I want using
printk() and use syslogd to catch those info up. The problem is, in
burst, syslogd can't catch all the msg the queue sent out.
Are there any standard or better way to collect those info from the
queue disc ?
Thank you very much in advance for every advices.
--
Sipat Triukose [EMAIL PROTECTED]
Case Western Reserve University
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
--
Sipat Triukose [EMAIL PROTECTED]
Case Western Reserve University
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


RE: [LARTC] TC Hashing Filters

2004-07-13 Thread Catalin BOIE
On Tue, 13 Jul 2004, Adam Towarnyckyj wrote:
First off, no need to be rude. I read the documentation; I just missed
the number limit.
Second, I know it's in hex and that's what I'm using.
Third, the script is rather large. I didn't want to post even a snippet
because it is so big. But, if that's what you require in order to give
me some advice, then here it is:
Show me the command that fails.
Action($tc qdisc del dev $dev root);
Action($tc qdisc add dev $dev root handle 1:0 cbq bandwidth 200mbit
avpkt 1000);
# Create 'transit class', tc hash tables, and hash filter
Action($tc class add dev $dev parent 1: classid 1:2 cbq bandwidth
200Mbit rate 200MBit allot 1514 weight 2Mbit prio 8 maxburst 20 avpkt
1000);
Action($tc filter add dev $dev parent 1: handle 2: protocol ip u32
divisor 256);
Action($tc filter add dev $dev protocol ip parent 1: u32 match ip dst
0.0.0.0/0 hashkey mask 0x00ff at 16 link 2:);
# Create classes for rate groups
@RATES = SelectSQL(SELECT dsrate FROM dsrate);
my $classid = 3;
foreach $dsrate (@RATES) {
   $ds = $$dsrate{dsrate};
   if ($ds == 0 || $ds == 1) {
   next;
   }
   Action($tc class add dev eth1 parent 1: classid 1:$classid cbq
bandwidth 200Mbit rate $$dsrate{dsrate}Kbit allot 1514 prio 5 maxburst
20 avpkt 1000 bounded);
   $rates{$ds} = $classid;
   $classid++;
}
# Get our list of accounts
@MODEMS = SelectSQL(SELECT mid, dsrate FROM modems);
$z = 0;
# Figure out account IPs and put 'em in!
foreach $modem (@MODEMS) {
   if ($$modem{dsrate} == 0 || $$modem{dsrate} == 1) {
   next;
   }
   my @COMPUTERS = SelectSQL(SELECT ipid FROM computers WHERE
mid='$$modem{mid}');
   foreach $computer (@COMPUTERS) {
   my $ip = SelectSingleSQL(SELECT ipaddr FROM ips WHERE
ipid='$$computer{ipid}');
   @octets = split(/\./,$ip);
   $table = $octets[3];
   $table = sprintf(%X, $table);
   $classid = $rates{$$modem{dsrate}};
   Action($tc filter add dev $dev protocol ip parent 1:
u32 ht 2:$table: match ip dst $ip flowid 1:$classid);
   $z++;
   print $z\n;
   }
}
Action is a sub that performs a system action and reports errors to
another sub.
SelectSQL is a sub that performs a sql query to our database.
COMMENT: Why is it whenever anyone new posts a question to a list even
after reading through the documentation, someone always has to jump down
his throat instead of being helpful and kind? This is a mailing list
which was created so people can ask questions and get a helpful response
from a community. I have been nothing but nice to everyone here and I am
really grateful for all the help that has been provided so far. Instead
of barking at people, simply stating that you require a snippet of code
and providing an answer would be much more helpful and wouldn't cause
people like me to bark back which is surely going to cause an argument
between us.
Thanks again!
Adam Towarnyckyj
-Original Message-
From: gypsy [mailto:[EMAIL PROTECTED]
Sent: Monday, July 12, 2004 6:24 PM
To: [EMAIL PROTECTED]; LARTC
Subject: Re: [LARTC] TC Hashing Filters
Adam Towarnyckyj wrote:
Hey all,
So I got the script to run and populate everything. I watch as
the script uses the tc commands to add filters for each IP into their
appropriate tables. After 2045 entries, it starts to give me a File
Exists error. I've done extensive testing on the script and
everything
COMMENT: Why is it that everyone who has a bad script does not post
(even a snip of) it?
The limit is 65536.
If you don't get the significance of that, it means the numbers are hex
and you're trying to make 'em be decimal.  Go read docum.org.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Is Linux based Router feasible

2004-07-08 Thread Catalin BOIE
I've a local LAN consisting of about 150 machines.  I'm using a Linux machine 
as the gateway machine which inturn connects to two different ISPs.  My 
question is can a Linux based machine match the performance of a hardware 
based routers provided by Cisco,... OR is my decision to go for a Linux based 
solution is a wrong one?.

Is there so much difference between these two solutions?
Can I achieve the same performance using a high end PC and Linux?
I'm asking this because one guy told me that my decision to go for a Linux 
based solution is a wrong one and it can never match the performance of 
Routers provided by Cisco.
Go with Linux.
You can always come here and ask a question.
Thanks
Sudheer  ___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-07 Thread Catalin BOIE
On Tue, 6 Jul 2004, jamal wrote:
On Mon, 2004-07-05 at 22:49, David S. Miller wrote:
I'm going to hold off on Stephen's patches until Jamal and he has
a chance to fight it out :-)
Actually i would be fine with it if Stephen gets rid of the new rate
thing.
I expect that duplicates of packet will not going to sch_netem, right?
I'm asking because I have a pactch pending.
Thank you.
cheers,
jamal
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Re: [PATCH 2.6] update to network emulation QOS scheduler

2004-07-07 Thread Catalin BOIE
On Wed, 6 Jul 2004, jamal wrote:
On Tue, 2004-07-06 at 12:09, Stephen Hemminger wrote:
Your examples made me think about this more.  The netfilter seem best
suited to things that effect the flow of packets (dropping, reordering,
even corrupting), and the qdisc seems best when the timing needs to change.
Some of the attributes you are trying to control need queueing; no doubt
the best spot to do queueing is on a qdisc. Delays, and reordering for
example are ideal. Rate control as well fits here. There are other
qdiscs which have done a really good job at rate control hence my
arguement against you doing it - you will either not do a better job at
it or if you do a good job you will be replicating what they already
did; just stash your qdisc in another qdisc which can do a good rate
control job (CBQ, TBF, HFSC, HTB) - we are flexible enough in Linux.
Depending on where you want to do things, netfilter may be a good
candidate (example IP protocol) or things that dont need queueing.
The examples i gave are more powerful than anything netfilter can do at
the moment though with only caveat theres only two hooks.
The limit match in netfilter is not the same as the rate in the qdisc.
The netem scheduler acts as if the link is a slow fixed rate.  The netfilter
limit is usually targeted to drop packets over the rate which is not the same.
Reordering is also hard without going out to a user log or building a custom
target.
Not sure what the netfilter limit target is - i suspect its something
that limits based on a group of flows. You can still do that with a
fwamrk at the qdisc level. Reordering needs a queue. Even the example i
gave uses a queue that resides on the dummy device.
So, you have convinced me that loss is unnecessary but not the rate, or delay.
If we can figure out how to re-ordering with netfilter then that could go too,
which would make it possible to use a layered qdisc again.
I think keep the reordering aspect of it unless it is very complex. The
delay is a must. If you can add configurable jitter to it that would be
a big bonus. Keep the randomization.  Duplication, dropping, bit error
injection, and rate control are the ones i didnt see belonging there
mostly because they can be done better elsewhere.
Again this is just opinion, if you think that theres no complexity in
the architecture, by all means keep all those features - my
recommendation is to pick a few things that will work well and implement
them well.
cheers,
jamal
I suggest to keep duplication because:
1. Adds 5-10 lines of code and no complexity
2. It's very easy to use it attached directly to a device.
Thank you.
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-05 Thread Catalin BOIE
On Fri, 2 Jul 2004, Glen Mabey wrote:
I'm getting the following error/warning at some point in my config
script, and I'm not sure which class it is referring to.
htb: class 10007 isn't work conserving ?!
What qdisc is attached to this class?
I [think I] understand that htb is a non-work-conserving qdisc, and I
[think I] have configured things so that every htb qdisc I instantiate
limits the bandwidth, so I don't understand why this situation would
invoke a warning message.
Also -- is there some way to correlate this identifier 10007 with a
classid?
Thank you,
Glen Mabey
--
**
Glen W. Mabey
[EMAIL PROTECTED]
http://mabeys.homelinux.com/glen/
**
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb: class 10007 isn't work conserving ?!

2004-07-05 Thread Catalin BOIE
Yes, that's what I was trying to ask below.  I'm still trying to figure
out which class (in the qdisc:classid format) the error message is
referring to.
It's about class 1:7.
So, since I'm not sure which class it is (and I have several htb
qdiscs; oh, I just realized that I neglected to mention that I'm using
HTB), I'm not sure which qdisc this refers to.
I [think I] understand that htb is a non-work-conserving qdisc, and I
[think I] have configured things so that every htb qdisc I instantiate
limits the bandwidth, so I don't understand why this situation would
invoke a warning message.
Also -- is there some way to correlate this identifier 10007 with a
classid?
I'm just starting back on working on this problem this morning, and I'll
approach it via a process of elimination, but I just thought there
surely must be some sort of deterministic mapping between the
qdisc:classid label and this one given in the warning message.
Thank you --
Glen
--
**
Glen W. Mabey
[EMAIL PROTECTED]
http://mabeys.homelinux.com/glen/
**
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] [ANNOUNCE] Updated version of iproute2 snapshot version

2004-07-02 Thread Catalin BOIE
Hi Rotger.
Just some quick points:
- maybe you should check for other executables. It turned out I had ip and tc 
in /sbin and they were first in the path so /usr/sbin/tc never ran. Maybe you 
can do a loop prior to installing and delete whatever which tc and which 
ip return until they return nothing.
This is the job of the package manager. On slackware with upgradepkg works 
fine.

- the make command incorrectly detected ATM but I have not set it in the 
kernel, and KERNEL_INCLUDE was correctly set. After editing ./Config and 
setting it to n it compiled fine in 2.4.23. I can post my kernel config if 
you want to investigate this.

well, many thanks for the good job! it works for me.
L Rotger
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Using Token Bucket Filter to simulate a low bandwidth radio link

2004-07-01 Thread Catalin BOIE
I seem to remember a kernel module for slowing down a link for testing? 
Can't remember the details, but I saw it in my 2.6 kernel somewhere.  Perhaps 
check the docs on that.
Yes, it's Stephen's sch_delay. Both 2.4 and 2.6 versions available.
Just run the 2.4.26 or 2.6.7 and last version of iproute2.
Then: tc qdisc add dev eth0 root delay limit 10 latency 3000ms
For my own custom apps I simulated a satellite link simply by writing a small 
proxy program for my particular protocol (in perl and again in VB).  It 
queued packets and released them after a set time period at a set rate.  If 
you are only testing a simple app then this is another way to go

Ed W
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] more questions.

2004-06-28 Thread Catalin BOIE
tc filter add dev eth1 parent 1:0 prio 10 handle 3: protocol ip u32 divisor 256
tc filter add dev eth1 protocol ip parent 1:0 prio 10 u32 ht 800:: match ip src
10.2.0.0/16 hashkey mask 0xff00 at 12 link 3:
So I have something like this.  the first command is saying handle 3 does this mean
it is createing a hash table because of an divisor?  and the link command on the
second command would only referecne to a HT?
Yes. An you must fill hashes 3:xx with other filters or just flowid.
Something like this:
tc filter add dev eth1 parent 1:0 protocol ip u32 ht 3:04: order 1 \
match ip dst 1.2.3.4/24 flowid 1:4
or
tc filter add dev eth1 parent 1:0 protocol ip u32 ht 3:04: order 1 \
flowid 1:4

Catalin BOIE ([EMAIL PROTECTED]) wrote:

Is there a relation between the hashtable ID /(parent,handle)  so that if I used 2:
for a hash table I could or couldn't use 2: for a (parent,handle)ID?
No relation. You can use the same id for both.
I also noticed that you type the hashtables like 2:2:  can you have more levels with
this?  like 2:2:2:1: ?  and I guess the same question with the parent/handles.
No, you cannot do this.
For hashes check my previous mail, for handler: , where  is
qdisc id and  is class id.
thanks again.
--
When dealing with a slow pipe, never underestimate the throughput of the postal
system.

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
--
When dealing with a slow pipe, never underestimate the throughput of the postal system.

---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] more questions.

2004-06-25 Thread Catalin BOIE
Is there a relation between the hashtable ID /(parent,handle)  so that if I used 2:
for a hash table I could or couldn't use 2: for a (parent,handle)ID?
No relation. You can use the same id for both.
I also noticed that you type the hashtables like 2:2:  can you have more levels with
this?  like 2:2:2:1: ?  and I guess the same question with the parent/handles.
No, you cannot do this.
For hashes check my previous mail, for handler: , where  is 
qdisc id and  is class id.

thanks again.
--
When dealing with a slow pipe, never underestimate the throughput of the postal system.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Hashtables major:minor and prio

2004-06-25 Thread Catalin BOIE
I have a question about a few things:
ok when you have parent x:x and handle x:x link x:x flowid and so on.  What is the
max values of each of these, also where these or some of these hex numbers?  I tried
this on redhat 7.3 so there may have been some updates, but this is one of the tests
I did.
[EMAIL PROTECTED] root]# tc filter add dev eth0 protocol ip parent 1:0 prio 10 u32 ht 
fffe::
match ip dst 10.2.0.0/16 hashkey mask 0xff00 at 16 link 2:
Illegal ht
So I assume that that FFFE:: is too large so I found that
tc filter add dev eth0 protocol ip parent 1:0 prio 10 u32 ht fff:: match ip dst
10.2.0.0/16 hashkey mask 0xff00 at 16 link 7:
so it works with fff I guess does this mean its an 24 bit number?
Would this be true for the rest of the numbers?
So if someone knows the max numbers for each of these and so on that would be kewl.
ht is like this xxxyyzzz
Where x, y and z are hexa numbers.
xxx is hash table id, yy is the hash id and zzz is the id of a hash 
node.
Check pkt_cls.h for more info.

---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] htb and 2.6.5 ?

2004-06-22 Thread Catalin BOIE
On Tue, 22 Jun 2004, [EMAIL PROTECTED] wrote:
does someone have expirience with HTB and kernel 2.6.5 and up...
Does anyone have tested it with thousand of classes and filters..
How it behaves..
Depends on how many filters/classes, how much traffic. If you have a lot 
of filters, you must use hashes.

Basicaly, the 2.4 and 2.6 are the same regarding traffic control.
At the network driver level there is NAPI but I think it is in 2.4 also.
tia
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] [ANNOUNCE] sch_ooo - Out-of-order packet queue discipline

2004-06-22 Thread Catalin BOIE
Hello!
I like to announce sch_ooo, a new queue discipline that, attached to a
class (or a device, as root) reorder the packets that pass by delaying 
some.

Example:
tc qdisc add dev eth0 root ooo limit 100 gap 4 wait 1100
This queue will create a pfifo with limit 100 and will delay
every 4th packet with 1100ms.
An stream of 6 packets like this: 1 2 3 4 5 6, generated by
ping will be reordered like this: 1 2 3 5 4 6.
Example for a ping:
PING mp3 (x.y.0.2) 56(84) bytes of data.
64 bytes from X (x.y.0.2): icmp_seq=1 ttl=64 time=69.6 ms
64 bytes from X (x.y.0.2): icmp_seq=2 ttl=64 time=68.7 ms
64 bytes from X (x.y.0.2): icmp_seq=3 ttl=64 time=71.8 ms
64 bytes from X (x.y.0.2): icmp_seq=5 ttl=64 time=70.1 ms
64 bytes from X (x.y.0.2): icmp_seq=4 ttl=64 time=1145 ms
64 bytes from X (x.y.0.2): icmp_seq=6 ttl=64 time=75.6 ms
You can see that seq 4 and 5 are reordered because seq 4 was delayed with 
1100ms.

This is for 2.6, but it's trivial to port to 2.4 if needed.
If you think it worth, please include it.
Any comments are appreciated. Thanks!
P.S. The homepage is at http://kernel.umbrella.ro/
P.P.S. The license is GPL.
--- linux.orig/net/sched/Kconfig2004-06-16 08:19:52.0 +0300
+++ linux/net/sched/Kconfig 2004-06-22 15:03:11.0 +0300
@@ -175,6 +175,17 @@ config NET_SCH_DELAY
  To compile this driver as a module, choose M here: the module
  will be called sch_delay.
+config NET_SCH_OOO
+	tristate Out-of-order qdisc discipline
+	depends on NET_SCHED
+	help
+	  Say Y if you want to simulate out-of-order packets by delaying
+	  some of them. This qdisc is useful if you develop
+	  protocols or network monitoring applications.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called sch_ooo.
+
 config NET_SCH_INGRESS
 	tristate Ingress Qdisc
 	depends on NET_SCHED  NETFILTER
--- linux.orig/net/sched/Makefile	2004-06-16 08:19:23.0 +0300
+++ linux/net/sched/Makefile	2004-06-22 15:03:25.0 +0300
@@ -23,6 +23,7 @@ obj-$(CONFIG_NET_SCH_TEQL)	+= sch_teql.o
 obj-$(CONFIG_NET_SCH_PRIO)	+= sch_prio.o
 obj-$(CONFIG_NET_SCH_ATM)	+= sch_atm.o
 obj-$(CONFIG_NET_SCH_DELAY)	+= sch_delay.o
+obj-$(CONFIG_NET_SCH_OOO)	+= sch_ooo.o
 obj-$(CONFIG_NET_CLS_U32)	+= cls_u32.o
 obj-$(CONFIG_NET_CLS_ROUTE4)	+= cls_route.o
 obj-$(CONFIG_NET_CLS_FW)	+= cls_fw.o
--- linux.orig/net/sched/sch_ooo.c	1970-01-01 02:00:00.0 +0200
+++ linux/net/sched/sch_ooo.c	2004-06-22 16:08:18.0 +0300
@@ -0,0 +1,301 @@
+/*
+ * net/sched/sch_ooo.c	Out-of-order qdisc discipline routines.
+ *
+ *		This program is free software; you can redistribute it and/or
+ *		modify it under the terms of the GNU General Public License
+ *		as published by the Free Software Foundation; either version
+ *		2 of the License, or (at your option) any later version.
+ *
+ * Authors:	Catalin(ux aka Dino) BOIE, catab at deuroconsult.ro
+ */
+
+#include linux/config.h
+#include linux/init.h
+#include linux/kernel.h
+#include linux/module.h
+#include linux/sched.h
+#include linux/smp_lock.h
+#include linux/capability.h
+#include linux/in.h
+#include linux/ip.h
+#include linux/udp.h
+#include linux/tcp.h
+#include linux/time.h
+
+#include linux/proc_fs.h
+#include asm/uaccess.h
+
+#include linux/string.h
+#include linux/netdevice.h
+#include net/pkt_sched.h
+
+#define MODULE_NAME sch_ooo v0.1
+
+#if 0
+#define DPRINTK(format,args...)	printk(KERN_DEBUG MODULE_NAME :  format, ##args)
+#else
+#define DPRINTK(format,args...)
+#endif
+
+
+/* global variables */
+
+/* qdisc internal data */
+struct ooo_sched_data {
+	__u32			limit;		/* in packets */
+	__u32			gap;		/* gap + 1 between ooo packets */
+	__u32			wait;		/* how much ms to wait before release a marked ooo */
+		/* 0 = disable */
+	/* private data */
+	__u32			counter;	/* keep track of frequncy */
+	struct sk_buff_head	qooo;
+	struct timer_list	timer;
+	__u32			tokens;
+};
+
+static void ooo_timer(unsigned long arg)
+{
+	struct Qdisc *sch = (struct Qdisc *)arg;
+	struct ooo_sched_data *q = (struct ooo_sched_data *)sch-data;
+
+	DPRINTK(timer: Add a token and sched dev!\n);
+
+	/* add a token */
+	q-tokens++;
+
+	sch-flags = ~TCQ_F_THROTTLED;
+	netif_schedule(sch-dev);
+}
+
+static int ooo_init(struct Qdisc *sch, struct rtattr *opt)
+{
+	struct ooo_sched_data *q = (struct ooo_sched_data *)sch-data;
+
+	memset (q, 0, sizeof(struct ooo_sched_data));
+
+	sch-stats.lock = sch-dev-queue_lock;
+
+	/* init timer */
+	init_timer(q-timer);
+	q-timer.function = ooo_timer;
+	q-timer.data = (unsigned long) sch;
+
+	/* init ooo queue */
+	skb_queue_head_init(q-qooo);
+
+	q-counter = 0;
+	q-tokens = 0;
+
+	if (!opt) {
+		q-limit = sch-dev-tx_queue_len;
+		q-gap = 0;
+		q-wait = 0;
+	} else {
+		struct tc_ooo_qopt *ctl = RTA_DATA(opt);
+
+		if (opt-rta_len  RTA_LENGTH(sizeof(*ctl)))
+			return -EINVAL;
+
+		q-limit = ctl-limit;
+		q-gap = ctl-gap;
+		q-wait = ctl-wait;
+	}
+
+	return 0;
+}
+
+static int ooo_enqueue(struct sk_buff *skb, struct 

Re: [LARTC] [ANNOUNCE] sch_ooo - Out-of-order packet queue discipline

2004-06-22 Thread Catalin BOIE
On Tue, 22 Jun 2004, Stephen Hemminger wrote:
Maybe the delay and ooo scheduler should be merged, the both do sort of
the same thing.
Yes, it's true.
I can work on a patch if you want.
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Difference between flowid and classid

2004-06-21 Thread Catalin BOIE
On Mon, 21 Jun 2004, Vinu Chandran wrote:
Hi all
	Can anybody pls explain me the difference between classid and flowid. In which scenario we may need to use either of one. Any help will be greatly appreciated.
They mean the same thing.


regards
Vinoos.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Class ID limits

2004-06-17 Thread Catalin BOIE
tc class add dev eth1 parent 10: classid 10:$variable cbq bandwidth
200Mbit rate 512Kbit allot 1514 prio 5 maxburst 20 avpkt 1000 bounded
That's just an example. My problem is I'm guessing the $variable is not
allowed to be anything over . I'm getting an error when I run that
command with anything over 4 digits as a $variable. The error is:
RTNETLINK answers: Invalid argument
I've also tried just entering that in at the command prompt and using
1 as the variable and that error shows up.
I actually have a few questions. First, am I right in assuming this or
is the reason something totally different? And, if I'm right, is there
any way around the limit other than creating a new qdisc? I'm trying to
use a number we have set up in our database and sometimes it goes into
the 5 digit range. Any help would be greatly appreciated. Thanks!
Class parameters to tc are hexa numbers so you can use from x:1 to x:, 
meaning 65535 classes.


Adam Towarnyckyj
Network Operations
CommSpeed AZ, LLC
http://www.commspeed.net/
Phone: 928-772- x131

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB Bug report.

2004-06-04 Thread Catalin BOIE
On Fri, 4 Jun 2004, Thierry Coutelier wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
We got the following message on the console of one of our server:
~  HTB: dequeue bug (8,12140714,12140714), report it please !
The server is a Dell Poweredge with 2 CPUs running a 2.5.25 Kernel.
It is used as a ppp gateway to server l2tp connections.
2.5.25 is way old.
The bug was corrected. You need to upgrade.
The iproute2 package has the version [020116].
We set the filters using the handle as flowid. For example:
~  tc filter add dev eth1 protocol ip parent 1: prio 1 handle ::240 u32 match 
\
	ip dst 172.23.98.5 flowid 1:240
~  tc class add dev eth1 parent 1:1 classid 1:240 htb rate 10 ceil 10

We use this method instead of using the priority to differentiate the filters 
to not
have the square amount of lines when doing a tc filter ls.

What could be the consequence of this error message except from making us 
report it ;)

- --
Thierry Coutelier
No Patents on Software: http://www.linux.lu/epatent
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAwG/zPOfrcNNQX7oRArtJAJwMcnXUeM4OXphVfVUcWWCu1sUDdgCfcc2B
LBVb/Hdl5WDvzD2VCQbtYbk=
=mPCT
-END PGP SIGNATURE-
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
http://kernel.umbrella.ro/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Most general filter rule?

2004-04-15 Thread Catalin BOIE
 Exactly - I'm just trying to find out what kind of traffic doesn't get matched
 by my other filters and therefore is responsible for the few kbps going to my
 default class.
 I tried to match the traffic with the most general filter rule I could imagine
 (see above) - but there's still traffic going to my default class :(

 I'd appreciate any suggestions!

Post your script and maybe we can help.


 Andreas
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] hashing

2004-04-06 Thread Catalin BOIE
On Tue, 6 Apr 2004 [EMAIL PROTECTED] wrote:

 Hi i have 2 class C 80.97.103.0/24 and 81.180.12.0/24 but i dont konw how
 to set hashing tables for HTB
 tc add dev eth0 parent 1: prio 0 handle 1: protocol ip u32 divisor 256
 tc add dev eth0 parent 1: prio 0 protocol ip u32 match src 80.97.103.0/24
 hashkey mask 0x00FF at 12 link 1:

 but i want 2 hashkey for 80.97.103.0/24 and for 81.180.12.0/24 can
 somebody help me ?

tc filter add dev eth0 parent 1: prio 0 handle 1: protocol ip u32 divisor 256
tc finlter add dev eth0 parent 1: prio 0 protocol ip u32 match src 80.97.103.0/24
hashkey mask 0x00FF at 12 link 103:
tc filter add dev eth0 parent 1: prio 0 protocol ip u32 match src 81.180.12.0/24
hashkey mask 0x00FF at 12 link 12:
# Create filters for every ip
# for 80.97.103.0/24
tc filter add dev eth0 parent 1: protocol ip u32 ht 103:2: flowid 1:2
tc filter add dev eth0 parent 1: protocol ip u32 ht 103:3: flowid 1:3
...
tc filter add dev eth0 parent 1: protocol ip u32 ht 103:fe: flowid 1:254
# now for 81.180.12.0/24
tc filter add dev eth0 parent 1: protocol ip u32 ht 12:2: flowid 1:402
tc filter add dev eth0 parent 1: protocol ip u32 ht 12:3: flowid 1:403
...
tc filter add dev eth0 parent 1: protocol ip u32 ht 12:fe: flowid 1:654



 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux aka Dino) BOIE
catab at deuroconsult.ro
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] how to create a high latency link ?

2004-03-26 Thread Catalin BOIE
On Fri, 26 Mar 2004, Pascal OFFREDO wrote:

 Hi,

 I'd like to create a high latency link between 2 machines ( more than
 700 ms round trip) for simulation purpose.

 Is it possible to do that with linux qos management software ?

Yes, it is possible.
Check latest rc from 2.4 or 2.6. It contains sch_delay that can do this.

You also need:
http://developer.osdl.org/shemminger/tcp/iproute2-delay.tar.bz2

Example:
tc qdisc add dev eth0 root delay latency 25ms rate 100mbit

Good luck!



 thanks

 Pascal OFFREDO


 ___[ Pub ]
 Inscrivez-vous gratuitement sur Tandaime et gagnez un voyage à Venise
 www.Tandaime.com/index.php?origine=4 Tandaime, et la vie vous sourit !

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] How to get src and dest IP from packet

2004-03-25 Thread Catalin BOIE
 Dear All,

 I am trying to get src and dest IP from packet send from IP to TC via
 struct sk_buff *skb;

 In enqueue function in sch_myqueue, I get my IP like this

 struct iphdr* iph=skb-nh.iph;
 printk(KERN_ALERT %u::%u\n,iph-saddr,iph-daddr);

 but it turned out to be that I always get the same number and it's not
 an IP. The following are some of my result

 Mar 25 04:07:26 darth kernel: 1250891393::1194021458
 Mar 25 04:07:26 darth kernel: 1250891393::1194021458
 Mar 25 04:07:26 darth kernel: 1250891393::1194021458

 Please feel free to contribute any ideas you guys have got. Any sources
 should I consult? Thank you very much in advance for your help.


It is an IP, but not in a way you want it to be. Try:
printk (KERN_INFO %u.%u.%u.%u - %u.%u.%u.%u\n,
NIPQUAD (iph - saddr), NIPQUAD (iph - daddr));

Good luck!


 Sincerely,

 Sipat Triukose
 --

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB problem

2003-12-04 Thread Catalin BOIE
  Hello,
 
  I'm having some problems using HTB to prioritize traffic on my linux
  router.
  The main problem is as follows:
  I have a 6Mbits channel on the metropolitan network and a 64kbps link
  for the sites outside my country.
 
  These 64kbps are dynamically allocated by my ISP so I usually get
  something like 128kbps , sometimes 512kbps and even 1 Mbit; it varies
  all the time.
 
  Because of this I don't know how to automatically adjust my HTB script
  depending on the total bandwidth available on the external link
  (without specifying the maximum to 64kbps thus limitting every
  connection even if my ISP grants me more than this bandwidth).
 
  Anyone got any ideas ?

You cannot have a variable bandwidth with htb.
Count on the minimum bandwidth.

 
 
 
  ___
  LARTC mailing list / [EMAIL PROTECTED]
  http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Filter huge number of hosts

2003-11-11 Thread Catalin BOIE
On Tue, 11 Nov 2003, Peter Nelson wrote:

 Ok, I'm pretty new at this and am probably in a bit over my head, but I
 was looking for some pointers.  I want to classify and then prioritize
 traffic based on if it is to an Internet2 host, a host on campus or the
 general internet.  I got a dump from one of our campus's routers that
 classifies everything as either I2 or local, only problem is that it is
 ~8000 entries.  Now a lot of those entries can probably be combined down
 (for example a couple of sequential /24's).  My first question is does
 anyone have any script that you give it multiple netmasks and it
 combines it down to the simplest netmasks?  Now my second question is
 would using hashtables, maybe even nested ones be practical for this?
 This is how I'm thinking of hashing so far:

 Mask   hashes  children to check
 0xFF00:   100   most 50-500
 0x:   3000 most 20, some 50-200
 0xFF00:   8000 all  10


You can link hashes to do what you want:
hash (made from first byte of the ip):
01 - another_hash_1
10 - another_hash_2

another_hash_1 entries (hash made from second byte):
01 - another_hash_on_level_2
10 - another_hash_on_level_2

and so on.


 Obviously hashing based on 0xFF helps, but it still has to go through up
 to 500 checks for somes hosts.  Once I hash based on 0x the worst
 case gets a lot better, and of course hashing on 0xFF makes almost
 perfect hashes.  Only thing is does a hash table lose it's point once
 you start indexing everything?  I was thinking maybe hashing based on
 the 0xFF and then from there making hashes based on 0x00FF (and then
 maybe an other layer of 0xFF).  I admit I really don't know all that
 much about the hashing algorighm and it's complexity so I don't know how
 to approach this.

 Thanks for any information,
 Peter Nelson
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] tc filter

2003-11-03 Thread Catalin BOIE
 what I wright is

 tc qdisc del dev eth0 root
 tc qdisc add dev eth0 root handle 1: htb default 20 r2q 100

 tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit
 tc class add dev eth0 parent 1: classid 1:2 htb rate 1mbit ceil 10mbit
 tc class add dev eth0 parent 1:1 classid 1:10 htb rate 90mbit ceil 90mbit
 tc class add dev eth0 parent 1:2 classid 1:20 htb rate 940kbit ceil 1mbit
 tc class add dev eth0 parent 1:2 classid 1:21 htb rate 64kbit ceil 128kbit

 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
 80.97.88.1 flowid 1:10
 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
 80.97.85.3 flowid 1:10

Replace:
 tc filter add dev eth0 protocol ip parent 1:2 prio 1 u32 match ip dst
 80.97.88.16/28 flowid 1:12
with:
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst
80.97.88.16/28 flowid 1:21

Note that class 1:12 doesn't exists.



 but tc -s -d class show dev eth0 tells me that noting goes throuth 1:21

 class htb 1:12 parent 1:2 prio 0 quantum 1000 rate 64Kbit ceil 128Kbit
Look, it's 1:12 above!

 burst 1680b/8 mpu 0b cburst 1762b/8 mpu 0b level 0
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  lended: 0 borrowed: 0 giants: 0
  tokens: 168099 ctokens: 88149

 I appologize for cutting and pasting so much text but I just want to make
 the situation as clear as posible for someone that wants to help me

 thanks
 raz

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


RE: [LARTC] Pakets marked but no shapeing is done

2003-10-28 Thread Catalin BOIE
What ip isn't shaped right?

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] tc filter expression

2003-10-16 Thread Catalin BOIE
  I think you can use ingress + policy + ds to mark packets (DSCP IP field)
  on eth0 and eth2. Then on eth1 you can classify base on this field.

 Could you give me an example of how this could be done? The DSMARK
 documentation that I have found is a bit difficult. I can't find any
 examples of marking in ingress, and if I understand you right, you
 think that it is possible to mark all packets in ingress on let's say
 eth0 (provider 1), and then classify based on that mark in egress of
 eth1 (internal iface).

Hi, Niels!

I have no working example.
I said that in theory. I didn't tried myself.

[10 minutes passed]

I check a little more and seems it's not possible to set the mark using
ingress.
Stef, am I wrong?



 Regards,
 Niels V. Christensen


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] 10Mbit on HTB

2003-10-12 Thread Catalin BOIE
On Sat, 11 Oct 2003, Kristiadi Himawan wrote:

 I want to try to shape 20-30Mbps traffic using HTB.
 It's possible? Anyone already try this?

Yes. It's working very good.
You may want to use hashes if you have a lot of filters.


 Thanks.


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] filter

2003-10-09 Thread Catalin BOIE
On Thu, 9 Oct 2003, Stef Coene wrote:

 On Thursday 09 October 2003 07:08, Catalin BOIE wrote:
  Don't worry. It's tc fault (or maybe kernel).
 It's a bug in the tc routing that displays the filters.

Thanks for clarification, Stef.


 Stef

 --
 [EMAIL PROTECTED]
  Using Linux as bandwidth manager
  http://www.docum.org/
  #lartc @ irc.openprojects.net


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] filter

2003-10-08 Thread Catalin BOIE
Don't worry. It's tc fault (or maybe kernel).
The filters are once in the kernel but are showed no_of_prios_used times.

On Thu, 9 Oct 2003, Victor wrote:

 The difrence betwen these 2 configurations is only the prio parameter from
 the second filter, from each configutation.
 (tc filter add dev eth0 parent 1: prio 5 protocol ip u32 ht 800:: match ip
 src 80.97.24.0/24 hashkey mask 0x00ff at 12 link 2:)

 Configuration 1

 tc qdisc add dev eth0 root handle 1: htb
 tc class add dev eth0 parent 1: classid 1:1 htb rate 500Kbit prio 1
 quantum 2000
 tc class add dev eth0 parent 1:1 classid 1:201 htb rate 4Kbit ceil 500Kbit
 prio 0 quantum 2000
 tc filter add dev eth0 parent 1: prio 1 handle 2: protocol ip u32 divisor 256
 tc filter add dev eth0 parent 1: prio 5 protocol ip u32 ht 800:: match ip
 src 80.97.24.0/24 hashkey mask 0x00ff at 12 link 2:
 tc filter add dev eth0 prio 1 protocol ip u32 ht 2:01 match ip src
 80.97.24.1 flowid 1:201

 Configuration 2

 tc qdisc add dev eth0 root handle 1: htb
 tc class add dev eth0 parent 1: classid 1:1 htb rate 500Kbit prio 1
 quantum 2000
 tc class add dev eth0 parent 1:1 classid 1:201 htb rate 4Kbit ceil 500Kbit
 prio 0 quantum 2000
 tc filter add dev eth0 parent 1: prio 1 handle 2: protocol ip u32 divisor 256
 tc filter add dev eth0 parent 1: prio 1 protocol ip u32 ht 800:: match ip
 src 80.97.24.0/24 hashkey mask 0x00ff at 12 link 2:
 tc filter add dev eth0 prio 1 protocol ip u32 ht 2:01 match ip src
 80.97.24.1 flowid 1:201

 Configuration 1
 tc filter show dev eth1
 shows the next lines:
 filter parent 1: protocol ip pref 1 u32
 filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1
 filter parent 1: protocol ip pref 1 u32 fh 2: ht divisor 256
 filter parent 1: protocol ip pref 1 u32 fh 2:1:800 order 2048 key ht 2 bkt
 1 flowid 1:201
   match 50611801/ at 12
 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800
 bkt 0 link 2:
   match 50611800/ff00 at 12
 hash mask 00ff at 12
 filter parent 1: protocol ip pref 5 u32
 filter parent 1: protocol ip pref 5 u32 fh 801: ht divisor 1
 filter parent 1: protocol ip pref 5 u32 fh 2: ht divisor 256
 filter parent 1: protocol ip pref 5 u32 fh 2:1:800 order 2048 key ht 2 bkt
 1 flowid 1:201
   match 50611801/ at 12
 filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800
 bkt 0 link 2:
   match 50611800/ff00 at 12
 hash mask 00ff at 12



 Configuration 1
 tc filter show dev eth1
 shows the next lines:

 filter parent 1: protocol ip pref 1 u32
 filter parent 1: protocol ip pref 1 u32 fh 2: ht divisor 256
 filter parent 1: protocol ip pref 1 u32 fh 2:1:800 order 2048 key ht 2 bkt
 1 flowid 1:201
   match 50611801/ at 12
 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800
 bkt 0 link 2:
   match 50611800/ff00 at 12
 hash mask 00ff at 12

 Why the configutaion1 has many filters than configuration2?
 How can the prio paramenter influence this?
 What is the range for the prio parameter in the filter context?
 Thank you.

 Victor


 -
 This email was sent using SquirrelMail.
Webmail for nuts!
 http://squirrelmail.org/


 Random Thought:
 --
 Integrity has no need for rules.
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] tc filter expression

2003-10-08 Thread Catalin BOIE
On Thu, 9 Oct 2003, Niels Vorgaard Christensen wrote:

 Hi.

 I am working on a router with three interfaces. eth2 and eth0 are
 connected to two different Internet providers. The interface eth1 are
 connected to an internal network. Now I need a tc filter expression
 that will determine which interface the packet was routed in through
 to be able classify packets going out eth1 based on provider. I know I
 could mark packets with netfilter, but if it is possible to construct
 a tc filter expression to do the job I would much prefere that.

I think you can use ingress + policy + ds to mark packets (DSCP IP field)
on eth0 and eth2. Then on eth1 you can classify base on this field.



 Regards,
 Niels V. Christensen
 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] RE: IP over UDP Tunnel

2003-10-03 Thread Catalin BOIE
On Fri, 3 Oct 2003, Abdul Hakeem wrote:



 Hello,
 Can anyone spare tips on setting up a UDP tunnel over a DVB-S link ? I
 am toying with the idea of an IP over UDP tunnel  over a simplex or
 forward only DVB-S link.
 Cheers,
 Abdul Hakeem

http://vtun.sf.net


 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Problem with htb and fwmark

2003-09-17 Thread Catalin BOIE
  Have I forgotten something, or what is the problem?

 I have the exact same problem here; has anyone found the reason and/or a
 fix?

Post your scripts to this list.


 I use 2.4.22 here. I worked with 2.4.20.

 --
 Mvh. / Best regards,
 Steen Suder   http://www.suder.dk/
 ICQ UIN   4133803

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] how to stop floods: netfilter or lartc?

2003-09-16 Thread Catalin BOIE
 Who can share his opinion on this matter?
Me? :)

  Section 15.3 in the Cookbook presents a way of using tc for rate
  limiting ICMP.
 
  It can also be done using the --limit feature in netfilter.
 
  What are the pros and cons of both approaches? Or should they be
  combined somehow?

You can use both methods. I don't think that for 1000 icmp packets /
seconds you can tell the difference.

 
  Z.
 
 
  ___
  LARTC mailing list / [EMAIL PROTECTED]
  http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
 
 


 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: R: [LARTC] time window in CBQ

2003-09-05 Thread Catalin BOIE
On Fri, 5 Sep 2003, Andreani Luca wrote:

 is 64kbit/sec enough for VoIP ?  I would have thought not.. but I do not
 have VoIP...

Steve, what voip codec do you use?
If you can select, use G723 (6.3 kbit/s)



 /steve



---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] [Fwd: how does the bandwidth management relates withthe proc file system?]

2003-07-07 Thread Catalin BOIE
 How does the bandwidth management relates with the proc file system?
What do you mean?

There is nothing in proc to get statistics, if this is what you want to
ask.


 Can anybody suggest?

 regards,
 Srikanth.


 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] u32 clarification...limits on 2000???

2003-06-25 Thread Catalin BOIE
 Hello,
Hello!

  I do understand that limits on u32 filters  2000 have never been
 encountered. Run this script which is base on htb and lemme know. You
 will need 2.4.20  and tc compiled for htb.

It gives me a lot of RTNETLINK answers: File exists.
This doesn't seems to be a limit.

  Can you please send me your config and lemme compare the same against
 mine.
I have main in a database. I cannot give it to you, but trust me that are
5 filters.

Try to use hashes to reduce the kernel pressure.


 Trevor


 On Tue, 2003-06-24 at 15:49, Catalin BOIE wrote:
  On Tue, 24 Jun 2003, Trevor Warren wrote:
 
  
   Can some one please confirm which would be the best place to clarify
   these U32 issues and 2048 U32 filter limitations as i had posted in my
   previous mail.
  
   Trevor
 
  We have 5 filters and still working.
  I don't think there is a limit.
 
  
   --
   ( -GNU/LINUX, It's all about CHOICE  - )
   /~\__[EMAIL PROTECTED]   __   /~\
   |  \) /  Pre Sales Consultant - Red Hat \ (/ |
   |_|_  \9820349221(M) | 22881326(O)  / _|_|
  \___/
  
   ___
   LARTC mailing list / [EMAIL PROTECTED]
   http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
  
 
  ---
  Catalin(ux) BOIE
  [EMAIL PROTECTED]
  ___
  LARTC mailing list / [EMAIL PROTECTED]
  http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
 --
 ( -GNU/LINUX, It's all about CHOICE  - )
 /~\__[EMAIL PROTECTED]   __   /~\
 |  \) /  Pre Sales Consultant - Red Hat \ (/ |
 |_|_  \9820349221(M) | 22881326(O)  / _|_|
\___/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] FW: Weird! HTB does not work with my new box..

2003-06-24 Thread Catalin BOIE
 Unknown qdisc htb, hence option default is unparsable
 **HTB: failed to set root qdisc on eth0!
 [EMAIL PROTECTED]:/etc/sysconfig/htb# lsmod
 Module  Size  Used byNot tainted
 sch_htb21120   0  (unused)
 cls_route   5560   0  (unused)
 cls_u32 5724   0  (unused)
 cls_fw  3480   0  (unused)
 sch_sfq 3520   0  (unused)

 this is weird isnt it? all modules needed for HTB exist but error message
 said something about unknown qdisc..

tc does'n know about htb, not the kernel.
Get a patch for tc to know about htb, or the binary from Devik page.


 Regards,
 Rio Martin.



 
 mail2web - Check your email from the web at
 http://mail2web.com/ .


 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] u32 clarification

2003-06-24 Thread Catalin BOIE
On Tue, 24 Jun 2003, Trevor Warren wrote:


 Can some one please confirm which would be the best place to clarify
 these U32 issues and 2048 U32 filter limitations as i had posted in my
 previous mail.

 Trevor

We have 5 filters and still working.
I don't think there is a limit.


 --
 ( -GNU/LINUX, It's all about CHOICE  - )
 /~\__[EMAIL PROTECTED]   __   /~\
 |  \) /  Pre Sales Consultant - Red Hat \ (/ |
 |_|_  \9820349221(M) | 22881326(O)  / _|_|
\___/

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB flooding my kernel logs

2003-01-22 Thread Catalin BOIE
 I have a 2 tree configuration. Here is an example script:
 #!/bin/bash

 tc=/sbin/tc

 $tc qdisc del dev eth0 root
 $tc qdisc add dev eth0 root handle 1: htb default 30
 $tc class add dev eth0 parent 1: classid 1:1 htb rate 100Mbit

 $tc class add dev eth0 parent 1:1 classid 1:10 htb rate 40Mbit
 $tc class add dev eth0 parent 1:1 classid 1:20 htb rate 40Mbit
 $tc class add dev eth0 parent 1:1 classid 1:30 htb rate 20Mbit

 # create the first class tree
 $tc qdisc add dev eth0 parent 1:10 handle 10: htb default 20
 $tc class add dev eth0 parent 10: classid 10:1 htb rate 40Mbit

 $tc class add dev eth0 parent 10:1 classid 10:10 htb rate 256Kbit
 $tc class add dev eth0 parent 10:1 classid 10:20 htb rate 1Mbit ceil 40Mbit

 # create the second class tree
 $tc qdisc add dev eth0 parent 1:20 handle 20: htb default 20
 $tc class add dev eth0 parent 20: classid 20:1 htb rate 40Mbit

 $tc class add dev eth0 parent 20:1 classid 20:10 htb rate 64Kbit
 $tc class add dev eth0 parent 20:1 classid 20:20 htb rate 1Mbit ceil 40Mbit


 In fact we dont keep at a time more than 1 tree. So I have qdisc htb 1:
 and qdisc htb 10: or 20: at a time. When I want to reinitilize my htb
 trees I create the other tree from the new data (the trees are created db
 based) but if the current tree is 10: I create the new one 20: . Then
 after the new tree creation completes I do a tc filter change to classify
 packets onto the new tree and then a tc qdisc del the old tree (for
 example 10:). I observed that if between tc filter change (making new
 packets classify into the new tree) and tc qdisc del (deleting the old
 tree) I put a delay smaller than a certain ammount (here is 2 seconds)
 then I get those kernel assertion messages. And I dont get them only for a
 finite ammount of time, but I get them continously flooding my logs. If I
 reinitilize the htb tree again but having a bigger delay then I dont get
 any of that messages.

 Help ? :)

Maybe you can activate the debugging in kernel.
Can you reproduce this with a small tree?
Can you make a _short_ sample script that duplicates the problem?


 
 Mihai RUSU

 Disclaimer: Any views or opinions presented within this e-mail are solely
 those of the author and do not necessarily represent those of any company,
 unless otherwise specifically stated.

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
H323: dino.rdsbv.ro

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] [BUG?] hashes - prio is not respected

2003-01-22 Thread Catalin BOIE
Hello!

Seems that if I add two filters in a hash node, prio doesn't matter
anymore.
It's a known bug?

Long story:

If I do this:
echo ** jumptables...
echo *** 800: link 1:
$tc filter add dev $dev parent 1: prio 1 u32 match ip nofrag hashkey mask 0xff00 
at 16 link 1:

echo *** 1:1 link 2:
$tc filter add dev $dev parent 1: prio 1 u32 ht 1:1: match ip nofrag hashkey mask 
00ff at 16 link 2:

echo *** 2:2 link 3:
$tc filter add dev $dev parent 1: prio 1 u32 ht 2:2: match ip nofrag hashkey mask 
ff00 at 16 link 3:
echo *** 3:3 link 4:
$tc filter add dev $dev parent 1: prio 1 u32 ht 3:3: match ip nofrag hashkey mask 
00ff at 16 link 4:

# *** important part **
tc filter add dev $dev parent 1: prio 2 u32 \
#^^^
ht 4:4: match ip dst 1.2.3.4/32 flowid 1:2

tc filter add dev $dev parent 1: prio 1 u32 \
#^^^
ht 4:4: match ip dst 1.2.3.4/32 flowid 1:3


But every ping to 1.2.3.4 goes to flowid 1:2 instead of 1:3 :(.

Thank you very much!

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
H323: dino.rdsbv.ro

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] qdisc_sleeping

2002-07-30 Thread Catalin BOIE

Hi!

Can somebody explain to me why there are qdisc_sleeping and
qdisc_list beside qdisc in net_device structure and what are these useful
for?

Thank you very much!

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
H323: dino.rdsbv.ro

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] Policy Routing (Again)

2002-06-04 Thread Catalin BOIE

 Then I decided to mark all outgoing SMTP packets with fwmark 1 (marked
 using iptables). I've marked them like this:

 iptables -t mangle -A OUTPUT - p tcp --dport 25 -j MARK --set-mark 1

 I have, then, added a rule pointing to alternative routing table:

 ip rule add priority 15000 fwmark 1 table mail

 I have flushed routing cache with:

 ip route flush cache

 And have generated some traffic trying to telnet port 25 of an external
 route from the router/SMTP (see picture above).

Try this:

ip ro del default
ip ro add default via x.y.z.t table default

Let me know if it works.


 Sniffing network shown me that packets have exited with source address
 10.11.0.1, which means my set up is completly useless.

 Just for the records, I am using v1.2.5 in a Debian (woody) with kernel
 2.4.18 (only HTB patch).

 Any help would be very welcome.

 Thank you in advnace for your time.
 --
 Sellaro

 Agente Livre - Linux Community (www.agentelivre.org)

 PGP Key ID: 3ADF8645
 PGP Key Fingerprint: 6AB0 D60B 69B5 B3F9 4553  2242 A1D0 17C0 3ADF 8645

 ___
 LARTC mailing list / [EMAIL PROTECTED]
 http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
openh323://dino.rdsbv.ro

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] htb_change sfq_change

2002-05-16 Thread Catalin BOIE

On Wed, 15 May 2002, Martin Devera wrote:

 Date: Wed, 15 May 2002 15:11:09 +0200 (CEST)
 From: Martin Devera [EMAIL PROTECTED]
 To: Catalin BOIE [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [LARTC] htb_change sfq_change

   :) You can drop  recreate it safely. User will
   not see it. The change function for SFQ will be
   probably considered redundant by other kernel
   developers because of it.
 
  But you loose counters! This is bad IMHO.

 That's good point ! So that go ahead and implement it for
 SFQ :)
But it is already!
But in sch_sfq.c at the end (in jump table) is NULL /* sfq_change */!
There are race problems in sfq_change?

I found a patch on the net that puted NULL instead sfq_change...

Thanks!

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
openh323://dino.rdsbv.ro

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] htb_change sfq_change

2002-05-14 Thread Catalin BOIE

 Should not be. But HTB is in feature freeze. My main
 goal is to be in kernel asap.
I wish you good luck!
HTB deserves to be in the main kernel tree.

 Then we can do some changes later. I'd like to keep the
 code from larger updates now.
OK.

 Do you need it ? And why ?
Yes, I need it.
I need to change on the fly r2q to see how the traffic flow changes.
But I don't want to delete the whole tree just to change some parameters
on the root class.

 devik

 On Fri, 10 May 2002, Catalin BOIE wrote:

  On Thu, 9 May 2002, Martin Devera wrote:
 
   Date: Thu, 9 May 2002 12:29:00 +0200 (CEST)
   From: Martin Devera [EMAIL PROTECTED]
   To: Catalin BOIE [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: Re: [LARTC] htb_change sfq_change
  
   Because there is nothing to change once created. For HTB
   it might be r2q or debug but there is no real need yet.
   devik
 
  It's hard to implement it?
  Thanks!
 
  
   On Thu, 9 May 2002, Catalin BOIE wrote:
  
Hello!
   
Why in kernel in net/sched/sch_sfq.c and in other places (htb) the change
function is not sfq_change (or htb_change) and is NULL instead?
   
Thank you very much!
   
---
Catalin(ux) BOIE
[EMAIL PROTECTED]
http://www2.deuroconsult.ro/~catab
   
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
   
   
  
   ___
   LARTC mailing list / [EMAIL PROTECTED]
   http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
  
 
  ---
  Catalin(ux) BOIE
  [EMAIL PROTECTED]
  http://www2.deuroconsult.ro/~catab
 
 
 


---
Catalin(ux) BOIE
[EMAIL PROTECTED]
http://www2.deuroconsult.ro/~catab

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] htb_change sfq_change

2002-05-14 Thread Catalin BOIE

  OK.
  But for SFQ?

 what do you want to change in sfq !!??
perturb and quantum on-the-fly.

 devik

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
http://www2.deuroconsult.ro/~catab

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] htb, class, prio

2002-05-14 Thread Catalin BOIE

Hello!

Seems that whatever I set for prio for a htb class it is always set to 3.
Example script:

ifconfig dummy1 up
ifconfig dummy1 200.200.200.200 netmask 255.255.255.248

tc qdisc del dev dummy1 root

tc qdisc add dev dummy1 root handle 2: htb

tc class add dev dummy1 parent 2: classid 2:1 \
htb prio 7 rate 1000bps ceil 2000bps
   ^

Dump:
# tc -s -d -r class show dev dummy1
class htb 2:1 root prio 3 rate 1000bps ceil 2000bps burst 1609b/8 mpu 0b
  ^
cburst 1619b/8 mpu 0b quantum 100 level 0 buffer [00142000] cbuffer [000a2000]
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0 injects: 0
 tokens: 1318912 ctokens: 663552


Thanks!

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
openh323://dino.rdsbv.ro

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/