From patchwork Tue Jan 16 21:38:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 861903 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="19UHpCOt"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zLkC04kV6z9s83 for ; Wed, 17 Jan 2018 08:39:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751662AbeAPVji (ORCPT ); Tue, 16 Jan 2018 16:39:38 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37929 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbeAPVjC (ORCPT ); Tue, 16 Jan 2018 16:39:02 -0500 Received: by mail-pg0-f66.google.com with SMTP id y27so4162319pgc.5 for ; Tue, 16 Jan 2018 13:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DpHpkYaBqxbeS0oy1CkJVV6eYWLp4LPcrkcWDUIC9x4=; b=19UHpCOtFUQqoYPSnjHdQXrILyw5/MApffJTxOqVKfVOJH8PJSiXX60eN9UIyULOTu 0r8MJFL3R3lApv1PhWRRTFWNF9BqUyFhFzH+UVnrGIt105D/o6o3fRgmGP2hq48BYBXi 6Ro9/Rh4KVVOWopW0HGwjJOCmuV1//ttY9Jg+gJtmbcyveHUJ8pQ0v3nCBVR6YVxIHuP ahOzzHHdJ/fCjpId2E27yMQVKB1Jd78XQq7orBIMj9Ch0bntJ2n05Bc7xBKaFghs9wK6 gQJJukLIcgoY0hjeRw/k1AxaLds7X3Bw4KOEMJFqjP07p40QwBQOeTbaJXMhu1Jq3VqW hLfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DpHpkYaBqxbeS0oy1CkJVV6eYWLp4LPcrkcWDUIC9x4=; b=et1R0TR3xhW6X/gEIeVcKNUwlRK8463Cwa/beMz2bIcmFr/reIRRRzKjL9NHzcm6wO 3q049mJz5SZaMF4qZiMnwk4rz6EFYvWxmg7aZ+z0irR+PrP84ULniVuDCLyljCzVnoln w31zc1f2I2N7UZ6zYS9pb4inKB5itubzmw2YY0t015mOnYj2K4o9iV4EhQclneT0rUbj dcEizynwVDEI0cpz1siXs9CXNsE+dmbQK+jb5nthzdkmt+3Ih4hsmPYo5yu8V56WNCxR trswUVReVWRj2AoXp6JzGC4ztHxXouEjmCCDr2MF3QIMX5U1jml8ALAsXIOuBXP10Wph jREg== X-Gm-Message-State: AKGB3mJ1eGwLSnwV30KsFDByNk47bxqZbddi5ZQMefL5pTHgNVB57qDl 8Inhqfb+AQOBIEtQKOJG6cdMWQ== X-Google-Smtp-Source: ACJfBotJVAM0luMCe8iUVv7Yo9CnOqs0CQJgk87RXRKonkCwLzUaPZ1IFofIhm5vITyUKQIQ+hyixQ== X-Received: by 10.99.127.85 with SMTP id p21mr29662856pgn.137.1516138741782; Tue, 16 Jan 2018 13:39:01 -0800 (PST) Received: from jkicinski-Precision-T1700.netronome.com ([75.53.12.129]) by smtp.gmail.com with ESMTPSA id y7sm5073736pfy.96.2018.01.16.13.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 13:39:01 -0800 (PST) From: Jakub Kicinski To: davem@davemloft.net, daniel@iogearbox.net, alexei.starovoitov@gmail.com, netdev@vger.kernel.org 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 Subject: [PATCH bpf-next v3 04/11] net: sched: cls_u32: propagate extack support for filter offload Date: Tue, 16 Jan 2018 13:38:32 -0800 Message-Id: <20180116213839.24537-5-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180116213839.24537-1-jakub.kicinski@netronome.com> References: <20180116213839.24537-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Quentin Monnet Propagate the extack pointer from the `->change()` classifier operation to the function used for filter replacement in cls_u32. 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_u32.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 3ef5c32741c1..671eb952f6af 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -501,7 +501,7 @@ static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h) } static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, - u32 flags) + u32 flags, struct netlink_ext_ack *extack) { struct tcf_block *block = tp->chain->block; struct tc_cls_u32_offload cls_u32 = {}; @@ -542,7 +542,7 @@ static void u32_remove_hw_knode(struct tcf_proto *tp, u32 handle) } static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n, - u32 flags) + u32 flags, struct netlink_ext_ack *extack) { struct tcf_block *block = tp->chain->block; struct tc_cls_u32_offload cls_u32 = {}; @@ -943,7 +943,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, return err; } - err = u32_replace_hw_knode(tp, new, flags); + err = u32_replace_hw_knode(tp, new, flags, extack); if (err) { u32_destroy_key(tp, new, false); return err; @@ -990,7 +990,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, ht->prio = tp->prio; idr_init(&ht->handle_idr); - err = u32_replace_hw_hnode(tp, ht, flags); + err = u32_replace_hw_hnode(tp, ht, flags, extack); if (err) { idr_remove_ext(&tp_c->handle_idr, handle); kfree(ht); @@ -1088,7 +1088,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb, struct tc_u_knode __rcu **ins; struct tc_u_knode *pins; - err = u32_replace_hw_knode(tp, n, flags); + err = u32_replace_hw_knode(tp, n, flags, extack); if (err) goto errhw;