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 6770443CAE; Thu, 14 Mar 2024 08:41:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E4FA42E6F; Thu, 14 Mar 2024 08:40:54 +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 4719142E46; Thu, 14 Mar 2024 08:40:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hHSws3tcMVcdUBrDTbJr0ocyCROpl8Ah+HJ8TLQeVcGYJsQsTxBiycuIF5vQO3iMRgT0PJh9uuULmrOd7GX8cGdC5NQyUy94tbAWVuGjqB++hEuf/9H74RsE9yLX531WXahYnTP+C0qO8RAXsI7bdXpbCJvhfx/9BPP826RY9+nuXIcx69yhJ1BKnSPo5ApQZvjx0ERfnlwXLphBwC6q01VFObXalpfwdvqcAGOwwOGdDT2P+2B3Gk0W5hI0c64w48mDhbNqEFvjDi+v/iW3e4gfBSoP8EfDEp5wds8R8boo0x2+fQSsrHHthdWCGeErlmBNWBvE7jVoJ5sr9ScRrA== 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=q2k0o8X3XoDCy1bJmuMyk4XMbq2IWTeaBJNFmegDzN8=; b=BN1oWcDbL8Gz4rku/coLUcHmefvPm3ri65B0UH7zGnF5kj1Tv+Uh9T8nVTBfLP48/BAfVM3NfLFKZCp9zZHxutHOEl9MszH2EijFEYp8ZncpyI6KUa8uJAf9H7hkTUn8d/VhNxyYHhtnOZahApFEbYK8X+k2QRHrsgr1SuRmgGHz2xv4dXTjJyATLk8TYDUr5YmCGnYXMQB860ESu+W2C/UBp0D/loCCRLmlZji7blPz1frFBcgE6PUzo5QCGdRdEtMc6W0UXkj3aYiglBsWDX36W8ue9GCUSBtIXGBDeHeN9xSU96wiUDH04D/GZ37fzKIidsXCvsJi7HCty7EJpA== 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=q2k0o8X3XoDCy1bJmuMyk4XMbq2IWTeaBJNFmegDzN8=; b=uYBwzIyO8z0rIAt+1SzPCbWHdQ+rqRQOnP+XJFWfSQxtJOcW98HA/tC0NNYP/YQhngPXd1Gizw3rWILQClNp1pe0wNbYa1tKkkIujYbOpVYDJQbmnQdUYQemTZQfUP7Bmki3TYJ+yGTwL308nVzdptw/DrDZTWlNM5dsEQzig90= 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:51 +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:51 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , long.wu@corigine.com, stable@dpdk.org, Peng Zhang Subject: [PATCH v2 4/8] net/nfp: fix check return value Date: Thu, 14 Mar 2024 15:40:20 +0800 Message-Id: <20240314074024.3199555-5-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: d734acd4-c9c3-4465-4dea-08dc43fa125f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jITVnz2MzNeKhN4paHueHOG9mfaHPAeKT/kDvxEl0jX3md6JJg1VLc9r4g1/ghOZqHsv2r78WJ4cfxKnY8tZD5YVCQPcRcFsiuLUcDe+d+e1pTSisR3ojcWYLmi6LtuvBL4LQKtOWSSodOJkU6H1nSOkheI1C5kTCxuwtgvG7e5DAMP+/r+TrYjR3u18mdRy4cKGoHx0bYCjWE+tt/hFb3UL1mYMIW0XZHNgjpxnHm4uTX+GiotmAThQfCu4+3N5uzX2vriP4FTweFbnsDv9oyyU4blISpKa+yeiM3H9THmQbdxzAvuTELD9nQA0hbxYy/gG4VnEBOykCnCa1iki2bAJVf99cqUoHdUwONa2Kvu3FZO/ghN+NgqEr20ZRsdbiJoa39JnTtfrLpO3qjFEIXZ8EA5FTCSxER9M0WRcXH4r4mqB8vdAQ8lQixeUZQJxHziht1q2ME9D7rKqKwbawde0axxvowWaeLT+lGZ0asyVipBof+fspdFzNUuoJz684wZabzBrPYVJeqfJdHhu+GJR3FqxdjP+F2TVwWWKoqIJspfFL96bbTLCHAXCLTu2bAJKeFM9Ae0ApYsLWGevave5wt2vkTOOmxYAizNkl0vzq+qC2DMzaSlWo/I0P60AunQexvYr8ESki0GKzycNSNFvpbB/PSZUttaN/cfF5NR2mWGBx14ymhRYJp6+mvRL1tXcRMTPYqcY6WA7Syqnp0QM1c9elRvXJKnzZ0Bwu5g= 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?XugjIb6oV+yxiSSM5drWdPsDlMwduYaKYkSrHhwHqKzs/fa28MWKlI7vyGau?= =?us-ascii?Q?TslDoaYEY7cD3DQLO9CW324DIfcBve3VfQWnfciqnPDonWy9HssIxTUorKHd?= =?us-ascii?Q?Re+oKueKgY3eLKtpJO284cQVPcFKlVIpgsFWEGX7zQgUlcImqc6yEaWUtME3?= =?us-ascii?Q?3gNr0vgHt5DGJ7+j8eNAZFFkeY9tBMSJ1Lgerk3R5MZ6z9TB0Nfhv2yAt3Nw?= =?us-ascii?Q?EiTltXOhkpt1UGviDfkj/lWBp56Ks4c/5T1ebVDg7DSzAiG+8grOLQmrUeB3?= =?us-ascii?Q?j5aTA5J4mUwHUoMLwusqsZldDQC2CV4H8KWxkiOw6psWQcSHiDJ0pDphUDh4?= =?us-ascii?Q?Wwfy0jah1iRXiB9YZrq0IYCNIKT+teNPogqDM76vqbeVtdW5r+8XGSVeVBhP?= =?us-ascii?Q?tVU3oZR9tdCb499ysIZ1uLliC4edgWd9uxZ60O88JxlRbQhUSJabg3efx1o3?= =?us-ascii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aP0jBFvTzFe+Q?= =?us-ascii?Q?fSpYibmrItnWuDYojCgZmZGk/PsCb6i7hZlSjjTFEtcqvP8ZKxyRUbCHriLl?= =?us-ascii?Q?kBYpXCF6pt1i8Wpuz5UJF2xGRDZKPODJC4s3qHsdQJobDu/xOgS/ND06zpmp?= =?us-ascii?Q?L2PtjGjgggZpJEIjhrvKK/BKS/kvGGBZfVxle8S1wMfqT/UgvGVHLaHI/kWG?= =?us-ascii?Q?lFQho4jrCChFt8daiClCz3hc2bmvrtehHAvyZG6ck8rqzG94eZvJMMTQgVoO?= =?us-ascii?Q?Tg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d734acd4-c9c3-4465-4dea-08dc43fa125f 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:51.1437 (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: WfXa58hQGwFq3tu4v+KVzXsD+OgKbxhh3AisMGGJH0pHtyDROXvlX4pdbCfY12S6xskwdwJ+thjTj6Fe2MLAXZFiWJn2KTYp3sPOrGTCpM0= 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 in 'nfp_service_disable()', not check the return value of API 'rte_service_map_lcore_set()'. Coverity issue: 414939 Fixes: 600f6d2c7704 ("net/nfp: add service module") Cc: long.wu@corigine.com Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_service.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_service.c b/drivers/net/nfp/nfp_service.c index f49fa6addf..24d60857ac 100644 --- a/drivers/net/nfp/nfp_service.c +++ b/drivers/net/nfp/nfp_service.c @@ -90,6 +90,7 @@ nfp_service_enable(const struct rte_service_spec *service_spec, int nfp_service_disable(struct nfp_service_info *info) { + int ret; uint32_t i; const char *service_name; @@ -107,10 +108,16 @@ nfp_service_disable(struct nfp_service_info *info) break; rte_delay_ms(1); } + if (i == NFP_SERVICE_DISABLE_WAIT_COUNT) PMD_DRV_LOG(ERR, "Could not stop service %s", service_name); - rte_service_map_lcore_set(info->id, info->lcore, 0); + ret = rte_service_map_lcore_set(info->id, info->lcore, 0); + if (ret != 0) { + PMD_DRV_LOG(DEBUG, "Could not unmap flower service"); + return -ENOENT; + } + rte_service_component_unregister(info->id); return 0; -- 2.39.1