Hi, What is the operation drop() in Qdisc_ops for? What are the requirements on a new qdisc? As far as I can tell, the classfull qdiscs just pass it on to child qdiscs and classless qdiscs drop the most recently queued packet. I can''t find any code that initiates all this though. The operation is not described in the comments in sch_api.c where enqueue, dequeue, requeue, reset, init, destroy & change are described (dump isn''t described either). Chris. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi, ok, I dropped the idea of using Wondershaper without having background knowledge and are now trying to set up my own script :) Can anyone please take a look at the following script and point me to any errors? Thanks! my max. upload bandwidth is 192 Kbit/s and my goal is to ensure smooth gameplay (udp) while allowing other protocols to use up the remaining bandwidth. Mail is supposed to be treated with the least priority. Cheers, Tom. #----------------------------------------------------- # clean existing down- and uplink qdiscs, hide errors tc qdisc del dev ppp0 root 2> /dev/null > /dev/null tc qdisc del dev ppp0 ingress 2> /dev/null > /dev/null #root htb with non-classified data to 1:11 tc qdisc add dev ppp0 root handle 1: htb default 11 #max uplink class tc class add dev ppp0 parent 1: classid 1:1 htb rate 180kbit ceil 180kbit burst 2k #interactice class tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 130kbit ceil 180kbit burst 2k prio 0 #default class tc class add dev ppp0 parent 1:1 classid 1:11 htb rate 40kbit ceil 180kbit burst 2k prio 1 #slow class tc class add dev ppp0 parent 1:1 classid 1:12 htb rate 10kbit ceil 70kbit burst 2k prio 2 #put udp into interactive class tc filter add dev ppp0 parent 1:0 protocol ip prio 0 u32 \ match ip protocol 17 0xff \ flowid 1:10 #put mail into slow class tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ match ip sport 25 0xffff \ flowid 1:12 tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ match ip dport 25 0xffff \ flowid 1:12 tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ match ip sport 110 0xffff \ flowid 1:12 tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ match ip dport 110 0xffff \ flowid 1:12 #----------------------------------------------------- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Chris, Have you discovered the following source of documentation on the QoS APIs for linux, yet? http://qos.ittc.ukans.edu/howto/index.html : What is the operation drop() in Qdisc_ops for? Well, from the userland perspective, drop is just like a netfilter -j DROP. Essentially we are saying "throw that packet away". : What are the requirements on a new qdisc? /me retreats to userland, maybe the link above will provide an answer. : As far as I can tell, the classfull qdiscs just pass it on to child : qdiscs and classless qdiscs drop the most recently queued packet. I : can''t find any code that initiates all this though. Again, try the above documentation. : The operation is not described in the comments in sch_api.c where : enqueue, dequeue, requeue, reset, init, destroy & change are described : (dump isn''t described either). Here''s a little bit on dump. http://qos.ittc.ukans.edu/howto/node16.html Good luck, -Martin -- Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi, I would suggest adding an sfq qdic to class 1:10, 1:11 and 1:12: tc qdisc add dev ppp0 handle 2:0 parent 1:10 sfq perturb 10 tc qdisc add dev ppp0 handle 3:0 parent 1:11 sfq perturb 10 tc qdisc add dev ppp0 handle 4:0 parent 1:12 sfq perturb 10 nothing else would have to be changed, sfq makes sure that when your upload is maxed no connection can dominate over others and everyone gets a fair amount of the bandwidth. For more info on sfq read chapter 9.2.3 of the LARTC howto. Regards, Ata ----- Original Message ----- From: "Tom Verbeek" <tom@designobjekt.de> To: <lartc@mailman.ds9a.nl> Sent: Thursday, August 07, 2003 2:08 PM Subject: [LARTC] any errors in this script?> Hi, > > ok, I dropped the idea of using Wondershaper without having background > knowledge and are now trying to set up my own script :) > > Can anyone please take a look at the following script and point me to > any errors? Thanks! > > my max. upload bandwidth is 192 Kbit/s and my goal is to ensure smooth > gameplay (udp) while allowing other protocols to use up the remaining > bandwidth. Mail is supposed to be treated with the least priority. > > Cheers, > Tom. > > #----------------------------------------------------- > # clean existing down- and uplink qdiscs, hide errors > tc qdisc del dev ppp0 root 2> /dev/null > /dev/null > tc qdisc del dev ppp0 ingress 2> /dev/null > /dev/null > > #root htb with non-classified data to 1:11 > tc qdisc add dev ppp0 root handle 1: htb default 11 > > #max uplink class > tc class add dev ppp0 parent 1: classid 1:1 htb rate 180kbit ceil 180kbitburst 2k> > #interactice class > tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 130kbit ceil180kbit burst 2k prio 0> > #default class > tc class add dev ppp0 parent 1:1 classid 1:11 htb rate 40kbit ceil 180kbitburst 2k prio 1> > #slow class > tc class add dev ppp0 parent 1:1 classid 1:12 htb rate 10kbit ceil 70kbitburst 2k prio 2> > #put udp into interactive class > tc filter add dev ppp0 parent 1:0 protocol ip prio 0 u32 \ > match ip protocol 17 0xff \ > flowid 1:10 > > #put mail into slow class > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip sport 25 0xffff \ > flowid 1:12 > > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip dport 25 0xffff \ > flowid 1:12 > > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip sport 110 0xffff \ > flowid 1:12 > > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip dport 110 0xffff \ > flowid 1:12 > #----------------------------------------------------- > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
The description of drop given doesn''t make sense. It says that it is required for qdiscs such as RED which need to drop packets. However, the RED code drops packets in enqueue (by not queuing them), not by making the system call the drop op. I can''t find any code that calls the drop op, except for the classfull qdiscs which are just propagating the call to the child qdiscs. Chris. ----- Original Message ----- From: "Martin A. Brown" <mabrown-lartc@securepipe.com> To: "Chris Paulson-Ellis" <chris@edesix.com> Cc: <lartc@mailman.ds9a.nl> Sent: Thursday, August 07, 2003 1:25 PM Subject: Re: [LARTC] What is drop in Qdisc_ops for?> > Chris, > > Have you discovered the following source of documentation on the QoS > APIs for linux, yet? > > http://qos.ittc.ukans.edu/howto/index.html > > : What is the operation drop() in Qdisc_ops for? > > Well, from the userland perspective, drop is just like a netfilter -j > DROP. Essentially we are saying "throw that packet away". > > : What are the requirements on a new qdisc? > > /me retreats to userland, maybe the link above will provide an answer. > > : As far as I can tell, the classfull qdiscs just pass it on to child > : qdiscs and classless qdiscs drop the most recently queued packet. I > : can''t find any code that initiates all this though. > > Again, try the above documentation. > > : The operation is not described in the comments in sch_api.c where > : enqueue, dequeue, requeue, reset, init, destroy & change are described > : (dump isn''t described either). > > Here''s a little bit on dump. > > http://qos.ittc.ukans.edu/howto/node16.html > > Good luck, > > -Martin > > -- > Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 07 August 2003 14:08, Tom Verbeek wrote:> Hi, > > ok, I dropped the idea of using Wondershaper without having background > knowledge and are now trying to set up my own script :)ok :)> my max. upload bandwidth is 192 Kbit/s and my goal is to ensure smooth > gameplay (udp) while allowing other protocols to use up the remaining > bandwidth. Mail is supposed to be treated with the least priority. > > Cheers, > Tom. > > #----------------------------------------------------- > # clean existing down- and uplink qdiscs, hide errors > tc qdisc del dev ppp0 root 2> /dev/null > /dev/null > tc qdisc del dev ppp0 ingress 2> /dev/null > /dev/null > > #root htb with non-classified data to 1:11 > tc qdisc add dev ppp0 root handle 1: htb default 11 > > #max uplink class > tc class add dev ppp0 parent 1: classid 1:1 htb rate 180kbit ceil 180kbit > burst 2k > > #interactice class > tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 130kbit ceil 180kbit > burst 2k prio 0 > > #default class > tc class add dev ppp0 parent 1:1 classid 1:11 htb rate 40kbit ceil 180kbit > burst 2k prio 1 > > #slow class > tc class add dev ppp0 parent 1:1 classid 1:12 htb rate 10kbit ceil 70kbit > burst 2k prio 2 > > #put udp into interactive class > tc filter add dev ppp0 parent 1:0 protocol ip prio 0 u32 \ > match ip protocol 17 0xff \ > flowid 1:10 > > #put mail into slow class > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip sport 25 0xffff \ > flowid 1:12 > > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip dport 25 0xffff \ > flowid 1:12 > > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip sport 110 0xffff \ > flowid 1:12 > > tc filter add dev ppp0 parent 1:0 protocol ip prio 2 u32 \ > match ip dport 110 0xffff \ > flowid 1:12You set a burst of 2k and that''s too low. Just remove the burst parameter so htb can calculate the minimal burst for you. Different prio''s for the filters makes no different because it''s only used to order the filters. DIfferent prio''s for htb classes can be dangerous. If a low prio class like class 1:10 receives more data then it''s rate (130kbit), the latency can go way up. So it''s important the you monitor your setup so your low prio classes are never overlimited. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/