Tweaking SQM (simple.qos) for 2 heavy bulk classes that need to be differentiated

Hi gents

I'm a new lede user and I have recently gotten everything working the way it should. The default SQM works great for my environment as long as it is like everyone elses environment.

Except, I have two very heavy bulk outgoing streams that pin my 10Mbps outgoing for some hours each day. When the two streams are in contention, I need to divide their access about 70/30. These are tagged DSCP 60 and 63 (those might be bad choices in retrospect..) at the source, and previously I was using tomato QOS to minimum-rate those streams appropriately and that worked great.

I have tried to do this by editing simple.qos to add 2 more classes. In my testing, those seem to work.
When I hijack the 'catch all' built in filter and direct that traffic to my class, it is hard limited the way I expect (hard limited simply so that the effect is obvious for my testing).

However, none of the filters I have tried to create work at all. Since DSCP catches nothing (I don't know if my use of dsfield is quite correct, admittedly) I tried to do an IP based filter just for testing, and that fails too - but I assume this is because source IP's are not available at this point because of NAT.

Here are my filters:

$TC filter add dev $IFACE parent 1:0 protocol ip prio 1 u32 match ip dsfield 0xFC 0xFF flowid 1:14

$TC filter add dev $IFACE parent 1:0 protocol ip prio 2 u32 match ip dsfield 0xF0 0xFF flowid 1:15

$TC filter add dev $IFACE parent 1:0 protocol ip prio 3 u32 match ip src 192.168.10.148/24 flowid 1:14

None seems to catch anything. Does anyone have any suggestions?

thanks

Hi Bluenote,

it is me again :wink: have you tried classid instead of flowid? from man tc-u32:
classid CLASSID
Classify matching packets into the given CLASSID, which consists of either 16bit major and minor numbers or a single 32bit value combining both.

flowid is mentioned in one example but not expanded on. sqm-script's fc() in function.sh uses classid...

Also the mask should be 0xFC instead of 0xFF as the tos/dsfiled is only 6bits wide...

Now most likely this fixes nothing, but it sees to better rhyme with man tc-u32...

Best Regards

1 Like

Final note, you might want to repeat the same approach for ipv6 (once the ipv4 filters work) to future proof this...

Hi moeller :slight_smile:

I just got this sorted out with generous guidance from #bufferbloat on top of the foundation of advice and education you provided. I found out that firstly, using iperf3 to generate DSCP marked packets doesn't work to test, also, my windows DSCP marking was using other values, because, group policy rigmarole. In the end ping -Q TOS did work to provide test packets though. I also switched where I was filtering, I will post my final results in both threads sometime soon in case someone comes along who also needs to do something like this.

thanks for your patience and help! :slight_smile: