From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH bpf-next v2 04/11] net: sched: cls_matchall: propagate extack support for filter offload Date: Mon, 15 Jan 2018 18:08:38 -0800 Message-ID: <20180116020845.3496-5-jakub.kicinski@netronome.com> References: <20180116020845.3496-1-jakub.kicinski@netronome.com> Cc: dsahern@gmail.com, oss-drivers@netronome.com, jiri@resnulli.us, john.fastabend@gmail.com, jhs@mojatatu.com, gerlitz.or@gmail.com, aring@mojatatu.com, xiyou.wangcong@gmail.com, Quentin Monnet To: davem@davemloft.net, daniel@iogearbox.net, alexei.starovoitov@gmail.com, netdev@vger.kernel.org Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:40995 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbeAPCJQ (ORCPT ); Mon, 15 Jan 2018 21:09:16 -0500 Received: by mail-pf0-f196.google.com with SMTP id j3so8902849pfh.8 for ; Mon, 15 Jan 2018 18:09:16 -0800 (PST) In-Reply-To: <20180116020845.3496-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_matchall, and feed it to tc_cls_common_offload_init(). This makes it possible to use netlink extack messages in the future at replacement time for this filter, although it is not used at this point. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski --- net/sched/cls_matchall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index 24bec37e9747..fe6b673db5c6 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -85,14 +85,15 @@ static void mall_destroy_hw_filter(struct tcf_proto *tp, static int mall_replace_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; bool skip_sw = tc_skip_sw(head->flags); int err; - tc_cls_common_offload_init(&cls_mall.common, tp, NULL); + tc_cls_common_offload_init(&cls_mall.common, tp, extack); cls_mall.command = TC_CLSMATCHALL_REPLACE; cls_mall.exts = &head->exts; cls_mall.cookie = cookie; @@ -202,7 +203,8 @@ static int mall_change(struct net *net, struct sk_buff *in_skb, goto err_set_parms; if (!tc_skip_hw(new->flags)) { - err = mall_replace_hw_filter(tp, new, (unsigned long) new); + err = mall_replace_hw_filter(tp, new, (unsigned long)new, + extack); if (err) goto err_replace_hw_filter; } -- 2.15.1