aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-01-24 15:54:19 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-24 16:01:10 -0500
commitb505b29f68ba86586fd004d0b67bb6ba65e8d176 (patch)
tree7701e3c9b532f9ef12225bda9b44a0caeae5cd4d
parent93da52b567c24ce31938181fd55755b908cd0a5a (diff)
cls_matchall: propagate extack to delete callback
Propagate extack on removal of offloaded filter. Don't pass extack from error paths. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/cls_matchall.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index b0b8627b53d2..2ba721a590a7 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -71,12 +71,13 @@ static void mall_destroy_rcu(struct rcu_head *rcu)
71 71
72static void mall_destroy_hw_filter(struct tcf_proto *tp, 72static void mall_destroy_hw_filter(struct tcf_proto *tp,
73 struct cls_mall_head *head, 73 struct cls_mall_head *head,
74 unsigned long cookie) 74 unsigned long cookie,
75 struct netlink_ext_ack *extack)
75{ 76{
76 struct tc_cls_matchall_offload cls_mall = {}; 77 struct tc_cls_matchall_offload cls_mall = {};
77 struct tcf_block *block = tp->chain->block; 78 struct tcf_block *block = tp->chain->block;
78 79
79 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, NULL); 80 tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack);
80 cls_mall.command = TC_CLSMATCHALL_DESTROY; 81 cls_mall.command = TC_CLSMATCHALL_DESTROY;
81 cls_mall.cookie = cookie; 82 cls_mall.cookie = cookie;
82 83
@@ -102,7 +103,7 @@ static int mall_replace_hw_filter(struct tcf_proto *tp,
102 err = tc_setup_cb_call(block, NULL, TC_SETUP_CLSMATCHALL, 103 err = tc_setup_cb_call(block, NULL, TC_SETUP_CLSMATCHALL,
103 &cls_mall, skip_sw); 104 &cls_mall, skip_sw);
104 if (err < 0) { 105 if (err < 0) {
105 mall_destroy_hw_filter(tp, head, cookie); 106 mall_destroy_hw_filter(tp, head, cookie, NULL);
106 return err; 107 return err;
107 } else if (err > 0) { 108 } else if (err > 0) {
108 tcf_block_offload_inc(block, &head->flags); 109 tcf_block_offload_inc(block, &head->flags);
@@ -122,7 +123,7 @@ static void mall_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack)
122 return; 123 return;
123 124
124 if (!tc_skip_hw(head->flags)) 125 if (!tc_skip_hw(head->flags))
125 mall_destroy_hw_filter(tp, head, (unsigned long) head); 126 mall_destroy_hw_filter(tp, head, (unsigned long) head, extack);
126 127
127 if (tcf_exts_get_net(&head->exts)) 128 if (tcf_exts_get_net(&head->exts))
128 call_rcu(&head->rcu, mall_destroy_rcu); 129 call_rcu(&head->rcu, mall_destroy_rcu);