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 6F73243CAE; Thu, 14 Mar 2024 08:41:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40EA442E7B; Thu, 14 Mar 2024 08:40:56 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id 620F342E6B; Thu, 14 Mar 2024 08:40:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CgTC8izZ3nTjdG+37E9LPcKIuEz2CgJGckSqY7GnN4Uq0ZEdswfSaSi9pBVrxaU83liigOKmObJUQ3cECCYd5UA3QPJkC8+irveGjtjMPMgEuL1HA277xMM7m5dH0xc6AQmaSMyYE1bfl5rOftYZzCIUmXaX6WnLFImL47x2zwk/OLFpFrKsNvz9V74+vIbHeN3vYofEGglgnW8swht/5kVj+uwL4Sa1i9TEqhmmkSUCkvxty5R1EgVobZ5GdVYTCGfnNwUcX9A1W+Y/BHKJ8I8nsIDyZfGwi0xPebDHRwko2+2wwcCaswLSQNM29t9hh5FRnr8aE17eCoSt/nEnTQ== 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=Xn3Gdh/Psv6hQokr68Gz/JKPuQQS69geTu30jDJjLpIJUsxRQ/OhNEyGhtpiupRcvvIsAQb9UbT/Nr4DNNuuw9/9MxpnUw2jhfLS9Zj+ZC01/QrZdC5QOjD1A97oSTWowRBBg9kMr3eAxPZfM7MpOkFka5+YEr9m0yEQon4cfD/+gcozXNsA8L+/BPYgOj9PTHHzRYAbrmwepI2Zfypf9DqQq7QRE7wT9IzJlwqrIZG/RlxNS/nZeiU2GDrG1ZZVy9Kim/6NVmzSde0INMFSJ00m5K8vkbULMeN4X3W9qgSI8KGUIShWhA2N/ytVmkyj/b9VmZWFEv3J3dam25dlTQ== 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=ZXLd6Xv9i/H29TDQrojNPlEY9J64TYbCNW/zHcqdk/wMOWjFwjYYWUSq1pqFgFel2hJq23v+7XSrllwyCcHykDD+Yj2xjyexWnNrmBWoWSrHU0d1ncotkBM/BtjgJdgJyZtxUfagH2zKZ1EbT8zHDWlBV7HuSqsBkT3DXXXZJes= 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 BY5PR13MB3617.namprd13.prod.outlook.com (2603:10b6:a03:21b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.19; Thu, 14 Mar 2024 07:40:53 +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:40:53 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH v2 5/8] net/nfp: fix unreachable loop flow Date: Thu, 14 Mar 2024 15:40:21 +0800 Message-Id: <20240314074024.3199555-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240314074024.3199555-1-chaoyong.he@corigine.com> References: <20240314070536.3169210-1-chaoyong.he@corigine.com> <20240314074024.3199555-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR11CA0107.namprd11.prod.outlook.com (2603:10b6:a03:f4::48) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BY5PR13MB3617:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b628394-ea0f-4883-fc07-08dc43fa1399 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w9VfR/KwEY3E5pl8P/RFNt4isqPly19OHCS5LH1FPaI4/exoXcPDUevdf/luDxnmZc1OKA3U7i8KPPwhBl+N4XDPoLDb3M6oBvJjxKDpSWd6i79iJQeTznOF2XAFuoR4ZUSoB8eRh+vYNjReZ+S7UCfnnLNhnIqj1i4N3kOwdXWCtnSWgLD1T2Ka3JfmHngMWtSlGYlOydLOh4ENvQ49iWUV+woCYHkt56quSwegoIdK+ZX9jY1ZV0/P4kH9qo9O+0JWqVFRTtWE/U9EK0MOhQHqLrukIW33w0MAyFjsrp0Dh8AjrXeks3kc7fb54ouXKgVBJ9qRFGuRywLNBoXqGzjBK7XN4D/n5FIlNo0VO6ngmufr319VsfCgFi2uJHpVv1XNVOtJsJEdVHvr7Wv7FSZMIbwAfExVyFb845j7/h6HpfofVE2FtqBykCEnUhIb3jRRRJ5nX6A84tlfNjOPHQ35g2wFfeivj7BdMncpmhud+gOW4me0X/DxHE1rBzy8ya+vPOcoHkpOkoZFxi63llH6a+lGWZJ74+urgmTRmmthmEpkinvvn5Zt2dtU87foZ0Iv/nKmztp7QLJVR8W8/9oZfzywlJZDgzlFUOuS6yWMywHVWAlVmQrIJMetsbo9Nl2bfKz1AkpYAhgLCJIPzj5eyL3QBTkZiMpODV13yiPg0tX9Kpe4Z+ql37aOUwQN2heGxhbU09v/f9eucbiqsA== 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)(1800799015)(52116005)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5hRaL5K/WnDD+hPdicxOjbP6PHXwsA1W7WBRbnp8jNusgTqq+cBbDaFKfQ9r?= =?us-ascii?Q?ZwhX0O3vvibewBssUBQjpV3Tivnesc+b50pcC2o8zQNSOLNIv1t4I4ylzh8Y?= =?us-ascii?Q?V4Wq+5/5Cc0/redj3TOzYoOje3VQb35hYTPoSJYVbcUINCVuCeB0XNr/UeBA?= =?us-ascii?Q?gKzqdeepXKuSdVFOLtGD8y0MuR+fM1OSYarKdX9Yo5Yf+0K1PC0ZBbibm1Rt?= =?us-ascii?Q?jgvGpsVsyupmC12nJzlhl2GyJ4vQCsS2PQk3Ihadtx00421PfpRQGmi8AS6J?= =?us-ascii?Q?K91ZubhNxU9SSHyp/1wHGEMTIVVIjxXS5ZO6/TkzUsu0lVw9fgXYeZqSqlop?= =?us-ascii?Q?tejd8vg8e3fLpigBAONET5S/wIbazE4mtPOBmaX7nXIAzgwlDJMXyE0nd9ez?= =?us-ascii?Q?s1lI5vENl5z65+l/7ryjWJVur61Xio+uOI35YtSUdd16BUEfoDGq3N0tM355?= =?us-asc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lhMJSr2PJ3fuda+Lfq7Yy?= =?us-ascii?Q?ZRjjsconn4fdziFVSkl0EEF+40Fjdm4IWzIj+LPfeY7GAn39dKZXQ0nFxxgR?= =?us-ascii?Q?EOckokhP4uJ6BSWxyxJOCzbBz2yoz6GCgYwP+PlyOqLYSstjH+3LsCYfWrln?= =?us-ascii?Q?8dq0QVZ7Sv+spDQMKk8nBLKnMymmkc2GvZeMNDcJ58ba9WKSJaFC1BhC2rM7?= =?us-ascii?Q?Z3jufnjetoAl5soxz6HFuwOHKGyV0zQ4fKm4AzhMVATtEpvp8herESaBKnBT?= =?us-ascii?Q?tw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b628394-ea0f-4883-fc07-08dc43fa1399 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:40:53.2320 (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: 6Pypq5yozxVEiRGv20OCMtRCJLjU0OoSVSXmJMQcU0mKpiwmmxE8vRfYTKAwMiPEJmxYBCFdpWmDkO9p1W0ucl/xQ80rNv1TNPcLR8Hw86c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR13MB3617 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