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 AC422457B5 for ; Wed, 14 Aug 2024 04:51:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26AE340EE3; Wed, 14 Aug 2024 04:51:04 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2117.outbound.protection.outlook.com [40.107.237.117]) by mails.dpdk.org (Postfix) with ESMTP id A6D0240647 for ; Wed, 14 Aug 2024 04:51:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I2bBl1wkOSpu0a1GM5atwasMjRehPcFWCBSlWRsSmwCsgVNPlNFP7SEH/TB5Q7DeQtiqy0Fx7cX3acS+6yHjpvp7uWx8+G8fmAtFXNzrYFB9TZhptjnREUrVRsSFcGY/cgQewK8SnLT28bVUO/Djcn4EduatoUyDXJljnMCoJAdC00a1IM5VYreq4477cEajMIpinuY9oGafAXBBijOZJxnOceTqIdY9NstI5XlGWsREDs0c+8wd0yTXYDyKgCzkhSWDn8NFNwAaZtcuYxRjjn8fj0G//2bPBUGmHnLyddVwJ9g+vIuOGNPXQlitQJrTeGnmEpCrniHtff2y8gvmwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=70sF8SzljqGCEGa+raMJ5EUk1FhDyixFlbA0fzdTGS0=; b=Cb0gCb8cyxCsfbcFXYRugXjuJdmpx3PpWvdR6AwmvvFfRuSzh438vuC8aRH9zMre1Mn9ViqJkAu/ZS7bEGKWxT2GU+EVNdXCz6iXPJTnUzr4h7ZIIA6CkYZIQVQElbRUv5Srjg9kdL06FjILVouiAG6VC3fLvKXFiF4KxsJDto2PHxCPnmaAzleyXVS1N94peUlF544DqETnqRl6G4ag0GXUw0scZruKvN+x38Fw6IOTx0nxMIab2GWRO1K3X8jMqPBVWAiGYfm5whUTThIZs/oivPn6mqX9w8uZW78zUAuvYym3h63nc4j54hm4Djq6LlFx9f/gCE/r4gDTlwWYyg== 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=70sF8SzljqGCEGa+raMJ5EUk1FhDyixFlbA0fzdTGS0=; b=RflxU1koJ/y7/Lw2Ik/mjx38AJ2ARTsI2vG94HWnaaBb0COPhYPjefXRdqOkZFNLd4xlUxsGzNBEqAVeGrsfBonFPqeHFRTlaLFYeRmck8vilXnkS7l1jNVUc/oBM+C4DbXKzL2kIlo6dDIf7ZHIlw/GBw1bpSfXC61rhjtT2ls= 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 LV8PR13MB6634.namprd13.prod.outlook.com (2603:10b6:408:229::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Wed, 14 Aug 2024 02:51:00 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7849.019; Wed, 14 Aug 2024 02:51:00 +0000 From: Chaoyong He To: stable@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH 23.11 1/2] net/nfp: fix firmware abnormal cleanup Date: Wed, 14 Aug 2024 10:50:37 +0800 Message-Id: <20240814025038.1698473-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240814025038.1698473-1-chaoyong.he@corigine.com> References: <20240814025038.1698473-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0052.apcprd01.prod.exchangelabs.com (2603:1096:4:193::11) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|LV8PR13MB6634:EE_ X-MS-Office365-Filtering-Correlation-Id: 7960c040-ed5e-46e7-0875-08dcbc0bede1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Yhwzz/ls1DZZ/XSEf2IPNJeeujI2w5PRd3B2539WSfaj8badEi+HqtpOaH9Y?= =?us-ascii?Q?jxwjsrzUrGSLKBjjk79Ti7qTQ50jU9SCfP1PvTpqGhWKTql+IU8AbU5LR/A+?= =?us-ascii?Q?Axcg1VoSjNvNOONfd2HLzqsSWei5/Ogl/HgkimT3H//lCvLNRdIvlf966pLd?= =?us-ascii?Q?Meab6WJmdGBtba7ey9qi99vRtnh2fYVd+9Vp0E1V+/TsC9GfItp4J5GLg8ti?= =?us-ascii?Q?tDk/lLmdgGXCR8+7Yofcs/9m5hkJ01c6pwGBvRrTj8FGjSQ2ekVBkDW8AJQT?= =?us-ascii?Q?pLxHtLNXKO/Uz69uiwVEUoPj6f29tMTsXaV3Q8JgdvWoTLk2NfPJK4sc/90g?= =?us-ascii?Q?mRoUByn9YYP0sygxX5IkwjnkxBmWnyTq5T+6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okpOBy7JyqHEJ/snCp4tqc+R3ygdha0n3DbJlGw/rwVBkAKikNMJr+d?= =?us-ascii?Q?m3eScivUAnXmBBfoOOf2bOyq6nRGC5D6hquxdbVXNA8cvMvHoCzikr8XfpZ8?= =?us-ascii?Q?oqXLcNQ=3D?= 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:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?sgdJ2wnAFPmDEWeHTr1qFYDttHafzymLCmzLM8NgE0G5dE6E2E7qrhsacQhN?= =?us-ascii?Q?vxvmcqwegZqfnwOdTX5LCcXS2qYahRG5lUzesRAfXcMehr0YTl9FcyG4XDcf?= =?us-ascii?Q?J3/5IKUB22J7dqL1S2hhodroMKTT+8eHP1XcoK+Kgg168Dm6QDEdZm0qf9rh?= =?us-ascii?Q?dQHKX/ZF+13injIKuTwKUgJ61wXbOhOxqm4mMFkyyYbdd3MIM3sq3E+RH4Z/?= =?us-ascii?Q?JxaxdvJh98jWbGgYM5Rgu5QAwl/+Srl8AjTUG2m5JWXkyVDofaD46tQo+a8H?= =?us-ascii?Q?y0sieOR5NrV1cK/XyBmQ5vKxIWd+QJZ9FYRZ3GgYmB6olQ79NPPcV5A2Io9v?= =?us-ascii?Q?E2EZlSicvFJY8JW7jRW3hNynK2wgKzxAgnnWNKZNH6tYty6MpOcYbSLlT5OK?= =?us-ascii?Q?x5RGeO/6HP9fQETq3/PkW6cRoh+YYZl8M3PNOUHJL8PvPWvKKDi2H3ix5bpi?= =?us-ascii?Q?0j74nHXcUbZ+ZDqtHoAFY6BAlFMD66rF33VgIN7A1ii2/QRNGrQdSFnSD4Jy?= =?us-ascii?Q?GdabAn4HSk3f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cqds9ehZax+tb3?= =?us-ascii?Q?2GYyCESsUc/UdTa2ScLHeoFzJZ4eGN0/u8cNKUpmwcJac//Cu6yTryaPdA38?= =?us-ascii?Q?yWNM5azCEhnCTPYay2Ynv+uyVYYPg9cLPw85hcdjJvYmMbXo9E2Ihs0/sKge?= =?us-ascii?Q?cw+mchAZ1tGUWbmRf4qqrBdBX6/g7nQDr5OBm1Lfcwp3dbNyCLmDeucJNim/?= =?us-ascii?Q?vA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7960c040-ed5e-46e7-0875-08dcbc0bede1 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2024 02:51:00.4653 (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: GzFU/QM58j5W5/frhLrORjqdyLJmMJsANYcx8j6UxFx+ynGyq5/IhYH0xOxbwI4qehJRDxbtA5XkhJfF5uBl7v9q2V38BsojcYPdb8FyRno= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR13MB6634 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org [ upstream commit 3a64e190bcddd51b8e062cf9e78d5f62156e5e0e ] The logic of 'nfp_fw_setup()' consider both single-pf and multi-pf firmware, but the abnormal firmware cleanup logic only consider multi-pf firmware and try to write the heart beat value, which will cause coredump when using the single-pf firmware. Fixes: 8ba461d1eecc ("net/nfp: introduce keepalive mechanism for multiple PF") Signed-off-by: Chaoyong He --- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 8bb6715450..7495b01f16 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -1396,8 +1396,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev) free(sym_tbl); fw_cleanup: nfp_fw_unload(cpp); - nfp_net_keepalive_stop(&pf_dev->multi_pf); - nfp_net_keepalive_uninit(&pf_dev->multi_pf); + if (pf_dev->multi_pf.enabled) { + nfp_net_keepalive_stop(&pf_dev->multi_pf); + nfp_net_keepalive_uninit(&pf_dev->multi_pf); + } eth_table_cleanup: free(nfp_eth_table); hwinfo_cleanup: -- 2.39.1