[LARTC] qdisc monitoring

2004-12-30 Thread vincent perrier
Hello,
I am interrested in the monitoring of the qos qdiscs parameters such as size
of the queue, enqueues, dequeues, delay in queue, I made a tool to have 
those
results availlable at http://rawsoft.org, but it will probably not work 
anymore
because of the kernel evolutions (the file sch_red.c is patched for the 
tool to work).
I would like to have all the necessary data coming from the kernel so as to
monitor the qdisc queues in a real time way without kernel modification.
Could I have a modified sch_red.c or sch_fifo.c that would contain hooks to
monitor and bring back the results to the user space?
How do I proceed to have a qdisc module creation in the kernel?
Is it possible?
The need to monitor is great: how do we prove the quality of the 
existing qdiscs?
A monitoring tool that needs kernel module modifications is just useless.
Regards
Vincent Perrier

___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] qdisc monitoring

2004-12-30 Thread Thomas Graf
* vincent perrier [EMAIL PROTECTED] 2004-12-30 15:19
 I am interrested in the monitoring of the qos qdiscs parameters such as size
 of the queue, enqueues, dequeues, delay in queue, I made a tool to have 
 those
 results availlable at http://rawsoft.org,

Good effort, I was having something like this in mind for several
months.

 I would like to have all the necessary data coming from the kernel so as to
 monitor the qdisc queues in a real time way without kernel modification.

Not possible, you can access queue length, number of requeues and number
of enqueues via statistics but it will be delayed.

 Could I have a modified sch_red.c or sch_fifo.c that would contain hooks to
 monitor and bring back the results to the user space?

Your current way of doing is correct but the hooks should be macros
being NIL if tracing is not enabled. Furthermore I would favour
using netlink callbacks instead of a char device. I give it good
chances to get into mainline iff there is no performance decrease
if tracing is not enabled and no new char device is created.

I'm willing to help you out in the kernel part.

My thoughts on this are basically:

#ifdef CONFIG_NET_SCHED_TRACE
#define tct_hook_enqueue(...) { ... }
...
#else
#define tct_hook_enqueue(...)
...
#endif

Modify all qdiscs/classifiers to call those hooks (simple).

The hooks generate messages which contain a timestamp
and some data. The skb or at least the header is transfered
to userspace when first seen. Messages are broadcast
over a netlink socket to all subscribers.

So you could basically record the events and then debug it
step-by-step and follow the path of a specific skb, etc.

 How do I proceed to have a qdisc module creation in the kernel?
 Is it possible?

I don't get this question.

 The need to monitor is great: how do we prove the quality of the 
 existing qdiscs?

The algorithms usually get verified in a simulator such as nsim.
The correctness of the implementation is verified through tcsim
in tcng.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB - ethloop - overlimits?

2004-12-30 Thread Stef Coene
On Thursday 30 December 2004 05:50, Oswin Budiman wrote:
 Hi all,

 I'm trying to setup htb on a box with the following class configuration:
snip

Have you done ifconfig lo mtu 1500 ?

Stef
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] traffic shaping , where?

2004-12-30 Thread thebet
Hi
I would want to use the patch for squid released by patrick mcHardy, but
it requires that squid is located on the same machine that does traffic
shaping.  My configuration is different:
i have the screening HDSL router directly connected to a multi-ethernet
firewall and the proxy located on a DMZ box.
 i would want the firewall doing traffic shaping.

   Internet
 |
 -
 -   HDSL ROUTER   -
 -
 |
 |
 - -
 -   FIREWALL   -  -- -   PROXY -
 - -



To the point:
have sense to make traffic shaping on a dmz box that it's not directly 
controlling
the internet link?

Thanks in advance

___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] HTB + GRED (santa clauss plz help me out)

2004-12-30 Thread Antonios Chalkiopoulos

I 've been trynig for a long time now to make HTB and GRED to work togethen. 
The problem beeing that GRED doesn't use handles (instead it uses DP:1 DP:2 
etc) i can not preperly filter traffic to them.

Tomas Graf suggested to use the tc_index index of u32 classifier

so dear Sant .. i am currently with the following scripts that works! 

But when i try to add an HTB before the GRED, everything goes to hell.


tc qdisc add dev $Dev handle 1:0 root dsmark indices 16 set_tc_index 
tc filter add dev $Dev parent 1:0 protocol ip prio 1 tcindex mask 0xfc shift 
2 pass_on
tc filter add dev $Dev parent 1:0 protocol ip prio 1 handle 10 tcindex
classid 1:1
tc filter add dev $Dev parent 1:0 protocol ip prio 1 handle 12 tcindex
classid 1:2
tc filter add dev $Dev parent 1:0 protocol ip prio 1 handle 14 tcindex
classid 1:3
tc qdisc add dev $Dev parent 1:0 gred setup DPs 3 default 30
tc qdisc change dev $Dev parent 1:0 gred limit 6000 min 800 max 1600 burst
12 avpkt 256 bandwidth 10Mbit DP 1probability 0.01
tc qdisc change dev $Dev parent 1:0 gred limit 6000 min 800 max 1600 burst
12 avpkt 256 bandwidth 10Mbit DP 2probability 0.01
tc qdisc change dev $Dev parent 1:0 gred limit 6000 min 800 max 1600 burst
12 avpkt 256 bandwidth 10Mbit DP 3probability 0.01

any ideas guys?

Would really apreciate it
Thanks alg0
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] shaping on tcp ports

2004-12-30 Thread Stef Coene
On Wednesday 29 December 2004 13:50, Paras pradhan wrote:
 hi all:

 the following scipt is wokring perfectly with limiting ...on limimitng per
 ip basis..


 
 eth0=public static ip
 eth2= private ip ( 192.168.2.1)
 --
 iptables -t mangle -A POSTROUTING -s ! 192.168.0.0/32 -d 192.168.2.101/32
 -j MARK --set-mark 21012

 tc class add dev eth2 parent 1:1 classid 1:2101 htb rate 32kbit ceil 64kbit

 tc filter add dev eth2 parent 1:0 protocol ip prio 2 handle 21012 fw
 classid 1:2101

 tc qdisc add dev eth2 parent 1:2101 handle 2101: sfq perturb 10

 -

 Now what i am trying to do is... limiting 192.168.2.101 75% for httpd and
 25% to rest..

 what i have to do? i am confused on iptables marking as well..
You need 2 htb classes, 1 for httpd and 1 for the rest.
And you need 2 iptables rules, 1 to mark httpd and 1 to mark the rest.
And you need 2 filter rules, 1 to put the marked httpd traffic in the httpd 
class and to put the other traffic in the other class.

Stef
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/