From: Paul Blakey Date: Wed, 14 Dec 2016 17:00:58 +0000 (+0200) Subject: net/sched: cls_flower: Use masked key when calling HW offloads X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f93bd17b916959fc20fbb7dc578e1f2657a8c343;p=linux-beck.git net/sched: cls_flower: Use masked key when calling HW offloads Zero bits on the mask signify a "don't care" on the corresponding bits in key. Some HWs require those bits on the key to be zero. Since these bits are masked anyway, it's okay to provide the masked key to all drivers. Fixes: 5b33f48842fa ('net/flower: Introduce hardware offload support') Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 9758f5adbc2a..35ac28d0720c 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -252,7 +252,7 @@ static int fl_hw_replace_filter(struct tcf_proto *tp, offload.cookie = (unsigned long)f; offload.dissector = dissector; offload.mask = mask; - offload.key = &f->key; + offload.key = &f->mkey; offload.exts = &f->exts; tc->type = TC_SETUP_CLSFLOWER;