Re: DSCP, ToS and Egress

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was just looking at your QoS Script. Did you ever notice that no
packets will be put into gred dp3 ? 

I was using a similar script based on AF examples on the web and
apparently in the gred qdisc now when you declare 3 dps they are
numbered 0,1,2 and not 1,2,3.

This line in gred_enqueue in sch_gred.c will prevent packets that you
have given a tcindex of 113,123,133,143 of being put in the right dp. 
They will get put into the default dp.

if ( ((skb->tc_index&0xf) > (t->DPs -1)) || !(q=t->tab[skb-
>tc_index&0xf])) {

This isnt a bug in the code either as I found out. 

You could take the -1 out of this line or else use gred DP0 , DP1, DP2
and change your tcindex classifiers to 110,111,112

Jonathan

On Fri, 2005-02-18 at 11:25 -0600, Dan Cox wrote:
> I've added a few more helper functions for a more complete demonstration. I've
> also added some suggested default values (see script).
> Here's an example usage for a 100mbit LAN:
> 
> # Load the functions into the environment
> #
> source diffserv.sh
> #
> # Set device queue length and MTU
> #
> init_device eth1 10 1500
> #
> # Clear the device qdiscs
> #
> reset_qdisc eth1
> #
> # Create the root DSMARK qdisc & filters.
> #
> init_classifier eth1 10:
> #
> # Now create our main HTB qdisc
> # We attach to the parent DSMARK qdisc (10:) and give ourselves a handle of 1:
> #
> qdisc eth1 "parent 10: handle 1: htb default 1 r2q 1"
> #
> # Now we create our leaf HTB + GRED classes and qdiscs to perform diffserv
> # Note that this will create HTB classes underneath the HTB qdisc (1:)
> #
> diffserv 1: eth1 100000 100000 1000 10 1500 1500 64 0
> 
> In a more complex setup, you can insert additional levels of HTB classes under
> the HTB qdisc and then call 'diffserv' on those leaf classes, but remember to
> add additional filters (can NOT use iptables CLASSIFY target) or traffic will
> never reach those classes. 'diffserv' assumes traffic has already made 
> it as far
> as its parent qdisc (or class) and attaches it's filters there.
> 
> Dan-
> 

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux