]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net/sched: cls_flower: Use masked key when calling HW offloads
authorPaul Blakey <paulb@mellanox.com>
Wed, 14 Dec 2016 17:00:58 +0000 (19:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Dec 2016 15:44:35 +0000 (10:44 -0500)
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 <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_flower.c

index 9758f5adbc2aa1fc44955b3eeed69b9dbc79b2e6..35ac28d0720cb89310cea548bed003957bb10a46 100644 (file)
@@ -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;