Re: [PATCH net-next 3/6] flow_dissector: Add hash_extra field to flow_keys struct
flat view
From: Dave Taht <hidden>
Date: 2015-03-01 19:57:36
On Sun, Mar 1, 2015 at 10:24 AM, Florian Westphal [off-list ref] wrote:
Tom Herbert [off-list ref] wrote:quoted
On Sat, Feb 28, 2015 at 12:31 PM, Florian Westphal [off-list ref] wrote:quoted
I've been toying around with reducing skb->cb[] to 44 bytes, Seems Tom could integrate following patch from my test branch: http://git.breakpoint.cc/cgit/fw/net-next.git/commit/?h=skb_cb_44_01&id=29d711e1a71244b71940c2d1e346500bef4d6670 It makes sfq use a smaller flow key state.Alternatively, I think we might be able to eliminate the use of flow_keys and flow_dissect from the qdisc code altogether. It looks like this is only being used to determine a hash over the addresses, ports, and protocol so I am thinking that we can just call skb_get_hash for that. Will try to post some patches soon.The problem with this is that you'll lose the secret input to jhash in sfq_hash().
fq_codel relies on a secret input to the hash also, but it is only created at instantation time. Retaining that secret input is critical - otherwise an attacker can fairly easily derive the hash and find ways of flooding the connection at low rates that are almost as effective as simple attacks against pfifo_fast. A note on sfq: it is commonly deployed with perturb 10 - which acts as a "poor man's AQM" scrambling big flows and causing tcp cwnd reductions - or at least it used to before linux gained much better resilience in re-ordering. Either behavior - blowing up tcp flows (then) - or allowing them to overbuffer (now) is pretty undesirable. I have gone in detail on everything that is wrong with common SFQ deployments here, commenting extensively on what was once, one of the most popular shapers in the world: http://www.bufferbloat.net/projects/cerowrt/wiki/Wondershaper_Must_Die
assuming you have packets p1 and p2 (from different flows) with skb_get_hash(p1) == skb_get_hash(p2) those flows share same queue/bin forever as the hash pertubation will no longer work. For sfq, hash collisions may exist as well but they'll be resolved after some time when q->perturbation (its part of hash input) is reseeded. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Dave Täht Let's make wifi fast, less jittery and reliable again! https://plus.google.com/u/0/107942175615993706558/posts/TVX3o84jjmb