net: sched: keep track of offloaded filters and check tc offload feature
authorJiri Pirko <jiri@mellanox.com>
Wed, 17 Jan 2018 10:46:50 +0000 (11:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jan 2018 19:53:57 +0000 (14:53 -0500)
commitcaa7260156eb3a1496348a2c69fa68e85183d5d7
tree2f085f1102948006fbec3ce4e0dbf3e138f82a78
parentedf6711c9840fd92e0047f98c411c94114168f19
net: sched: keep track of offloaded filters and check tc offload feature

During block bind, we need to check tc offload feature. If it is
disabled yet still the block contains offloaded filters, forbid the
bind. Also forbid to register callback for a block that already
contains offloaded filters, as the play back is not supported now.
For keeping track of offloaded filters there is a new counter
introduced, alongside with couple of helpers called from cls_* code.
These helpers set and clear TCA_CLS_FLAGS_IN_HW flag.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/cls_api.c
net/sched/cls_bpf.c
net/sched/cls_flower.c
net/sched/cls_matchall.c
net/sched/cls_u32.c