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 6E95D454A2 for ; Wed, 19 Jun 2024 05:07:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBFB442830; Wed, 19 Jun 2024 05:07:23 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2093.outbound.protection.outlook.com [40.107.95.93]) by mails.dpdk.org (Postfix) with ESMTP id 8BB26402F2; Wed, 19 Jun 2024 05:07:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tqb/GOljoeQhc9fk8S0vWMAoewZ01Wn8gzy0+gNgP3fvgiOs5A4fkR0vbsR1b+BbymW8+13L0qr9XCQrkOW/Cs5oUBks7SYR8/INKOWSNUnVjw5QFH0/18pfgWoWrLMRL+kJyrb3Zm9wYg4ZjFB7w6IOcs1p4gMbhWilHsIEZTJ12YCN3RCRI8878nxfd5aPKvSkuUHU1zvykwBwfjll9m9P+Sjf4wgjWMI9TBtpSKpRQcohG0h0AbJH6gn4jxrtSOxoZtTO4548phYCQBclS+KGCHBJ30O4LmNPiB57mbUQhHgLNuTheAtbkIBbNCY+n00HNvKgW25vruMaSw2QRA== 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=BS3qUn1frs2tyPCM3l+Ko8GhlmglaUZ6TaKVGkyqb4A=; b=Z1SrlD/8IxIQX/yYnxjCrd7SAcuvr4brtkJc0p6Ysdbraomgvx+8XHvhnyfkTWI/6weYxi8RAUcKRIZ8BHAIWLbnA2w1eMXitip/EUIGzKT2LkoSfsYVzwEbzWykJ8OtGdQluGCcAl+lW/gcPFvmxudo5aBayZDiHDschcchIheahLQ3Lgc6j7fQ9Z3G23i1CA4m5jahQTe0SpS+npgFoX6UU4XeI9UCtt3q+Cwn1LXbj1fF1jieL263lzvFKPTwTizDHlZaVgUXEEWAIA0bwEw73KAoe4bYlV/7387i6Fk3VHrBJHZuz2RsOsTtSSUPdQEAYEN6S1Ygnpa0GbiO4g== 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=BS3qUn1frs2tyPCM3l+Ko8GhlmglaUZ6TaKVGkyqb4A=; b=HD5rfFOI812LcJXmkIQhXcFN9sFjfoiRpvaE92kuCck2iqj5Od0KVmUum1pnnyLzuwiMWQm8LtVdS/73VU1AUDjL75UwBuyU6MA9HH5L+BG6bZEwVThIi0C4KlDskIVp0AxxXMVyH2hUZXKdNwbqvamKo0H0ueAkskYO5/PEV6c= 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 SN4PR13MB5789.namprd13.prod.outlook.com (2603:10b6:806:218::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Wed, 19 Jun 2024 03:07:19 +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.7677.030; Wed, 19 Jun 2024 03:07:19 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , stable@dpdk.org, Peng Zhang , Chaoyong He Subject: [PATCH 4/6] net/nfp: fix disable CPP service Date: Wed, 19 Jun 2024 11:06:53 +0800 Message-Id: <20240619030655.3216268-5-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240619030655.3216268-1-chaoyong.he@corigine.com> References: <20240619030655.3216268-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0239.namprd03.prod.outlook.com (2603:10b6:a03:39f::34) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SN4PR13MB5789:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d44d05f-7748-4e17-833d-08dc900cee25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|52116011|376011|1800799021|366013|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?9VWUZqG3NTxxaCaytZaUYN6dJdWvJ2HVGMz9LPPS7A9Z1r237lOsmLfmrxxB?= =?us-ascii?Q?uotMXWHOardv9N8fUJQlQ7B6iCyWTm15QEQ5UnGEFmnIwKoBvfSqyJ4g/FjQ?= =?us-ascii?Q?uepTX2GY2hK0GUr+C3OJkB01UglhHZfqc9QQEg/zHlND25vTX/oUK2tImcFW?= =?us-ascii?Q?Dlg3/+JqgKhd4DNoHeljJQ8qSk3/huBLjVWlJqPobsslB52NcGK0mq2e3tJG?= =?us-ascii?Q?9U5Bh5qcNPeb/XcrXYOhcVnzNt09w6KdGiEi3nJOUZUciAf1aEv8PrpqbqIj?= =?us-ascii?Q?NgETVPcOA2S1qjY3C0RXu7Up628Xh9e2pkHHD4FFCEtuFsD1EQdg1OviPwnV?= =?us-ascii?Q?EYfOR3/jP/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8zpV?= =?us-ascii?Q?lZ+L/Q7U4GbCaVRi2v0axdFV9bT3gaUyVLKpHiMhxtW7nZlp1ZxrQ/dZ+AzK?= =?us-ascii?Q?17qto2TY0HEb/vA81/K5owRBOaY2oVYmxy2yMYy2xhye3WWdAb0wAPxPRaEC?= =?us-ascii?Q?KuXvlR8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(52116011)(376011)(1800799021)(366013)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8ejApNf/QwgY6oLQxADt8RsWF47MS/B/COv3ms81TG3IsrhhzSv6bxkTt3CN?= =?us-ascii?Q?6QqE6Z0vwHg6mEofxIZ9yx8Xf4xAghLBWS6EImjX0QMEbI2p0v6uCtq6CUzV?= =?us-ascii?Q?gSJxQKbr2xtSLiNk+R2ERwPj68P8B28bT4a5sxBcYwfp5Gcz2iC5bw5OZDEj?= =?us-ascii?Q?us67rYLmREpaRB+bXmGqlBy1jMHyd8nrWDII101mnn3jtqqQ9L2FjmdavyG7?= =?us-ascii?Q?z1fNJgHGkFtIhvds/nDcgi5e5mJjFCGgXNuLj8vN938kuPd69nLegGE5sKte?= =?us-ascii?Q?A3SEa8p5Z6qOAwCRK318wuYgZQZbZNQ5OoOaKg9knpH/pdpcgYREaJclnH5t?= =?us-ascii?Q?wPpw3GAm834Jo7CUz6l9UXEn/BytAl7SuvD2mssjVPVH6he28FL6QBC0Lr/V?= =?us-ascii?Q?r9iuDy1E/0f3Ij/Zc4vf55qV/QBGIblDx/dzCdPCS32eTYgP5J0n2IFOMBs4?= =?us-ascii?Q?bgwJATXkJYc8CsMVPokbNxSVnoykiljsy7onCK+PacP2Ybvm51/rZfzgB1ye?= =?us-ascii?Q?Y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xaBhwo4cy6K/OEl/f+h8JuAEY?= =?us-ascii?Q?+nvA/Is8HEogTsM/ZS8GekekaOBwVa4EtPWd9eWAxy9hU3hdR/92JtTvL5OQ?= =?us-ascii?Q?TYQ7q5ALXW8xakpqwjVQoPBP3XG21J55j9d2x9qSzkGlk1ZepSfVqjMs9FLW?= =?us-ascii?Q?sS8cDU89NCGkn/ed6WShvu31TDOJ8s6WpT/yO3ikthNO/uAIEoVcOrhZn3Yq?= =?us-ascii?Q?LQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d44d05f-7748-4e17-833d-08dc900cee25 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 03:07:19.1796 (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: ugOmblstGYnPkgtr3PawR9eAWAoeGnKj9ZNZZqs6ULWUifsAR5m/kzj4FjDejAGMjZiIPktcOV8PyZgODByDinAXS6SS3GVCgzKEB4v5szg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR13MB5789 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 From: Long Wu The CPP service is enabled in 'nfp_pf_init()', so it should be disabled in corresponding free function 'nfp_pf_uninit()'. Fixes: 600f6d2c7704 ("net/nfp: add service module") Cc: stable@dpdk.org Signed-off-by: Long Wu Reviewed-by: Peng Zhang Reviewed-by: Chaoyong He --- drivers/net/nfp/flower/nfp_flower_representor.c | 3 --- drivers/net/nfp/nfp_cpp_bridge.c | 6 ++++++ drivers/net/nfp/nfp_cpp_bridge.h | 1 + drivers/net/nfp/nfp_ethdev.c | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index f1451fcca2..700957f945 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -457,9 +457,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev) /* Stop flower service first */ nfp_flower_service_stop(app_fw_flower, hw_priv); - /* Disable cpp service */ - nfp_service_disable(&pf_dev->cpp_service_info); - /* Now it is safe to free all PF resources */ nfp_uninit_app_fw_flower(hw_priv); nfp_pf_uninit(hw_priv); diff --git a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c index 441c0d2843..fc73fa20ab 100644 --- a/drivers/net/nfp/nfp_cpp_bridge.c +++ b/drivers/net/nfp/nfp_cpp_bridge.c @@ -45,6 +45,12 @@ nfp_enable_cpp_service(struct nfp_pf_dev *pf_dev) return 0; } +void +nfp_disable_cpp_service(struct nfp_pf_dev *pf_dev) +{ + nfp_service_disable(&pf_dev->cpp_service_info); +} + /* * Serving a write request to NFP from host programs. The request * sends the write size and the CPP target. The bridge makes use diff --git a/drivers/net/nfp/nfp_cpp_bridge.h b/drivers/net/nfp/nfp_cpp_bridge.h index 406c961dce..93026c10f4 100644 --- a/drivers/net/nfp/nfp_cpp_bridge.h +++ b/drivers/net/nfp/nfp_cpp_bridge.h @@ -9,5 +9,6 @@ #include "nfp_net_common.h" int nfp_enable_cpp_service(struct nfp_pf_dev *pf_dev); +void nfp_disable_cpp_service(struct nfp_pf_dev *pf_dev); #endif /* __NFP_CPP_BRIDGE_H__ */ diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index ddbbd736db..76bbaf1f50 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -641,6 +641,7 @@ nfp_pf_uninit(struct nfp_net_hw_priv *hw_priv) { struct nfp_pf_dev *pf_dev = hw_priv->pf_dev; + nfp_disable_cpp_service(pf_dev); nfp_cpp_area_release_free(pf_dev->mac_stats_area); nfp_cpp_area_release_free(pf_dev->qc_area); free(pf_dev->sym_tbl); -- 2.39.1