[Cake] Announce - possible new feature - DSCP cleaning
Kevin Darbyshire-Bryant
kevin at darbyshire-bryant.me.uk
Tue Nov 10 10:00:39 EST 2015
Greetings :-)
A bit of a blast from the past this one, but one Sebastian Moeller of
this list fame wrote a while ago "
Just played a bit with the shiny new squash option. For my limited testing it seems to work. I do wonder whether the automatic default to besteffort is the ideal behavior though. For example on egress it would be nice to be able to use the internal set DSCP markings but clean them from the outgoing packets as not to leak “information” to the ISP, similarly but more contrived the same could be agued for ingress "
Well Mr Moeller, today is your lucky day because I've just pushed 'squash' branches to both cake & tc-adv that separate the 'DSCP squashing' behaviour from diffserv behaviour. Specifying 'squash' sets diffserv mode to 'besteffort' (ie 1 tin only) and squashes DSCP as before, however if you specify something like 'diffserv4 squash' then DSCP codings are noted at qdisc enqueue so tins/bandwidths are used as marked, then the DSCP marking is squashed so on dequeue DSCP has been removed.
The active bit of the change is (diff):
/* extract the Diffserv Precedence field, if it exists */
- if (q->tin_mode != CAKE_MODE_SQUASH) {
+ if (q->tin_mode != CAKE_MODE_BESTEFFORT) {
tin = q->tin_index[cake_get_diffserv(skb)];
if (unlikely(tin >= q->tin_cnt))
tin = 0;
} else {
- cake_squash_diffserv(skb);
tin = 0;
}
+ /* now clear DSCP bits if squashing */
+ if (q->squash)
+ cake_squash_diffserv(skb);
https://github.com/dtaht/sch_cake/tree/squash & https://github.com/dtaht/tc-adv/tree/squash
Needs testing (I've not managed to break it yet) and *thought before merging*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4816 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20151110/d5bdec15/attachment-0002.bin>
More information about the Cake
mailing list