From: Kurt Wagner <kwagner@cosy.sbg.ac.at>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] GRED queues in Diffserv
Date: Tue, 11 Jun 2002 13:34:10 +0000 [thread overview]
Message-ID: <marc-lartc-102380217623003@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102374919517827@msgid-missing>
Hi Amit,
On Mon, 10 Jun 2002, Amit Kucheria wrote:
> sudo /usr/bin/tc qdisc add dev r1p4 parent 2:1 gred setup DPs 3 default 2
> grio
> ---------------------------------------------------
>
> This last line where I setup the gred qdisc shows a message in the logs as
> "NO GRED Queues setup! ". Can anybody comment on what this could mean? I
> am using 2.2.18 with a Diffserv patch.
>
> TIA,
> Amit
>
> PS.The remainin lines of the script include creating 3 gred qdiscs,
> setting their limits and creating another CBQ class (2:2) for un(ds)marked
> traffic.
Same thing here. I looked into sch_gred.c and it looks like gred complains
about the lack of DP entries in the table as soon as you issue the gred
setup command. I didn't succeed in defining the virtual queues before
I issue the gred setup command, so I decided to live with the log message.
Perhaps there is a better way to do it, but honestly I doubt it - and,
hey, Almesberger uses the same approach in his tcng example script, so at
least it can't be complete nonsense. :)
Kurt
P.S.: attached is my way of doing it - produces the log message, but
works...
#!/bin/sh
#
# author: Kurt Wagner, kwagner@cosy.sbg.ac.at
# last changed: 25.04.02
#
# Script to setup GRED
#
# Gred uses the 4 least sig. bits of skb->tc_index to map packets to
# virtual queues (DP, which stands for drop precedence). This script
# setups 4 virtual queues, packets with tc_index = 0x01 are mapped
# to DP1, 0x02 to DP2 and so on.
#
# The ECN bits (least sig. 2 bits of DS field) are masked out and
# most apps are only able to set a value for the whole DS field (if
# at all), so be carefull which DS field values you choose.
#
# e.g.:
#
# | DS field | tc_index | DP |
# +----------+----------+----+
# | 0x04 | 0x01 | 1 |
# | 0x08 | 0x02 | 2 |
# | 0x0C | 0x03 | 3 |
# | 0x10 | 0x04 | 4 |
#
DEV="eth1"
function usage
{
echo "Usage:" `basename $0` "COMMAND"
echo "where COMMAND := { start | stop | status }"
exit 1
}
if [ $# = 0 ]; then usage ; fi
case "$1" in
start)
# add the dsmarker as root and copys DS field to skb->tc_index
tc qdisc add dev $DEV handle 1:0 root dsmark indices 4 set_tc_index
# mask out ECN bits and shift right by 2 to extract DSCP
tc filter add dev $DEV parent 1:0 protocol ip prio 1 \
tcindex mask 0xfc shift 2
# general gred setup, 4 queues, nr 4 is the default queue, 'grio' says
# we use the RIO like multi-RED behavior to calculate the average queue
# lengths
tc qdisc add dev $DEV parent 1:0 handle 2:0 \
gred setup DPs 4 default 4 grio
# setup virtuall queues, priority 1 is the highest
tc qdisc change dev $DEV handle 2:0 gred limit 200KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 10Mbit probability 0.02 DP 1 prio 1
tc qdisc change dev $DEV handle 2:0 gred limit 200KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 10Mbit probability 0.02 DP 2 prio 2
tc qdisc change dev $DEV handle 2:0 gred limit 200KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 10Mbit probability 0.02 DP 3 prio 3
tc qdisc change dev $DEV handle 2:0 gred limit 200KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 10Mbit probability 0.2 DP 4 prio 4
echo -e "`basename $0` enabled \n"
;;
stop)
tc qdisc del dev $DEV root
echo -e "`basename $0` disabled \n"
;;
status)
tc -s -s -s qdisc ls dev $DEV
;;
*)
usage
;;
esac
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2002-06-11 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 22:45 [LARTC] GRED queues in Diffserv Amit Kucheria
2002-06-11 13:34 ` Kurt Wagner [this message]
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-102380217623003@msgid-missing \
--to=kwagner@cosy.sbg.ac.at \
--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.