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 DFFFD43CAB; Thu, 14 Mar 2024 08:06:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FDD142E6A; Thu, 14 Mar 2024 08:06:10 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2135.outbound.protection.outlook.com [40.107.220.135]) by mails.dpdk.org (Postfix) with ESMTP id 5985642E43; Thu, 14 Mar 2024 08:06:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tteuo/H6JCSkit4O1AJqEIDFRqwNS4JHAudIinkuy1nFFEG7ASSin71vqUbu7tCrmIV/wkq+nT17dtw3gTaO8RzW0z08/w2COQ08dDCb0HiOux/2exMmRl6IFP3VbO6g3nUTxq6UT2ZHOAMhRE38EX0RFEDDNM0l1M8RvLxZEwDCWoWqgjkkwEVtjo5/SjmuBhBnKmmy+eSeWB/aiqBd/e89092+XDDuAe5uPiiR6+LlkvD2ZZzKv9RePThlZnHK2YD7kgKNTIsvI50qlXqPoEXd8i+MzxlFHX2iZzm4whftLj/N/qwA1BMVlLUrmyl/Kj9I5e4S4s1qGVEaybFMyw== 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=nvOwZK7utCI+7GXIStxb40vpJzmxyoSILEBk3uojqK6SG/6GOgA6+hMr36jztHsMFPLO/fBGdDP8Gq9Uip/BlvL6n3BEAIPKDFIJs2eVxgrNy4jiKejx59r/6iWxyc+CAr9v3cqlbIYxOT2GjJchSlTf8sJqnm4As3uniQf6VSbCDTV45OFWqJcpfbCSxCHWOJ4O50Ig69qGrEIUdADcuXJtPAphoKUE5pZd4U3cl8vn8TNvHIh2/YkzuIZSYGjPvCtSynn3GH2wPjX0tOaXC83VeLOpwnCpH+ZnoJGH5RWtUNOWhoJL7RRq1OFXhkZvpoh8IHHHq0Ff4+ALbfMK6w== 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=S7bwp6nwK6OiNTnp3g9C/FvSBBMLCvlxpm0SPHDaw7fgTiLQutiCqBLSpdBG9neriAvuxNs3cT/19nfW2SAk0HrzAPWVipe9PsL77Wymjoy1Dz9HCtCwOlLgaVJhKDkOOy6ZdwSyP7l7lQghxFLhOdrpzc0VLCDRCMQefx/vSiw= 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:05 +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:05 +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 4/8] net/nfp: fix check return value Date: Thu, 14 Mar 2024 15:05:32 +0800 Message-Id: <20240314070536.3169210-5-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: 6eabf46d-27e8-44f1-e17e-08dc43f5375a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fin+7MntdVPqygu+p+NC901IRLPxkDS0H9snNZMybwSPSWB7P9/Y73czAJ3qfbyU2UUE7t3O4DrEMFsH1EW4Y6v+ZjncgYp45ckm0sd14NloBZ77Adzg3QgF/sifoQqWgfLABDcSv/Ju7FvR6i5gAg9tsG5lWUqIb3b7BpxONO4zkM6z5MnLfPj6dB0E75lBHUrea8ZwAw4xgk7QZigBQdowa7X08Tbek7PrWCNDnOJTB4LPGtHfuDZx1x+75dsIfc0Kq753QGK+xArkchMYS8QcZBSi0zIq21N5ipWEigJY4rqHiJo0lmAhEinRmx3GL1EgIsSsAXrEWrfuthD7Y8i0H9qxpVngAsVqVh4Rctlddi6bSefeTSmlTigngq7lSMxt5RSvi1g16o8nXrZiC8z9xSQyQd0E16ptPpdcySFWuLcsVHKEiJX17LAztm5FCBfaLYSDWVRtr3ODtcVZ1j6AN2Q6N8NIif9/LXibCpupxtoxGzxr1BaWukDhVeA5QwTnaZ65GuC7H/oOZwKq+Nd/vPs7dElFeiRZYLXtXSNMDhB30HE8C7dqhdVceVdzlAEbsS1TAjMHNL+AYHt5j8YFGiaSaIIxbER9VABv3r6AZj3FLJ4j6+tsaMjvYaz5eAf5giQdgoKd3azeZcptVNxt5rvCWWTQBiHQkkPIbC3Mf/SJ8jcTOCh17tpiqRiAqsxet39xfO3Vmjx533Edfn7Si2iIfrxcabqPiKKJEsA= 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?CIkfW8j7YVnGXB3UPVQP30k1af+GQ9X2wQ1MXZXKmdeyJNlNHGjTu3zVbfK+?= =?us-ascii?Q?Jpc3oiX9ggMGQIUIxOcV2I7+90OFIUsz3Het6xM1NYCFqggO9rmm7oa38y7D?= =?us-ascii?Q?KzD+dVye7ZDpXid6iTVcT9QW4u8soX9OUWVFhM27DS6Jxe17r1zAE+X/cRWs?= =?us-ascii?Q?z+fxzBcogxqtX9jBn7dYWvi5pfTj/xPQ4+spFLNlGFzUujOuZRmItGekfTf4?= =?us-ascii?Q?Owz8IhPmnhhhgTKMZshH6iTUaFRFCsjVoDCkzv12lcoWPmmafKGYKfbYB+ca?= =?us-ascii?Q?p3YkZ0TYKSuLkcPXMJ0I7Q8fi17bMl9toOsUaay82jQl74PO3WQnYV+AGrKr?= =?us-ascii?Q?4OSSP3tMCpCA5F4xBG6x5ZHEo7FnVcDaSVuvuxbEcNu48xrIEXrqwBKzGVyn?= =?us-ascii?Q?mw0EVHmtApfHTJ2ym+ghyHJjkPUIwEPjoGssF6LGqtIziz9bYp+YSo7FIzGU?= =?us-ascii?Q?uNxn+wor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+wms?= =?us-ascii?Q?eN9C2EmkrunI+xOtXjp/UTodqdsdhr+9HgNkAczJJm+Ny2hIhjR3R6E4iT8h?= =?us-ascii?Q?/DfbIESj6uYPNamruI/mivQwCZamOvx0X5hGd/hs4eR865xJJaJXSiyKnkPA?= =?us-ascii?Q?PAChck0uNU15QX9oVekCY4hlUj0vqRNl7JluTQPIevk2S+ow7xd3OYr99VvG?= =?us-ascii?Q?dS+Y4XpfT3dASmUw3S5nonsgAFAiwIRSOkxUVJuOpUoLSUQlHxa8mHkKg2u/?= =?us-ascii?Q?tw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6eabf46d-27e8-44f1-e17e-08dc43f5375a 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:05.7814 (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: 8Nq0OwtSXjfXtccZxIQ2I35QazCtPRDFNlHHK6EOyVBHYLTrMGz67+GBLRtoUvaQuxv/gTR97n+GMfZ/CwbTFUUqlfGDCq7GlIVeabNsTrc= 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 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