SQM cake question: squash?

In SQM (cake), there is an option to ‘squash’ the input data:

option squash_dscp '1'
option squash_ingress '1'

I am trying to figure out when to use this option and when not to use this, but I could not find a proper description.
Can someone explain this?

tc qdisc replace dev lo root cake help
Usage: ... cake [ bandwidth RATE | unlimited* | autorate-ingress ]
                [ rtt TIME | datacentre | lan | metro | regional |
                  internet* | oceanic | satellite | interplanetary ]
                [ besteffort | diffserv8 | diffserv4 | diffserv3* ]
                [ flowblind | srchost | dsthost | hosts | flows |
                  dual-srchost | dual-dsthost | triple-isolate* ]
                [ nat | nonat* ]
                [ wash | nowash* ]
                [ split-gso* | no-split-gso ]
                [ ack-filter | ack-filter-aggressive | no-ack-filter* ]
                [ memlimit LIMIT ]
                [ fwmark MASK ]
                [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]
                [ mpu N ] [ ingress | egress* ]
                (* marks defaults)

squash_dscp tells Sqm-scripts to wash the DSCP marks from packets after CAKE has processed them.

squash_ingress tells Sqm-scripts to ignore any DSCP marks on incoming traffic by using besteffort (versus diffserv3/4/8).

3 Likes

+1;

I want to add that these two also work for simple.qos three tier HTB+fq_codel setup. But essentially the idea is the same except that these options precede cake's existence and IIRC inspired cake's wash functionality (especially the fact that cake will wash only after using DSCPs to steer packets into the different priority tiers, because if you do not want to use priority tiers, configure besteffort...)

P.S.: when using cake I would manually add the wash keyword to iqdisc_opts and eqdisc_opts that way you have control about the directionality of the washing.
Some users report that their ISPs show that (some) egress DSCPs affect packet loss and/or latency and jitter and hence want to wash their internal DSCPs before sending packets to the ISP, but at the same time might want to use DSCPs internally both for cake and for WiFi AC selection...

1 Like

Clear, this explains what it does.
But in which situation would you enable or disable this?

squash_ingress: use if you do not want to use priritosation based on DSCPs for packets from the internet. Unless you have an agreement with your ISP it is very unlikely that DSCPs of incoming packets are according to your marking preferences. If you do not use anything that sets DSCPs for those packets according to your desires (e.g. one of the qosify, qosmate, DSCPclassify, cake-qos-simple OpenWrt projects) then this option might be for you...
That said, I personally use neither of the listed projects but do not set squash_ingress, but I do regularly check the tc -s qdisc output to see which priority tins my ISP services. Since the majority is inside the BestEffort tin, the side-effects from that small experiment are minimal.

squash_dscp: You use this if you do not want the internet DSCPs to be visible/active within your own network.

So squash_ingress makes DSCPs ineffective as all traffic shares a single priority tier, but it conserves the DSCP values. squash_dscp however re-marks all DSCP values to zero.

1 Like

So, you check what the ISP provides and depending on the result and whether you want to set your own markings, you set these values.
I will check what my ISP does.
Thanks!

Not really, I just want a quick way to check whether my ISP zeros all DSCPs, as some grey beards i the IETF claim. Spoiler alert: no my ISP lets quite some DSCPs through my way.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.