From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88021454B8; Mon, 24 Jun 2024 03:58:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 166BB40676; Mon, 24 Jun 2024 03:57:59 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2117.outbound.protection.outlook.com [40.107.101.117]) by mails.dpdk.org (Postfix) with ESMTP id C9C004066A; Mon, 24 Jun 2024 03:57:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AIYaeOsjS4bynzYyOhfr128vk6YhUGkOgQs5ezGjrz09UDy0TBbfLM5iFbpE6McGQHb13G30LkLioW3vKIbehaavwrxZdRZPSZWrkcNiMRfR9/QxJgsU+bHmBr222xi2GFRL2XPKosUjXIOrvQN9ZIxFaDMXkSPClcQ7G2uSY82fQQ3Tc3qjyzmt4IE00coQD65ibRlMSY3RhLVi9GynPv8+ARN8Z8qwYaRYzertL5SK7Q5f6Wwc1IRDaBL4TSpVWuls0ZGRKQ41nGWyEV85G07l0OsM83zWo5GrUVfGMNayx2JEfoCEmD5Vxd4KHckwhyXzjmVo8EFFFoX9GYHwcQ== 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=nsi/4sn8LZ3WNHH6fnDcLaV3GJyLSmjwCBdVsz+0Y+g=; b=ZVnywN9JC8xpU+4+tbTRtBxso07/mGPmV1hLRENODhDobWP3d2Mr136kteUIIW9R34t05hZ8RDrTan2PqHx92Ba0VQpTe4lcvcCU3yqYsDPcdgph+Ey+dgtgvAxTF+yJ/AUh0HNZUTOJmRQ9rUxJu8Rw2FS2LCdCZRavfW58UgML/QlJ/Lf3yUPGxUszBtxXn7MgTEoKfPvbKnT+80JR1lzM1HsimNf2cRB4Ap02sSD4dk4QZdLbY2O36TMgIfmSziaGplSir5xM5B5AfjQOyxhUiApXe9VsUnsWjXogYgk7vyIrY186mt8i3GFuj5QIGgL3kWBOXcVh1/WjLGe+Hg== 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=nsi/4sn8LZ3WNHH6fnDcLaV3GJyLSmjwCBdVsz+0Y+g=; b=J42oYBMnmcZKNzc3t1pnU+NLtr1BMS6txXYDfdD8b9A8mq4FSuWnTr1ubGtULub9CfysgmsZcEzFDePtoCbkrOCzfE8y5YCKTzUQGjzSVXwJzgYWUskQGMxLgmVuRJZIdlVTp5eoJAGsZWnOlmtpPSMDdDHXEGJ8Vpra93dLxrI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SA1PR13MB5443.namprd13.prod.outlook.com (2603:10b6:806:232::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.37; Mon, 24 Jun 2024 01:57:54 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7698.024; Mon, 24 Jun 2024 01:57:54 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 05/17] net/nfp: forbid offload flow rules with empty action list Date: Mon, 24 Jun 2024 09:57:11 +0800 Message-Id: <20240624015723.3712898-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240624015723.3712898-1-chaoyong.he@corigine.com> References: <20240624015723.3712898-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0070.namprd13.prod.outlook.com (2603:10b6:a03:2c4::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB5443:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d52aa51-935d-494b-9249-08dc93f10fb3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|376011|1800799021|366013|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/s520QLUQcCLmj8zlfjpbBqHi9skth42AC5zojbirU+bc7bWj5qJLfRJlZeG?= =?us-ascii?Q?tVCNiREfirxH+IrgAin+twNo95q0UktXkhFobmxHl1ezNWOh+UyGAr9A6M5H?= =?us-ascii?Q?2KNj6nLawZ8KSDcTT8jr5JrLPR4hCKqlqe1LxVJPujh+jHL9xP4TWS71wfhh?= =?us-ascii?Q?vpwAeFiCi3WJomn8/ZAu5PI5zE2wST+KYG6OHkz0iwlgz2yGumKRNqWtV2iI?= =?us-ascii?Q?Iw0zkUJbc+qQle8KObl9/1onmJcguLUyA3j8m7fuqAmoFLLc9hC4LDggMgAk?= =?us-ascii?Q?dGauRyoJbtu/z4cx2638XXkv1HH26S8eqAkB+8NT4Uk4kmamynouDVuXvhyq?= =?us-ascii?Q?DYhe8lQ91btuSAHuS0omiB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-ascii?Q?tGeftMZLlrsjMwSDCMt0fci9AzNfSGEzBoC0WRkgBlxsLyv8knvSzU6YbucE?= =?us-ascii?Q?Pb5GPN6qEgrK3jj0XN5k3OXnkj5uxc/cDwXnsAHN+xeLCP0o83p8CnZ93hsz?= =?us-ascii?Q?8rBesmuunq7LFa4xIAICgJVH1qowIRXNghHF2/hZ8e1zOlOdgw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(376011)(1800799021)(366013)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Kng+oboNezSMq0PzpIddF4Z78Tzs58CONKDVhNf//j8s2/U+L6qYPkTaHj5g?= =?us-ascii?Q?xC8isjdUYasbD4K1Zl7Oh839KU9CLYBjc/PlmZKrFMqyEQVEoKGe/7VFj94c?= =?us-ascii?Q?xr+NamGEobQxLCLr7dBClRmTejlQdQ6f7z1q/IaQ9UszydVOaWt/AvjQRcwi?= =?us-ascii?Q?RVyxPvwa/fiu6Z1mg/RcpesG1PfH7hmuvZdaxuGmVd/4AF4aCCoVy6NtOtqx?= =?us-ascii?Q?oO5zEVQaXOhRtWd/rBE8ISFqOT6DC+/wpoLaWKxnhGU63UzKXz5hObHaky3o?= =?us-ascii?Q?8eO9Vu89MLI1XaQmmQoVsVFm1Hhyj7bd6CcEtqzDXVzBEzSfbFi7ONEGK5/X?= =?us-ascii?Q?dSlPtaDMPZ/MQQrR3cXg0NfNvBYDFYHOfHPznTyk58pPtaIkDvCuoWQjHiVo?= =?us-ascii?Q?AbRIUADtQ5A4FplVrr5vP53SiziDG8Y3+KGErWMyfHm4pVp0vZV9e6T3FnhK?= =?us-ascii?Q?o7r3WsBvTkW67ASOsKTwee2G0dR135n0oOd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enH4H0GOLZUldg+3zvxQbdMAd1mCt1yC/kCcpdV6f7L8VAGzKy+37FklZ9?= =?us-ascii?Q?rMxhSYcZ4bFPkh6tymc0mKTAilIBBcsm2gVO2RE/cV1SMJ6pfZGPg/fv6ZGq?= =?us-ascii?Q?5W8m2m74OJ0RIgJd6dV8Pav6e455T2bgSNhjaxHNL7XossG4kBLlGB5e47PT?= =?us-ascii?Q?IYfdBR1x9thfmbH4P4E0afGnxZuMv7yzonZkO64vlbTcy4nH7pmATqJ/VhWX?= =?us-ascii?Q?tQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d52aa51-935d-494b-9249-08dc93f10fb3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2024 01:57:54.2104 (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: dvoeSqFbu7ozgfjwto2pfGljmybtuUwT+NzPT0tElFLLbYbaUGa/ZxfttisSNy3Jo1L7J3i5PAH/43eyUWr3cbLrkjwNuIsyeHzmAJkvNbY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB5443 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The original logic allow offload flow rules with empty action list, but the matched packets will be drop by the flower firmware. Fix this by forbidding offload this type flow rules. Fixes: 4d946034bf9c ("net/nfp: support basic flow actions") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_flow.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c index 9f410515e6..d127171fdb 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -4757,6 +4757,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor, total_actions++; } + if (total_actions == 0 || param.position == param.action_data) { + PMD_DRV_LOG(ERR, "The action list is empty"); + return -ENOTSUP; + } + nfp_flow_meta = nfp_flow->payload.meta; if (flag.drop_flag) nfp_flow_meta->shortcut = rte_cpu_to_be_32(NFP_FL_SC_ACT_DROP); -- 2.39.1