This patch updates qos-scripts to support fair traffic sharing using the SFQ with external classifiers method. It also corrects a bug in the unsupported ESFQ method already used by qos-scripts. (ESFQ: http://fatooh.org/esfq-2.6/ only updated to 2.6.24, it was switched to an SFQ patch after that and not updated since 2008)

A class can be forced to use SFQ, and an external classifier added like
this:

config class "Normal"
         option avgrate     10
         option priority    30
         option packetdelay 100
         option limitrate   94
#       option qdisc      "sfq perturb 2"
config class "Normal_up"
#       option filter   "protocol all flow hash keys src divisor 1024"
config class "Normal_down"
#       option filter   "protocol all flow hash keys dst divisor 1024"

Using these options, the user needs to load cls_flow before qos-scripts
starts.

I've got more information here:
http://oneitguy.com/blogs/netprince/fair-traffic-sharing-esfq-broken-switching-sfqexternal-classifiers

This has been tested on r23914.

Signed-off-by: Ben Pfountz <netprince<>vt_edu>

SVN-Revision: 26622
This commit is contained in:
Jo-Philipp Wich
2011-04-12 20:33:11 +00:00
parent b32797cc55
commit 9646ca6c6e
3 changed files with 16 additions and 11 deletions

View File

@@ -315,10 +315,10 @@ start_interface() {
cls_var maxrate "$class" limitrate $dir 100
cls_var prio "$class" priority $dir 1
cls_var avgrate "$class" avgrate $dir 0
cls_var qdisc_esfq "$class" qdisc_esfq $dir ""
[ "$qdisc_esfq" != "" ] && add_insmod sch_esfq
cls_var qdisc "$class" qdisc $dir ""
cls_var filter "$class" filter $dir ""
config_get classnr "$class" classnr
append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc_esfq" "$N"
append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc:$filter" "$N"
done
append ${prefix}q "$(tcrules)" "$N"
export dev_${dir}="ifconfig $dev up txqueuelen 5 >&- 2>&-