From patchwork Thu Dec 9 09:27:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 12666203 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFE86C433F5 for ; Thu, 9 Dec 2021 09:28:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236163AbhLIJcG (ORCPT ); Thu, 9 Dec 2021 04:32:06 -0500 Received: from mail-dm6nam10on2106.outbound.protection.outlook.com ([40.107.93.106]:50465 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236292AbhLIJcC (ORCPT ); Thu, 9 Dec 2021 04:32:02 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GxkgP5x1gC6FQapnO5t8xG0XEVOZ8oOASS6vv74ydJZ2BjUI24JtWzQqQoQCVlZSICjgqHg4c5zDhL6Eb5wzyD4+L3ouFyvzTpLFjsEFFkBB7L7eUrDkKljYQ0qq2N7jgC22lnJLW013Cbw9JLm0uu0N0dFK7P6VuScjrNtAnC13+c8E7dONxaaD8dFSbUAEZg1s4A9Kuoh6yqru3rCYNzaRtP1DnzzYmI5GDh3s8mt7z7qYl+Ou6PhM5cdIcMpQneMrWEQMaAfqRcop2eyQKRabRbgaUF///ZK9tTo/fACggHY4ZhvIvGqt57+ku9NhJdrhUKfr4hXS+tbEPKPeJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sRp1HCPVPqPJU3OHFquMchwhifHi9LhY7LZW7gk03f4=; b=TaoxnMEKmn5xpdBPLWGb6INb0FgMm0pJOzPVELN2yjT1v81EqRBN7s/QRgJGKLaRSyKwnxLzQRfask5SWAdntOTlR2sA9ZLyFGrZuV+cSRoywxGr0nnmeQ4CfNKQP97Rswh2kOxk0ERK/VoV2qnCgttmUmvOZ636i9lWze/2StkVAsn1L/stIJDFb297vbcrFlmoD95ljwE8Ci9XSaXnQhW/vWUFul/2mRmFLedlesIA2Wrh7WrBbQ6NsN8hjNtBJez6M5bbg4DB9Gq13MRi/DkKquarIQHt9pGmv0w8FGIhuZ93K17Hgkyd19c28hD5ionbGofo+aGzS/UVAgPgvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sRp1HCPVPqPJU3OHFquMchwhifHi9LhY7LZW7gk03f4=; b=tptWxbGx6Ok3CErA8f7qAC+Bjgz8pnDtb2WqMaBZYTnTRzp1QEI7HHGqPYyit2Kn3cgTlfzNIyGs3QDe2wcLDMnZ88zyPSy8vGRlKJ2hMOAGvWM/NmB3BAOj6rloKaO2mIUdzzDzatKiXi7IuYDVVeFKvnevEeZYk7iMHdETdEo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by PH0PR13MB4796.namprd13.prod.outlook.com (2603:10b6:510:99::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.10; Thu, 9 Dec 2021 09:28:28 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::a01a:4940:c69a:e04c]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::a01a:4940:c69a:e04c%9]) with mapi id 15.20.4778.012; Thu, 9 Dec 2021 09:28:28 +0000 From: Simon Horman To: netdev@vger.kernel.org Cc: Cong Wang , Dan Carpenter , Ido Schimmel , Jamal Hadi Salim , Jiri Pirko , Oz Shlomo , Roi Dayan , Vlad Buslov , Baowen Zheng , Louis Peens , oss-drivers@corigine.com, Simon Horman Subject: [PATCH v6 net-next 01/12] flow_offload: fill flags to action structure Date: Thu, 9 Dec 2021 10:27:55 +0100 Message-Id: <20211209092806.12336-2-simon.horman@corigine.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211209092806.12336-1-simon.horman@corigine.com> References: <20211209092806.12336-1-simon.horman@corigine.com> X-ClientProxiedBy: AM3PR03CA0068.eurprd03.prod.outlook.com (2603:10a6:207:5::26) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27590a60-0fcb-42e1-e77f-08d9baf641f8 X-MS-TrafficTypeDiagnostic: PH0PR13MB4796:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:179; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cWni6bv/46YZaDqTK+z4FJm4tcGd1EOu4eMVBr+d6oyccdwYs88g1KJmXj0c2uA3caUH5dYOrfZZAYQo1zE/jeCaMp7JyyM5orC+Bkynl2xcXtINgUA49DxVMMw5Xkc2PH0QmxFTCrIEPmjLKOLp2ynt2GAgzRlDYwMxZ3o+UjZgzzPePPL7LDjw443UVSC7s6F66Bqy5xHn3bcrZkXPF5DKL1UWFdu2jDaXkzSey2NTHYafGiuyHvYgu1AJ0il+3z1q/aOa6Ndq+nzHry2/OKm0Wlko9g5ZGByZ9qnDra7DxRqVh00AezVFaNAmloj55N0WGvlbZFMV7cJc+HXZcdcwmlJ8RGMnO4mydyI6anEMsqDVm7bboxQ0LOXvBi1s0ztvKfgq0VNxPOU/adzoPsfooWsEr3tA9YFZO6bqe45k+v6oMTXqC8SSUKZ87DHpQuu+ZNkx/NGPkdxsTnjjbIbpUp5n8Z4wfxZqlyT5HgaCMGWRLjxyCxs3BkBTXrqUnecjx9b4BYQwHgSVvQZhFq4b1MvhGU/StIi3Jw/Uwwg+Imu5xcy/a/NeMUa9yea+lyoEz3Tp1ZFRTubLY0chs8mwjEGVERhAs9myQfYh9JSJh81+CpBWTMNecZz0IIaIDjEphnpmt0E30Y+7aZCi5uFDuGr38LOx6YHftz1ieV2Fv3wNS0H3qOodOIfmQi95 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(366004)(376002)(136003)(396003)(39830400003)(83380400001)(52116002)(8676002)(2906002)(316002)(4326008)(86362001)(5660300002)(54906003)(186003)(508600001)(6506007)(8936002)(44832011)(6486002)(2616005)(6512007)(6916009)(66946007)(36756003)(107886003)(66476007)(66556008)(38100700002)(1076003)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YY7AbYlIMazxtApg0GxzF/TTR+7i/765Cmx7pOOfg+/Pn9I6rC43QocFGBBQDh8wloE42BNmhe5ZjNku//tKjmyZ1BXMRVtmhiyXi+fcmfE4m8NoojOPzBNT30ipZoxpxgQgcGlmN8iBD0eITEzSmXff4XylKLTSj3Z26xenl/+3o/f9slqvaDWvHHwRflDevQMPbdSxzPdcLkgoQmWn8FfJhrQkS34Alu3RCDYK6BySlUdfbDOu6FAKZ2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y5fQ+g2nZm9ZpvDlSLuvtfVQPb4hKvkSdUpb2YBK9TgSUPURlXqLIEPx6AHo6lh1vKrg/YCUwmwwsE0iake9oKnopPEK7pE/ULheTHkQhdzsu2cRbIeQlo0ysegAO2hxz9UBaLRUKSg2GkXzrMDlI8Q9kH47/kZk0rro5npVLv0UPvtRUDBC1GB0RPeMJmYrI0Ygu7ysQd3mCLzOptdkoEtM92SjRIoFybLbB3pwYTL0Zv7rfeMDBTfX5dOZW2lmxtS88KoYB19JpyJtgJ6AX8aelycJOQTEZGgIKUYoRAgnmoS070z4mRZjFP2VkRievB4pSqKYNlYgrd0szesgDOfrSQwUzg8D574oCk5Y5Rs4Moh4cfoO60BSyFMWFop+bXtGsmE5qdjzsaoHTgpzVPCA4wPYM7wKuDWvrTvpflL4Nc= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27590a60-0fcb-42e1-e77f-08d9baf641f8 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 09:28:28.3826 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: t7uKaLKQXcWe4MfpNkeMgwkI3IDdzDUK7UAKjm+u4hsW5/WeDu1SFjSC3GpAtBMEx6j3fFNxOidyXKSgmAcf+KK2FaYgeZ3t6z9C1rvv0Jo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB4796 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Baowen Zheng Fill flags to action structure to allow user control if the action should be offloaded to hardware or not. Signed-off-by: Baowen Zheng Signed-off-by: Louis Peens Signed-off-by: Simon Horman Acked-by: Jamal Hadi Salim --- net/sched/act_bpf.c | 2 +- net/sched/act_connmark.c | 2 +- net/sched/act_ctinfo.c | 2 +- net/sched/act_gate.c | 2 +- net/sched/act_ife.c | 2 +- net/sched/act_ipt.c | 2 +- net/sched/act_mpls.c | 2 +- net/sched/act_nat.c | 2 +- net/sched/act_pedit.c | 2 +- net/sched/act_police.c | 2 +- net/sched/act_sample.c | 2 +- net/sched/act_simple.c | 2 +- net/sched/act_skbedit.c | 2 +- net/sched/act_skbmod.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c index f2bf896331a5..a77d8908e737 100644 --- a/net/sched/act_bpf.c +++ b/net/sched/act_bpf.c @@ -305,7 +305,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla, ret = tcf_idr_check_alloc(tn, &index, act, bind); if (!ret) { ret = tcf_idr_create(tn, index, est, act, - &act_bpf_ops, bind, true, 0); + &act_bpf_ops, bind, true, flags); if (ret < 0) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c index 94e78ac7a748..09e2aafc8943 100644 --- a/net/sched/act_connmark.c +++ b/net/sched/act_connmark.c @@ -124,7 +124,7 @@ static int tcf_connmark_init(struct net *net, struct nlattr *nla, ret = tcf_idr_check_alloc(tn, &index, a, bind); if (!ret) { ret = tcf_idr_create(tn, index, est, a, - &act_connmark_ops, bind, false, 0); + &act_connmark_ops, bind, false, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_ctinfo.c b/net/sched/act_ctinfo.c index 549374a2d008..0281e45987a4 100644 --- a/net/sched/act_ctinfo.c +++ b/net/sched/act_ctinfo.c @@ -212,7 +212,7 @@ static int tcf_ctinfo_init(struct net *net, struct nlattr *nla, err = tcf_idr_check_alloc(tn, &index, a, bind); if (!err) { ret = tcf_idr_create(tn, index, est, a, - &act_ctinfo_ops, bind, false, 0); + &act_ctinfo_ops, bind, false, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_gate.c b/net/sched/act_gate.c index 7df72a4197a3..ac985c53ebaf 100644 --- a/net/sched/act_gate.c +++ b/net/sched/act_gate.c @@ -357,7 +357,7 @@ static int tcf_gate_init(struct net *net, struct nlattr *nla, if (!err) { ret = tcf_idr_create(tn, index, est, a, - &act_gate_ops, bind, false, 0); + &act_gate_ops, bind, false, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c index b757f90a2d58..41ba55e60b1b 100644 --- a/net/sched/act_ife.c +++ b/net/sched/act_ife.c @@ -553,7 +553,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, &act_ife_ops, - bind, true, 0); + bind, true, flags); if (ret) { tcf_idr_cleanup(tn, index); kfree(p); diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 265b1443e252..2f3d507c24a1 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c @@ -145,7 +145,7 @@ static int __tcf_ipt_init(struct net *net, unsigned int id, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, ops, bind, - false, 0); + false, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_mpls.c b/net/sched/act_mpls.c index 8faa4c58305e..2b30dc562743 100644 --- a/net/sched/act_mpls.c +++ b/net/sched/act_mpls.c @@ -248,7 +248,7 @@ static int tcf_mpls_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, - &act_mpls_ops, bind, true, 0); + &act_mpls_ops, bind, true, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c index 7dd6b586ba7f..2a39b3729e84 100644 --- a/net/sched/act_nat.c +++ b/net/sched/act_nat.c @@ -61,7 +61,7 @@ static int tcf_nat_init(struct net *net, struct nlattr *nla, struct nlattr *est, err = tcf_idr_check_alloc(tn, &index, a, bind); if (!err) { ret = tcf_idr_create(tn, index, est, a, - &act_nat_ops, bind, false, 0); + &act_nat_ops, bind, false, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index c6c862c459cc..cd3b8aad3192 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -189,7 +189,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla, err = tcf_idr_check_alloc(tn, &index, a, bind); if (!err) { ret = tcf_idr_create(tn, index, est, a, - &act_pedit_ops, bind, false, 0); + &act_pedit_ops, bind, false, flags); if (ret) { tcf_idr_cleanup(tn, index); goto out_free; diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 9e77ba8401e5..c13a6245dfba 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -90,7 +90,7 @@ static int tcf_police_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, NULL, a, - &act_police_ops, bind, true, 0); + &act_police_ops, bind, true, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index ce859b0e0deb..91a7a93d5f6a 100644 --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c @@ -70,7 +70,7 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, - &act_sample_ops, bind, true, 0); + &act_sample_ops, bind, true, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index e617ab4505ca..8c1d60bde93e 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -129,7 +129,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, - &act_simp_ops, bind, false, 0); + &act_simp_ops, bind, false, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index d30ecbfc8f84..cb2d10d3dcc0 100644 --- a/net/sched/act_skbedit.c +++ b/net/sched/act_skbedit.c @@ -176,7 +176,7 @@ static int tcf_skbedit_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, - &act_skbedit_ops, bind, true, 0); + &act_skbedit_ops, bind, true, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret; diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c index 9b6b52c5e24e..2083612d8780 100644 --- a/net/sched/act_skbmod.c +++ b/net/sched/act_skbmod.c @@ -168,7 +168,7 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla, if (!exists) { ret = tcf_idr_create(tn, index, est, a, - &act_skbmod_ops, bind, true, 0); + &act_skbmod_ops, bind, true, flags); if (ret) { tcf_idr_cleanup(tn, index); return ret;