summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_matchall.c
diff options
context:
space:
mode:
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>2019-05-04 04:46:25 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-05 21:49:24 -0700
commit88c44a5200849c8182eaf36535b4ceae6b90b19d (patch)
tree83ffec01039f485c146d9a926825cb40c2c688f5 /net/sched/cls_matchall.c
parent12f02b6b1548367fb548e61105fac6778c1a9173 (diff)
downloadlinux-88c44a5200849c8182eaf36535b4ceae6b90b19d.tar.bz2
net/sched: add block pointer to tc_cls_common_offload structure
Some actions like the police action are stateful and could share state between devices. This is incompatible with offloading to multiple devices and drivers might want to test for shared blocks when offloading. Store a pointer to the tcf_block structure in the tc_cls_common_offload structure to allow drivers to determine when offloads apply to a shared block. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_matchall.c')
-rw-r--r--net/sched/cls_matchall.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index da916f39b719..820938fa09ed 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -71,7 +71,8 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp,
struct tc_cls_matchall_offload cls_mall = {};
struct tcf_block *block = tp->chain->block;
- tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
+ tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, block,
+ extack);
cls_mall.command = TC_CLSMATCHALL_DESTROY;
cls_mall.cookie = cookie;
@@ -93,7 +94,8 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
if (!cls_mall.rule)
return -ENOMEM;
- tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
+ tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, block,
+ extack);
cls_mall.command = TC_CLSMATCHALL_REPLACE;
cls_mall.cookie = cookie;
@@ -293,7 +295,8 @@ static int mall_reoffload(struct tcf_proto *tp, bool add, tc_setup_cb_t *cb,
if (!cls_mall.rule)
return -ENOMEM;
- tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
+ tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, block,
+ extack);
cls_mall.command = add ?
TC_CLSMATCHALL_REPLACE : TC_CLSMATCHALL_DESTROY;
cls_mall.cookie = (unsigned long)head;
@@ -328,7 +331,8 @@ static void mall_stats_hw_filter(struct tcf_proto *tp,
struct tc_cls_matchall_offload cls_mall = {};
struct tcf_block *block = tp->chain->block;
- tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, NULL);
+ tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, block,
+ NULL);
cls_mall.command = TC_CLSMATCHALL_STATS;
cls_mall.cookie = cookie;