Hi, I''m trying to get a handle on hfsc. Here is my configuration: root@jmnrouter:/jmn# tc class show dev vlan1 class hfsc 1: root class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 225000bit ul m1 0bit d 0us m2 225000bit class hfsc 1:10 parent 1:1 rt m1 191000bit d 25.0ms m2 135000bit ls m1 0bit d 0us m2 135000bit ul m1 0bit d 0us m2 225000bit class hfsc 1:20 parent 1:1 rt m1 22008bit d 25.0ms m2 56008bit ls m1 0bit d 0us m2 56008bit ul m1 0bit d 0us m2 225000bit class hfsc 1:30 parent 1:1 rt m1 11008bit d 25.0ms m2 22008bit ls m1 0bit d 0us m2 22008bit ul m1 0bit d 0us m2 225000bit class hfsc 1:40 parent 1:1 rt m1 0bit d 25.0ms m2 11008bit ls m1 0bit d 0us m2 11008bit ul m1 0bit d 0us m2 225000bit And here is the stats right after I run the qos script with no load on the link(adsl): root@jmnrouter:/jmn# tc -s class show dev vlan1 class hfsc 1: root Sent 0 bytes 0 pkts (dropped 0, overlimits 0) period 0 level 2 class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 225000bit ul m1 0bit d 0us m2 225000bit Sent 0 bytes 0 pkts (dropped 0, overlimits 0) period 349 work 42417 bytes level 1 class hfsc 1:10 parent 1:1 rt m1 191000bit d 25.0ms m2 135000bit ls m1 0bit d 0us m2 135000bit ul m1 0bit d 0us m2 225000bit Sent 31297 bytes 304 pkts (dropped 18, overlimits 0) period 304 work 31297 bytes rtwork 30991 bytes level 0 class hfsc 1:20 parent 1:1 rt m1 22008bit d 25.0ms m2 56008bit ls m1 0bit d 0us m2 56008bit ul m1 0bit d 0us m2 225000bit Sent 7302 bytes 17 pkts (dropped 2, overlimits 0) period 17 work 7302 bytes rtwork 7010 bytes level 0 class hfsc 1:30 parent 1:1 rt m1 11008bit d 25.0ms m2 22008bit ls m1 0bit d 0us m2 22008bit ul m1 0bit d 0us m2 225000bit Sent 3818 bytes 28 pkts (dropped 0, overlimits 0) period 28 work 3818 bytes rtwork 3818 bytes level 0 class hfsc 1:40 parent 1:1 rt m1 0bit d 25.0ms m2 11008bit ls m1 0bit d 0us m2 11008bit ul m1 0bit d 0us m2 225000bit Sent 0 bytes 0 pkts (dropped 0, overlimits 0) period 0 level 0 Why is there dropped packets but nothing overlimits?? Thanks. FYI Here is the relevant scipt commands I have dsl 1.5down and 256up. + tc qdisc del dev vlan1 root + tc qdisc add dev vlan1 root handle 1: hfsc default 30 + tc class add dev vlan1 parent 1: classid 1:1 hfsc ls rate 225kbit ul rate 225kbit + tc class add dev vlan1 parent 1:1 classid 1:10 hfsc rt m1 191kbit d 25ms m2 135kbit ls rate 135kbit ul rate 225kbit + tc class add dev vlan1 parent 1:1 classid 1:20 hfsc rt m1 22kbit d 25ms m2 56kbit ls rate 56kbit ul rate 225kbit + tc class add dev vlan1 parent 1:1 classid 1:30 hfsc rt m1 11kbit d 25ms m2 22kbit ls rate 22kbit ul rate 225kbit + tc class add dev vlan1 parent 1:1 classid 1:40 hfsc rt m1 0kbit d 25ms m2 11kbit ls rate 11kbit ul rate 225kbit + tc filter add dev vlan1 parent 1: prio 1 protocol ip handle 1 fw flowid 1:10 + tc filter add dev vlan1 parent 1: prio 2 protocol ip handle 2 fw flowid 1:20 + tc filter add dev vlan1 parent 1: prio 3 protocol ip handle 3 fw flowid 1:30 + tc filter add dev vlan1 parent 1: prio 4 protocol ip handle 4 fw flowid 1:40
James Nelson wrote:> Hi, > > I''m trying to get a handle on hfsc. Here is my configuration: > > root@jmnrouter:/jmn# tc class show dev vlan1 > class hfsc 1: root > class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 225000bit ul m1 0bit d 0us m2 > 225000bit > class hfsc 1:10 parent 1:1 rt m1 191000bit d 25.0ms m2 135000bit ls m1 0bit > d 0us m2 135000bit ul m1 0bit d 0us m2 225000bit > class hfsc 1:20 parent 1:1 rt m1 22008bit d 25.0ms m2 56008bit ls m1 0bit d > 0us m2 56008bit ul m1 0bit d 0us m2 225000bit > class hfsc 1:30 parent 1:1 rt m1 11008bit d 25.0ms m2 22008bit ls m1 0bit d > 0us m2 22008bit ul m1 0bit d 0us m2 225000bit > class hfsc 1:40 parent 1:1 rt m1 0bit d 25.0ms m2 11008bit ls m1 0bit d 0us > m2 11008bit ul m1 0bit d 0us m2 225000bit > > And here is the stats right after I run the qos script with no load on the > link(adsl): > root@jmnrouter:/jmn# tc -s class show dev vlan1 > class hfsc 1: root > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > period 0 level 2 > > class hfsc 1:1 parent 1: ls m1 0bit d 0us m2 225000bit ul m1 0bit d 0us m2 > 225000bit > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > period 349 work 42417 bytes level 1 > > class hfsc 1:10 parent 1:1 rt m1 191000bit d 25.0ms m2 135000bit ls m1 0bit > d 0us m2 135000bit ul m1 0bit d 0us m2 225000bit > Sent 31297 bytes 304 pkts (dropped 18, overlimits 0) > period 304 work 31297 bytes rtwork 30991 bytes level 0 > > class hfsc 1:20 parent 1:1 rt m1 22008bit d 25.0ms m2 56008bit ls m1 0bit d > 0us m2 56008bit ul m1 0bit d 0us m2 225000bit > Sent 7302 bytes 17 pkts (dropped 2, overlimits 0) > period 17 work 7302 bytes rtwork 7010 bytes level 0 > > class hfsc 1:30 parent 1:1 rt m1 11008bit d 25.0ms m2 22008bit ls m1 0bit d > 0us m2 22008bit ul m1 0bit d 0us m2 225000bit > Sent 3818 bytes 28 pkts (dropped 0, overlimits 0) > period 28 work 3818 bytes rtwork 3818 bytes level 0 > > class hfsc 1:40 parent 1:1 rt m1 0bit d 25.0ms m2 11008bit ls m1 0bit d 0us > m2 11008bit ul m1 0bit d 0us m2 225000bit > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > period 0 level 0 > > > Why is there dropped packets but nothing overlimits??Overlimits counts dequeue-attempts that were unsuccessful because of qdisc limits. Drops usually occur when the inner qdisc is full during enqueue, so they have quite opposite meanings.
Patrick McHardy wrote:> James Nelson wrote: > >>root@jmnrouter:/jmn# tc class show dev vlan1 >> [...] >> >>Why is there dropped packets but nothing overlimits?? > > > Overlimits counts dequeue-attempts that were unsuccessful because of > qdisc limits. Drops usually occur when the inner qdisc is full during > enqueue, so they have quite opposite meanings.BTW, in your case the drops most likely occur because HFSC''s default pfifo child qdiscs use the tx_queue_len of the device as their limit, which in case of vlan devices is zero (in that case 1 is used). So you can either increase the tx_queue_len of the vlan device or manually add child qdiscs with bigger limits.
Thanks for the reply! Setting the tx_queue_len fixed the drops which got rid of the studder in voip! Thanks. -----Original Message----- From: Patrick McHardy [mailto:kaber@trash.net] Sent: Monday, March 13, 2006 6:03 PM To: James Nelson Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] hfsc and dropped packets Patrick McHardy wrote:> James Nelson wrote: > >>root@jmnrouter:/jmn# tc class show dev vlan1 [...] >> >>Why is there dropped packets but nothing overlimits?? > > > Overlimits counts dequeue-attempts that were unsuccessful because of > qdisc limits. Drops usually occur when the inner qdisc is full during > enqueue, so they have quite opposite meanings.BTW, in your case the drops most likely occur because HFSC''s default pfifo child qdiscs use the tx_queue_len of the device as their limit, which in case of vlan devices is zero (in that case 1 is used). So you can either increase the tx_queue_len of the vlan device or manually add child qdiscs with bigger limits.