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 2179143CAB; Thu, 14 Mar 2024 08:06:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 648C542E37; Thu, 14 Mar 2024 08:06:03 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2109.outbound.protection.outlook.com [40.107.220.109]) by mails.dpdk.org (Postfix) with ESMTP id A54E642E00; Thu, 14 Mar 2024 08:06:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z4kmivl3GXJw0207BI1H4W3P1APismT9vGc4TN63LcTqwXJB0Ji4R8wX5EZ+hJxJIvPTkCYERNeNivX/3l59PQOaMaMiUuL9pzQIMe0R3+YIUMC+zCLuvYK2qyjdXt4fUPeiICvoyun6GM6q1Nr+oHL86UzmctyLB8t2Z4PzXH5ofkRm6S8+Tz9vKILQ6vSODV/DCbAPmV8tGO6yiM8jwxz4lDD9nZDT93d+/U5R1LMEHEoOSdQqXdR9ah+A6dhP5VWe92XcE4K8VF935T0+bH7Q3LYHpD0S8Zws1GsDA27V3BJlW4aQHz9Upb3XDAU2D35mh/xXTGCGBW3ipHBhAw== 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=1uLu2HW35M23tAbofZLr54h/j0u98gr94LoPFBLAaO4=; b=Wjje3v0RMFaF8r+vqOQSSPBvT2nXhdHiB2dS/0ONML6Py/SDuPgeXWFIY7A8GFv9GJiLPAl2F90/Fxd5/XFrkdTxBVRXG2ucZRVlMOyDjTBwghDIHqAd1EyaybUkdD5uu2WdOY/dDJxhmjBvHghYy8mV3pfb4dr3nJtpBozPSk6BR+XdWao9lhmLfTfZXdtuZg0lREC32CJAnnqeqMXfekeIbayrP/Wxv1hoLnHj4s0L9fVyBBoVfOFEDZxB7RRqRUTP3AG/8C42kDy6/4DLjCmGlj6UHJX/259SwiGhYP6DESeuH9wqCqFeX6zeDT9Lxsyu/cQ1TKxUrydaSmqgiA== 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=1uLu2HW35M23tAbofZLr54h/j0u98gr94LoPFBLAaO4=; b=JVb2MiCu1qL9oEUE6BRrbOVcNKzxtDknHwkx1ohV3RpbDUWzG2l8srT8642jZQNvm7Gk5uE3+azhUfbA7QgrO+d9cUN7BwtBjMO0iDBCLldKCfoRGkkGww51gM+3XD8/1qNc7UhTebSzqFtJVo6JECselGfwfR3grtae6WlmpFw= 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:05:58 +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:05:58 +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 1/8] net/nfp: fix return value check Date: Thu, 14 Mar 2024 15:05:29 +0800 Message-Id: <20240314070536.3169210-2-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: 055c2a7c-8ea7-4e3c-0d75-08dc43f532c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b9DwJBrw5hA+7GYZAkuTbTpMqaLReWd4my/UkmyfdejKO69gCEv9tJJCnYBED7Gp4o0LqV3C9D3be7kHEYw1uNqWtuSB9Pry0x3a2Pns0HPbPiyM9KzVpQrFonOFYWkQ7+hkcKhuTxo4ZDeAAbTXrYB2rmvH5QXLZ7vsUGaPAvl0h7SNj8UNElN4iGlbQzkCHb02M51CnTe2OOYfKpc285V1rtmOgdisjAu79RFI8ZXgE8jx/1wJaLWZq9lfEie/5531FdXfdkIUa+XAQim62KkI6UR3wyxOI0qn6hS8Xg4srdde/hdPs2pPiGNt0rnKA++HXlyNpTn5rZAJb/cem7/tUKLpueIOaUnyDpjzGkLQvTfTK3/mS6tXeMOufts9JnY0OIhgiCC6NEU/oIPyeM02BH9LCvH0UQ5WlIt4sZIb1Gm933JTOzEgNFER1cXkYU+dzV6H5WjYq4UR8f7hXrx3ECl9uLtj/Wp6X+5bhK3syZBv6C/Nw9InWdmcp+V/BnfFYTEGUWY+pwBu4KxRNNfBY4KHZ4lfeBPwQPgihMbKO0evqDV9nYF5ksb2Ok0O9VaSKkrfiFqlnkJzIVkk9dlSy/CvJ66B9zjZRXTFUtN4M5Xm6RVgRcuvqQwI8SNyVoG/AXEuSdRnn2cquFJciV3AImWj7mOm5zCKfO0ostf3qd30d0cQSZ2TFkbd5GqXhxC1SiY7HNJsokUlZEpHSC3xY4R1ED1jKfAJ0NDg2Nc= 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?VPOaA8OF11vpHpKsci1xhJqHksnekKZ+QqM8Ajvd2POIDV1QB8nWEiBxuLu4?= =?us-ascii?Q?S5ug2D0pJyuXreypuaCHqwCwlWUlAhulnje8cL6PWUNPb5i/tHObxOdyeENB?= =?us-ascii?Q?wr7NeF/GgSlYoG2LZM4o1sO3yDlzBtLgEdSzu5V2hWNNE7ZiInt0eKXXy4Z4?= =?us-ascii?Q?oOuIbOMnO5VMUI2xaG+iDA5eVEOpD0/gq8lSVS8OOAYlhFTYWxExsdMd24FV?= =?us-ascii?Q?gqOM1iRQqcoeLRhCETyldv9RkbJy9O6H3Uur3FXLwXjvLvr55f+1jcCPgEH/?= =?us-ascii?Q?ISF9HTvaR/IysZtNQSCFDn/jTG6Fzdi6y+jlIs7Tk0ieTlDbQr8eHhxRtMhD?= =?us-ascii?Q?DDzi/Lf4GX0PAwQ1uO/Otw26+e8wII/N53vXjGobj6HWz4jkOn8EzysxdgY0?= =?us-ascii?Q?7IZ5cAZevumhbZI7c7uvX/c60C/iqCa8loNgnuTdLeZQh8YsJ+ow1Xc08aML?= =?us-ascii?Q?Nx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ngHm/AWy7LEvrPQby9dROC?= =?us-ascii?Q?lHpNDaqRVikl/mgnadVQ8ac9V/u3SOjX8S7Iy188a6FZi9DVAn9dtlnPDRW2?= =?us-ascii?Q?HBgPcGu/YCX39btS62hKeCutD85Gc2XxZn1wHi/OgpaaWHEiNmvTly3JTfjH?= =?us-ascii?Q?Zo4Aui/4yjDZcJw2heitMcS7jS6704y4ZETCZPEAZXDEYNM4obMpMmS5VDV9?= =?us-ascii?Q?ya56w5wmDiCdjzSrB9D+B/Z1HnzGs94Qo0+UOHOSzEWN7d4QMATUojIljfw+?= =?us-ascii?Q?Ug=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 055c2a7c-8ea7-4e3c-0d75-08dc43f532c2 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:05:58.0491 (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: m2R42fkl5HMNGn7BuYOK3l1EispmfOBTpwAqMQ6pLphxiKu8AEztGJsqFUP7cynV2p3Uw0qFvjHo2w2z9cTnHysjDJqz6l3o3TRK+kQwRxk= 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 calling 'rte_eth_switch_domain_free()' without checking return value. Coverity issue: 414936 Fixes: 20eaa8e2ebae ("net/nfp: free switch domain ID on close") 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/flower/nfp_flower.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 97219ff379..303f6bd3f6 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -793,7 +793,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev) rte_free(app_fw_flower->pf_hw); nfp_mtr_priv_uninit(pf_dev); nfp_flow_priv_uninit(pf_dev); - rte_eth_switch_domain_free(app_fw_flower->switch_domain_id); + if (rte_eth_switch_domain_free(app_fw_flower->switch_domain_id) != 0) + PMD_DRV_LOG(WARNING, "Failed to free switch domain for device"); rte_free(app_fw_flower); } -- 2.39.1