summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Blakey2016-12-14 18:00:58 +0100
committerDavid S. Miller2016-12-17 16:44:35 +0100
commitf93bd17b916959fc20fbb7dc578e1f2657a8c343 (patch)
treee362e0d647151a2c26d037db341a12d5cabd7783
parentnet/sched: cls_flower: Use mask for addr_type (diff)
downloadkernel-qcow2-linux-f93bd17b916959fc20fbb7dc578e1f2657a8c343.tar.gz
kernel-qcow2-linux-f93bd17b916959fc20fbb7dc578e1f2657a8c343.tar.xz
kernel-qcow2-linux-f93bd17b916959fc20fbb7dc578e1f2657a8c343.zip
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 <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>
-rw-r--r--net/sched/cls_flower.c2
1 files changed, 1 insertions, 1 deletions
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;