From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net-next 07/12] cls_matchall: propagate extack to delete callback Date: Tue, 23 Jan 2018 18:46:03 -0800 Message-ID: <20180124024608.11328-8-jakub.kicinski@netronome.com> References: <20180124024608.11328-1-jakub.kicinski@netronome.com> Cc: netdev@vger.kernel.org, oss-drivers@netronome.com, aring@mojatatu.com, Jakub Kicinski To: davem@davemloft.net, dsahern@gmail.com, daniel@iogearbox.net, john.fastabend@gmail.com, jiri@resnulli.us Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:33540 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370AbeAXCq6 (ORCPT ); Tue, 23 Jan 2018 21:46:58 -0500 Received: by mail-pf0-f193.google.com with SMTP id t5so1934445pfi.0 for ; Tue, 23 Jan 2018 18:46:58 -0800 (PST) In-Reply-To: <20180124024608.11328-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: Propagate extack on removal of offloaded filter. Don't pass extack from error paths. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman --- net/sched/cls_matchall.c | 9 +++++---- 1 file 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) static void mall_destroy_hw_filter(struct tcf_proto *tp, struct cls_mall_head *head, - unsigned long cookie) + unsigned long cookie, + struct netlink_ext_ack *extack) { 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, extack); cls_mall.command = TC_CLSMATCHALL_DESTROY; cls_mall.cookie = cookie; @@ -102,7 +103,7 @@ static int mall_replace_hw_filter(struct tcf_proto *tp, err = tc_setup_cb_call(block, NULL, TC_SETUP_CLSMATCHALL, &cls_mall, skip_sw); if (err < 0) { - mall_destroy_hw_filter(tp, head, cookie); + mall_destroy_hw_filter(tp, head, cookie, NULL); return err; } else if (err > 0) { tcf_block_offload_inc(block, &head->flags); @@ -122,7 +123,7 @@ static void mall_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack) return; if (!tc_skip_hw(head->flags)) - mall_destroy_hw_filter(tp, head, (unsigned long) head); + mall_destroy_hw_filter(tp, head, (unsigned long) head, extack); if (tcf_exts_get_net(&head->exts)) call_rcu(&head->rcu, mall_destroy_rcu); -- 2.15.1