Opened 4 years ago
Closed 3 years ago
#1095 closed (fixed)
HFSC QoS script sets uplink wrong
| Reported by: | phuzi0n | Owned by: | somebody |
|---|---|---|---|
| Keywords: | QoS HFSC HTB | Cc: |
Description (last modified by phuzi0n)
The HFSC script configures both interfaces with tc classes that are the speed entered for your downlink. The code in svqos.hfsc shows that it's using $2 to set both interfaces. Also, there's inconsistent usage of $1 and $2 in svqos.htb and svqos.hfsc. It seems that svqos.htb has the downlink set in $1 but svqos.hfsc has the downlink set in $2 which leads to more confusion.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=52339
For users wishing to correct this themselves, configure the GUI QoS however you like but leave it set to use HTB. Then go to the Administration->Commands page and save this startup and firewall script. If you want you can remove the startup script and store it somewhere permanent such as JFFS.
#Startup cd /tmp wget http://phuzi0n.googlecode.com/svn/trunk/svqos.hfsc chmod +x svqos.hfsc #Firewall if [ 1 == `nvram get wshaper_enable` ]; then /tmp/svqos.hfsc `nvram get wshaper_uplink` `nvram get wshaper_downlink` `nvram get wan_iface` `nvram get wan_mtu` 0 fi
Change History (9)
comment:1 Changed 4 years ago by BrainSlayer
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed 4 years ago by phuzi0n
- Resolution invalid deleted
- Status changed from closed to reopened
I guess that's why you just corrected one of the mistakes then, because I just don't understand it? The HFSC script has major problems and if you didn't read then link then here's the evidence plain and simple.
Here's my classes with up 384kbps / down 1536 kbps.
root@DD-WRT:~# tc class show dev imq0
class hfsc 1: root
class hfsc 1:1 parent 1: sc m1 0bit d 0us m2 100000Kbit ul m1 0bit d 0us m2 100000Kbit
class hfsc 1:100 parent 1:1 leaf 100: ls m1 100000Kbit d 100.0ms m2 100000Kbit ul m1 0bit d 0us m2 100000Kbit
class hfsc 1:10 parent 1:1 leaf 10: rt m1 0bit d 6.1ms m2 307000bit ls m1 0bit d 9.0ms m2 1152Kbit ul m1 0bit d 0us m2 1536Kbit
class hfsc 1:20 parent 1:1 leaf 20: rt m1 0bit d 7.5ms m2 460000bit ls m1 0bit d 9.6ms m2 1152Kbit ul m1 0bit d 0us m2 1536Kbit
class hfsc 1:30 parent 1:1 leaf 30: rt m1 324328bit d 37.0ms m2 153000bit ls m1 0bit d 21.4ms m2 768000bit ul m1 0bit d 0us m2 1536Kbit
class hfsc 1:40 parent 1:1 leaf 40: ls m1 153000bit d 500.0ms m2 153000bit ul m1 0bit d 0us m2 1382Kbit
root@DD-WRT:~# tc class show dev eth1
class hfsc 1: root
class hfsc 1:1 parent 1: sc m1 0bit d 0us m2 100000Kbit ul m1 0bit d 0us m2 100000Kbit
class hfsc 1:100 parent 1:1 leaf 100: ls m1 100000Kbit d 100.0ms m2 100000Kbit ul m1 0bit d 0us m2 100000Kbit
class hfsc 1:10 parent 1:1 leaf 10: rt m1 0bit d 6.1ms m2 307000bit ls m1 0bit d 9.0ms m2 1152Kbit ul m1 0bit d 0us m2 1536Kbit
class hfsc 1:20 parent 1:1 leaf 20: rt m1 0bit d 7.5ms m2 460000bit ls m1 0bit d 9.6ms m2 1152Kbit ul m1 0bit d 0us m2 1536Kbit
class hfsc 1:30 parent 1:1 leaf 30: rt m1 324328bit d 37.0ms m2 153000bit ls m1 0bit d 21.4ms m2 768000bit ul m1 0bit d 0us m2 1536Kbit
class hfsc 1:40 parent 1:1 leaf 40: ls m1 153000bit d 500.0ms m2 153000bit ul m1 0bit d 0us m2 1382Kbit
comment:3 Changed 4 years ago by phuzi0n
Line 637 and 639 clearly show that ul_val and dl_val are being passed in a different order to each script.
http://svn.dd-wrt.com:8000/dd-wrt/browser/src/router/services/networking/wshaper.c?rev=11938#L637
comment:4 Changed 4 years ago by phuzi0n
- priority changed from major to critical
Here's a corrected HFSC script.
comment:5 Changed 4 years ago by jstein
I have the same problem as phuzi0n. I fixed it with a custom script to correct for the ppp0 interface. \
comment:6 Changed 4 years ago by phuzi0n
- priority changed from critical to blocker
Please don't ignore this bug.
comment:8 Changed 3 years ago by phuzi0n
- Description modified (diff)
comment:9 Changed 3 years ago by phuzi0n
- Resolution set to fixed
- Status changed from reopened to closed
Fixed in r14390

dont try to analyse these scripts if you dont know how they are working