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 96EC843CAB; Thu, 14 Mar 2024 08:06:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9595F42E5E; Thu, 14 Mar 2024 08:06:12 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2121.outbound.protection.outlook.com [40.107.220.121]) by mails.dpdk.org (Postfix) with ESMTP id D32EB42E5B; Thu, 14 Mar 2024 08:06:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=POeJyj95uzkJo4uqbV7BDWt6Zc5ASRls2dWA1Dr1DK9inUHAJi4nCQD1zXpx86mKTjBpFZBjc9uSJMo4dXKXC1mcDQ9i1PNRAFfPYbG64Mg3pvGaXK10T5yMwk0Xp4MvTSCOLBvueDuX/5q5jf++V1NIJfTDUtkBig1elsjWpRwrRJ/M9JamO6uRIxHAXIaQMj3A0MzaSSk4KPQd57s4fa4ffOC9bEj5GNAWlTMmqL65lxocXEREHYgKE1T+OFVJyVzhLb/Lai9cxomkvfEQPCyeltlcEwroCN/KyD2bv/xKzqVJIe6vo5fZsTgXgE+h4YiiW7hRf1B/7Zv19z+VlQ== 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=EB0MocTzMUAcKtnhvet0Pkwim1Lriwxw1GaQzsfmPjg=; b=BPKelE76HpG0Rja4UvOwfnWC6IHdeOQg/Y1p1B2SWSJTJf0MBwFuLSwbBdokKEKqHf63ytMTyQAz1aobRWtx2ujRPPBA1xzoHJ2pATA/vZ0xSekSQS/nGs5n3PiGbj2J4Ca/1TLNepYnG+AK9sU/opxtVAey5MjawxHWplpyxebKsHeMnZcat/qd2NAJCrUrwEryAW0BWEjx2UZgUgyJVM/+Ugw7ed5hxP/6H1bcsDAuOUifJQXapAKFC7u/amNjCEAPvAbwAzy72vtB4+TVSYKUiLo8YHa1jy0r+SOWm900iWLE9l6OTIvz8b2tWAj4ej0yodWXZdQvT57mwQSNsQ== 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=EB0MocTzMUAcKtnhvet0Pkwim1Lriwxw1GaQzsfmPjg=; b=O6jKm2l14cS1wpefEFKrlD6d5axzjvF1vXNGbjXHbqi/KNIGW3stVYpDwCuqkhBQtmtl8+zHGxKsyWKpeI9y9+qQc39iyy8LKocRaeHA94cM1iRvtosHphXwIbz70IP6Y7l6Mhv62PWcOVmC6u8/k8fIzVQxcnNgCvTDu4el00M= 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 DS0PR13MB6235.namprd13.prod.outlook.com (2603:10b6:8:115::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21; Thu, 14 Mar 2024 07:06:08 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7362.035; Thu, 14 Mar 2024 07:06:08 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 5/8] net/nfp: fix unreachable loop flow Date: Thu, 14 Mar 2024 15:05:33 +0800 Message-Id: <20240314070536.3169210-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240314070536.3169210-1-chaoyong.he@corigine.com> References: <20240314070536.3169210-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR06CA0191.apcprd06.prod.outlook.com (2603:1096:4:1::23) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DS0PR13MB6235:EE_ X-MS-Office365-Filtering-Correlation-Id: cbab21d2-a627-4a57-1957-08dc43f538e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fLWbY6PJU/aC+/0EaO7QKV5QqnraNOjK1Iujcpt8GxwF5gucee48aB0pFKKGYYTOTBf62LTOj55k5rZ6bzM8jBDmonqaGcdBxeDAB05y+AOX7VgOdFmxF/gVLDFz+WqUoQfOq6Z7XETQhDPtvQ1TDPdtbDVypfsb2j5Ye2+vkdmw6CMAgUYrp71TFixgqc4nKkT0i1vf32z1FlIFKlhq2nDMJw+NvRzaUEAz9yzPo6bZB3s9Y1r9Dtll5SB2sE8RChGa5VC0ZNPjJ7pPgFNrQ3NRw9C2epaEFHPDQ17vnC+aZXkX4Vnp3Qu9H6AYn4+5molGEfRNyJvFSuVImZgUuLP8ZHzAG72BKFpQOE/MHHjDrMbDcdfhJ3NfG3m+VWrRBCa1dafJ0AhytBHi+t3fS+yzoROjaOYnLne8K4+f7sDW+NWRcDbFlFuY5b/KiSPPjpArsCxHtxUoFO/cxNzFmnJ5hWeN+KRZQKlpNETZnRybCjpP0nsG0f8sQ4ItX1SXkRcTDZDE6ULfkOFRl8Dc/tr1YsiDndf0uDO0bRsfMxBJl5RmTjGTwbyg3jW1VYIBlu3QfmIRVLCLYAxDNL9OqxK3Ewmb1/GROuVdIZQyNcMBg+tglM7ZqOGK7pnsTF0i6z9A5vCoix9lvsuO2T2xYVjhM1zB6O7mbFJ21ksBWZasWOC0N19JKttnTH0wg6JgMIxzhwgSWAmgIVONFCdrXg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(52116005)(1800799015)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6ee5NVbhHNrB+85dM6FoeMtStFxwWJetB2Iz+yNPoC5N3gKTABzHmdlAW6T7?= =?us-ascii?Q?ar0shE89uoRUxmXQBX7l4GOJ5F/aedM3/U2LmqFUzCLicl8D8y6Zdu64GEZ6?= =?us-ascii?Q?2sc+hZf/XHr211ZssMUCTbBFG71Ha0BMw88YWDKWuL/o/nvCoR8Vy/fZQR/S?= =?us-ascii?Q?PW/V3ine4z/XLFf9TtBfjsMhpUGs7n0iZHoFdiGVXdC7SihqgIEAI9Bsey2e?= =?us-ascii?Q?OwZZDWh2sZYz4kY8blJRel9bp1V+N/OYwo3+4padqB4jSLTvDLfebCEzrwfu?= =?us-ascii?Q?3pNG6shA0DIxBkgfR4Qa28ZPa5ILASKY0xcpjL63Vfre9A5OXZ7hCxl1MhwA?= =?us-ascii?Q?mxruMzvYDn0voSvhn0T3rCc7sUi9uSJcqGDmJEvZYnQzJJKTVeM1xcAgArIX?= =?us-ascii?Q?IH74bbZWFEW3iJcdadF03n/QL08dltCkR43ScKbHEk2o054c5eRRiyB1hIVy?= =?us-ascii?Q?JTZp92VoMIKguu9EJ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cXl9?= =?us-ascii?Q?cqVyC0Eu4dzhfkjQHOIY2Erli2NH9JvIkcBWE2FOR9XD7QxcUSaK0DPLCXrh?= =?us-ascii?Q?T3gcqad7VqyN4K5Pw5mMgyY+lXRJzG+kgol3DjYm6UNd3b3pOF7i3jsJpnMb?= =?us-ascii?Q?PzbIlXAgJgTRDc7OrFkN8IFvX/A5PwGAJ3y2SjgcWHdjXlZZ7IBmP2aDWmzv?= =?us-ascii?Q?TZw8xU5vCUPvetetUWUjA0qWKq3dMSPndsWu3K8RZ6VRmOb6jp0jRmoGAvLY?= =?us-ascii?Q?pw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbab21d2-a627-4a57-1957-08dc43f538e7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2024 07:06:08.2635 (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: yj2odltu4PiHJq4N8uW0mayst0nZz/Bq95iDEzEW1nR5+DDVzHTc4wxHVgDfzGln3OoXbRUGs2yTrf2JuDAulStniZ6hSB2obdp1UxJ3ols= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR13MB6235 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 CI found the loop flow in 'nfp_net_flow_calculate_items()' will never execute more than once. Coverity issue: 414941 Fixes: c91c6512d876 ("net/nfp: support Ethernet flow item") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_net_flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index ff6ce3ee45..251974edb4 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -180,6 +180,7 @@ static int nfp_net_flow_calculate_items(const struct rte_flow_item items[], uint32_t *match_len) { + int ret = -EINVAL; const struct rte_flow_item *item; for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) { @@ -187,7 +188,8 @@ nfp_net_flow_calculate_items(const struct rte_flow_item items[], case RTE_FLOW_ITEM_TYPE_ETH: PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_ETH detected"); *match_len = sizeof(struct nfp_net_cmsg_match_eth); - return 0; + ret = 0; + break; case RTE_FLOW_ITEM_TYPE_IPV4: PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_IPV4 detected"); *match_len = sizeof(struct nfp_net_cmsg_match_v4); @@ -203,7 +205,7 @@ nfp_net_flow_calculate_items(const struct rte_flow_item items[], } } - return -EINVAL; + return ret; } static int -- 2.39.1