From patchwork Thu Jun 2 01:53:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jin Liu X-Patchwork-Id: 112249 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03378A0548; Thu, 2 Jun 2022 03:55:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B68542B8B; Thu, 2 Jun 2022 03:55:03 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2108.outbound.protection.outlook.com [40.107.223.108]) by mails.dpdk.org (Postfix) with ESMTP id CCE51427EA for ; Thu, 2 Jun 2022 03:55:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GDuWFz5bsVgHxA/yEd/hUtGNS9APQFQY5rmgKkT6PLFCO71UM8I2DHTRegfFGbngqACWwL6jjB+J1/LmpjhQul/3Mf6rffz5fT0H3xbChMwAfdr+xYQb7N5PXTx9+LUXFmPeOje6fu5sgLE4XTpDvEz+glVYCt3VDmEVMIjIrUf8DdzWyMzEmdW9RsalIiuQL8gU9B1gEeiE2gTLfxvgqxHdcjab5dkduSDat3293yRVdMo5oACFQBWYGV/zczNa7xV/iSRYsvaOBbVEwe3cU1IIOjiN4Q+tO4nBcuFgAaCeqEQON1SVoBQxnhnm8WzovkIHQJoOGWoaS0wpZW94dQ== 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=BA4ECEfWpEHsTRhrYdl53bPa5sJqgs5epkE7LnihItU=; b=VESYakmlhtLrCCdTa5j0qva/nt/5KaTtGuf216lWuOGRhUJZ/WCiYEsHjrjGh1BFXdmP/vssUcsu2dduw/h3NSee5MTGgZXYg3/IH2vWmgirnvZx5FGhWV1eU6q2zAsaBgPNoUyq/TddZmeg/8a21qFGScO8/KXVWm3qxSUx/uXu8Gs5oLiQff0B5Ex/ksgsbq2DD59H8Nd3v3BxBI2mZjE/WpP1OI4H1e4Lqtijg+eScW0yASVNMv6ZvP/ZZT6VDFiZcj7BCIPCjumAhmxUArk/p5TvbR8HZjp49r8BrU8h17JXIjhtb5IsvazPsSgFWEm5LCMvPdNpw/l7S3YtBQ== 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=BA4ECEfWpEHsTRhrYdl53bPa5sJqgs5epkE7LnihItU=; b=QNV42lxUdT1II/eC1aFpL4WILCPaz7YgT8Q6vsgRl6cQE1VX3ovXLcGAJ20LigQLww79aTom3uf/KJo9ZE54soA+oxnDVLelpMRR+QHlcV3W7C8G5JgwG2iHGUhSo5ayLnKZIhClJcKtytpqUWhdSNSAjeUvAOYKtKbeD9enWOA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21) by DM4PR13MB5858.namprd13.prod.outlook.com (2603:10b6:8:46::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.11; Thu, 2 Jun 2022 01:54:59 +0000 Received: from DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::d902:ed7d:82bb:c753]) by DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::d902:ed7d:82bb:c753%4]) with mapi id 15.20.5314.013; Thu, 2 Jun 2022 01:54:59 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Diana Wang , Peng Zhang , Chaoyong He Subject: [PATCH 10/14] net/nfp: add queue stop and close helper function Date: Thu, 2 Jun 2022 03:53:00 +0200 Message-Id: <20220602015304.710197-11-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220602015304.710197-1-jin.liu@corigine.com> References: <20220602015304.710197-1-jin.liu@corigine.com> X-ClientProxiedBy: LO4P123CA0457.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::12) To DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b91a59d-cf4d-45f1-a00b-08da443ae69e X-MS-TrafficTypeDiagnostic: DM4PR13MB5858:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d/o7SFKfbZK/JskS0VdzZkDiuf0Lw93NCSeQzVtkOOI2nekZNyyGfN4lGsoXyE9Y+/X377UEUr+1ev/TGxPGMC+0T1f+UbM8sfx5ALeMKXGNRMRMe37PhaBTSiKTP9392tIFKwAawIzPfpVuQc0+Vz83ghWJNY9a4Dcd+YkkQYSQdIha/1PteytnsHYYR4T1xLaMhVCxLsU7kGsZycIItnsnFANhJUgGtUhoKUx0sFjKreAtQDrbdANRkr9znWy/NT7jeVoYxUwkn8c+oWY+5T33IpQ+mXmzhNWT6tCcLZSzST/HmYKuRbsOsvPUd91+oQaLq1o735vIsJM+go/IECf384cygoqp07L3MWwgnoEAYIdgQ7WrqTU3gO5FsoowscPl0+wLOiGaD0DjBaH0iBaM85pkI6nJzUKSUVhBLs6NxBL8+LBXrOKEK1LLiorF7vIUBzxQU42tlL9yfD64h3uGcskNrHgseJxdpHpQDDLHIEdEF+vv/qw5Qfpds4VqD/4aEMgyHAVMUETqVnKuyKdMCmdEWdCCL3WmRyBsyd5DWUgcxh0Sq1iwK6FlVOg74QC1h5OxOnX+9U6CIdTNavYfvb6WAQ6N4dVr4+bJ492pAKb7mc6s0Jk6f2sQSPk7Ia3Y2ikw4D7f4a4iXGwfJgQj0AxWTsEuLOqmLtvejWsE4WujsNghfZ0F1dv7ic4CFRop1UzB2NIoPE6WGlfG4A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB3004.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(346002)(366004)(396003)(136003)(376002)(39840400004)(36756003)(186003)(66574015)(83380400001)(5660300002)(4326008)(44832011)(8936002)(2906002)(6916009)(54906003)(1076003)(107886003)(6506007)(316002)(2616005)(41300700001)(8676002)(66946007)(66476007)(6666004)(66556008)(26005)(6512007)(52116002)(38100700002)(38350700002)(86362001)(6486002)(508600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0c5WD9KOAUYhqkKpiTBqhiu6wUt0?= =?utf-8?q?bYidCs0bH3+DMxRD7RZ/AlP/RRbwpHgD6BB9kHhoWH0eJal4/v4O3t6rScpdi6I/A?= =?utf-8?q?ERWQJtTy2BG8QSeCWuHgFFFMmmrDohUFhstHJyuCGE6KHrP5gOiS1OWG72Jgp5dCh?= =?utf-8?q?LMrac2hb27LFs/6uHHToq0B0bW1MmyPHp0SLtGSBRu1bAh2woNixQOV1OLnDaksu6?= =?utf-8?q?ilqERvVegzVVzAVyE50OzfQMT6BY/sxxUQXszQ9XJS/qxfQXc/LVUZEmlk80xX88z?= =?utf-8?q?Fyk9s6A2RNDTFbhJud+IkiLbRyyZ14GaXy3lsQ/WZsiXGzzSj2C7IyT6cOZYlwKEr?= =?utf-8?q?qpBaFVonwAuaZclJcX1AbAS0sEaWv+wMtSLCJA3l1Uqgg+L7hViVWh0tERHzd0mcV?= =?utf-8?q?Z8PJhYfLGKarlHSTBCrzNMJr/8nZiUo7YfWVMWcGpbmq0ATIzwjEaPfRiUGWGgNcZ?= =?utf-8?q?MLjk4OmjZYaiSHuvR4zZ+GTcF9xVMT2lL2HVGb3Yxyc0gt4pxeQElk8kiXdCIvcsl?= =?utf-8?q?+SqetIcqMY3yYjiwxlDcxLaHtbIQSJfWEMsE4sE77upeghxWqw94snjkw9tYKxgMs?= =?utf-8?q?T7uywdDb4VAukRVZkM0mbKpP8+f+LppsjulsuTd0hBp11QOz/Dnr8+3o9z09oGyzg?= =?utf-8?q?/8mvtRLt0g+6vMKGl3Uk05TEhI5gPaWjoKyF+kUZuhc2kw4nYwf4S3Jj/kz/mIqFz?= =?utf-8?q?/Iko2dZgIROhiEtjcWH3YcjrSzLlobYtZps6/pLXxzjJbBgwfRflrhSH0tTz8UswM?= =?utf-8?q?ftD5/wWbaNGcleMMrC/SpLVVXLJPgOHFEDCim7E/FlQb6IyxOuWkr+/cK3NII17TS?= =?utf-8?q?wSEXwIHEEPOMGqaPbrLTcIKeenIMzbdQ7Hde1HhywJO1zB+OstKx3zTEXDHENWncj?= =?utf-8?q?M0LQ/bmI8wKpMS3ENaGQvJDHRBfvkxdTvCzXGCJiT/AmGC32KBuLuCrLWlwiw2WIc?= =?utf-8?q?76XcFWNmh6IDJvO/+XYq5knOwLQHtFQ8/AkK37sHh9vdQcmzVBI7amtgQwM5JXWF5?= =?utf-8?q?eyDUGtQnDl4vJHZIIVlrfwHG33zK41luJ9gaaJB3NMr7J7W7UQ88sR0Wp9k3S4HtZ?= =?utf-8?q?uOI0AMF31wom0ewN9D5tydWiKql04Epu3PFbfbessbVaYQGBej14D55H39lL7UUeQ?= =?utf-8?q?yijb2YIBUHrKhMGnHJOzcJBIuLzMqNOJSudohGY4P3GDN9CWY2S5O1yowbZih0ZWp?= =?utf-8?q?whcCx4huJEUTRp6JYzmbG7t1q6TTV3J+iHqyK61PKfqwRmicV3mfovLzm+lMOkKd3?= =?utf-8?q?GGbYn5HvrI7GKKc4OXJ1OsdYCD+hZA1Z6C/wcg4BZUG8ztgz7/+yKP+wQbDt4+rjS?= =?utf-8?q?W8YpIiRgDvZidvOIVEO+u43NXymIiuSpJ0DIA0ceXJduVynRQyHKmYKgV+RILY2wF?= =?utf-8?q?ld0EooCMENzzDHc98crpC+CpqK00n9Gmj+oTfyT8a3wKtiigR1MxawkA/DghRJmk+?= =?utf-8?q?ZXYMp56M3krtYszp2hYXee6YQTxLp1epd6DSSnT8V/hIU9RWBFmPOR0vWoyHcM6f9?= =?utf-8?q?/FCNQENhTKWhNyRk/yQO+MeaV8p5n6GEQzla6JEv3VAPjcfu/KJH5Xt+UFSi8mhrX?= =?utf-8?q?cwfTj22dCvMgSagzYLgClBbdkMoQImR89MnFE/6RjFpXkymhC2tGsJRFPQ0yJKRVN?= =?utf-8?q?4IG++LXr9tnN4Z+UY27JsPQ0rrpGTjvg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b91a59d-cf4d-45f1-a00b-08da443ae69e X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2022 01:54:59.6793 (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: QR0aY0HW+HvR9Dy3LV+dJ4tXh2vWir918fT0+gi789M/V1Z7JMQd7a8LB3+voVoAZpHwK3NqfhlNPq5nFTFqog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR13MB5858 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 This commit does not introduce new features, just integrate some common logic into helper functions to reduce the same logic and increase code reuse, include queue stop and queue close logic, will be used when NFP net stop and close. queue stop: reset queue queue close: reset and release queue Modify nfd3 firmware net stop and close function, use helper function to stop and close queue instead of before logic. Signed-off-by: Jin Liu Signed-off-by: Diana Wang Signed-off-by: Peng Zhang Signed-off-by: Chaoyong He Signed-off-by: Niklas Söderlund --- drivers/net/nfp/nfp_common.c | 75 +++++++++++++++++++++++++++++++++ drivers/net/nfp/nfp_common.h | 6 +++ drivers/net/nfp/nfp_ethdev.c | 27 ++---------- drivers/net/nfp/nfp_ethdev_vf.c | 29 ++----------- 4 files changed, 89 insertions(+), 48 deletions(-) diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c index 6cd1085c1c..58e20081fc 100644 --- a/drivers/net/nfp/nfp_common.c +++ b/drivers/net/nfp/nfp_common.c @@ -1293,6 +1293,81 @@ nfp_net_rss_config_default(struct rte_eth_dev *dev) return ret; } +void +nfp_net_stop_rx_queue(struct rte_eth_dev *dev) +{ + uint16_t i; + struct nfp_net_rxq *this_rx_q; + + for (i = 0; i < dev->data->nb_rx_queues; i++) { + this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i]; + nfp_net_reset_rx_queue(this_rx_q); + } +} + +void +nfp_net_close_rx_queue(struct rte_eth_dev *dev) +{ + uint16_t i; + struct nfp_net_rxq *this_rx_q; + + for (i = 0; i < dev->data->nb_rx_queues; i++) { + this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i]; + nfp_net_reset_rx_queue(this_rx_q); + nfp_net_rx_queue_release(dev, i); + } +} + +void +nfp_net_nfd3_stop_tx_queue(struct rte_eth_dev *dev) +{ + uint16_t i; + struct nfp_net_txq *this_tx_q; + + for (i = 0; i < dev->data->nb_tx_queues; i++) { + this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; + nfp_net_nfd3_reset_tx_queue(this_tx_q); + } +} + +void +nfp_net_nfd3_close_tx_queue(struct rte_eth_dev *dev) +{ + uint16_t i; + struct nfp_net_txq *this_tx_q; + + for (i = 0; i < dev->data->nb_tx_queues; i++) { + this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; + nfp_net_nfd3_reset_tx_queue(this_tx_q); + nfp_net_nfd3_tx_queue_release(dev, i); + } +} + +void +nfp_net_nfdk_stop_tx_queue(struct rte_eth_dev *dev) +{ + uint16_t i; + struct nfp_net_txq *this_tx_q; + + for (i = 0; i < dev->data->nb_tx_queues; i++) { + this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; + nfp_net_nfdk_reset_tx_queue(this_tx_q); + } +} + +void +nfp_net_nfdk_close_tx_queue(struct rte_eth_dev *dev) +{ + uint16_t i; + struct nfp_net_txq *this_tx_q; + + for (i = 0; i < dev->data->nb_tx_queues; i++) { + this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; + nfp_net_nfdk_reset_tx_queue(this_tx_q); + nfp_net_nfdk_tx_queue_release(dev, i); + } +} + RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE); RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE); /* diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h index 346fece527..1489b2ac65 100644 --- a/drivers/net/nfp/nfp_common.h +++ b/drivers/net/nfp/nfp_common.h @@ -409,6 +409,12 @@ int nfp_net_rss_hash_update(struct rte_eth_dev *dev, int nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev, struct rte_eth_rss_conf *rss_conf); int nfp_net_rss_config_default(struct rte_eth_dev *dev); +void nfp_net_stop_rx_queue(struct rte_eth_dev *dev); +void nfp_net_close_rx_queue(struct rte_eth_dev *dev); +void nfp_net_nfd3_stop_tx_queue(struct rte_eth_dev *dev); +void nfp_net_nfd3_close_tx_queue(struct rte_eth_dev *dev); +void nfp_net_nfdk_stop_tx_queue(struct rte_eth_dev *dev); +void nfp_net_nfdk_close_tx_queue(struct rte_eth_dev *dev); #define NFP_NET_DEV_PRIVATE_TO_HW(adapter)\ (&((struct nfp_net_adapter *)adapter)->hw) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 2bf7a565bc..0a5c703190 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -181,10 +181,7 @@ nfp_net_start(struct rte_eth_dev *dev) static int nfp_net_nfd3_stop(struct rte_eth_dev *dev) { - int i; struct nfp_net_hw *hw; - struct nfp_net_txq *this_tx_q; - struct nfp_net_rxq *this_rx_q; PMD_INIT_LOG(DEBUG, "Stop"); @@ -193,15 +190,9 @@ nfp_net_nfd3_stop(struct rte_eth_dev *dev) nfp_net_disable_queues(dev); /* Clear queues */ - for (i = 0; i < dev->data->nb_tx_queues; i++) { - this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_nfd3_reset_tx_queue(this_tx_q); - } + nfp_net_nfd3_stop_tx_queue(dev); - for (i = 0; i < dev->data->nb_rx_queues; i++) { - this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i]; - nfp_net_reset_rx_queue(this_rx_q); - } + nfp_net_stop_rx_queue(dev); if (rte_eal_process_type() == RTE_PROC_PRIMARY) /* Configure the physical port down */ @@ -256,8 +247,6 @@ nfp_net_nfd3_close(struct rte_eth_dev *dev) struct nfp_net_hw *hw; struct rte_pci_device *pci_dev; struct nfp_pf_dev *pf_dev; - struct nfp_net_txq *this_tx_q; - struct nfp_net_rxq *this_rx_q; int i; if (rte_eal_process_type() != RTE_PROC_PRIMARY) @@ -277,17 +266,9 @@ nfp_net_nfd3_close(struct rte_eth_dev *dev) nfp_net_disable_queues(dev); /* Clear queues */ - for (i = 0; i < dev->data->nb_tx_queues; i++) { - this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_nfd3_reset_tx_queue(this_tx_q); - nfp_net_nfd3_tx_queue_release(dev, i); - } + nfp_net_nfd3_close_tx_queue(dev); - for (i = 0; i < dev->data->nb_rx_queues; i++) { - this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i]; - nfp_net_reset_rx_queue(this_rx_q); - nfp_net_rx_queue_release(dev, i); - } + nfp_net_close_rx_queue(dev); /* Cancel possible impending LSC work here before releasing the port*/ rte_eal_alarm_cancel(nfp_net_dev_interrupt_delayed_handler, diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index ee9ff977cc..d347c98134 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -145,24 +145,14 @@ nfp_netvf_start(struct rte_eth_dev *dev) static int nfp_netvf_nfd3_stop(struct rte_eth_dev *dev) { - struct nfp_net_txq *this_tx_q; - struct nfp_net_rxq *this_rx_q; - int i; - PMD_INIT_LOG(DEBUG, "Stop"); nfp_net_disable_queues(dev); /* Clear queues */ - for (i = 0; i < dev->data->nb_tx_queues; i++) { - this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_nfd3_reset_tx_queue(this_tx_q); - } + nfp_net_nfd3_stop_tx_queue(dev); - for (i = 0; i < dev->data->nb_rx_queues; i++) { - this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i]; - nfp_net_reset_rx_queue(this_rx_q); - } + nfp_net_stop_rx_queue(dev); return 0; } @@ -185,9 +175,6 @@ static int nfp_netvf_nfd3_close(struct rte_eth_dev *dev) { struct rte_pci_device *pci_dev; - struct nfp_net_txq *this_tx_q; - struct nfp_net_rxq *this_rx_q; - int i; if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; @@ -204,17 +191,9 @@ nfp_netvf_nfd3_close(struct rte_eth_dev *dev) nfp_net_disable_queues(dev); /* Clear queues */ - for (i = 0; i < dev->data->nb_tx_queues; i++) { - this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i]; - nfp_net_nfd3_reset_tx_queue(this_tx_q); - nfp_net_nfd3_tx_queue_release(dev, i); - } + nfp_net_nfd3_close_tx_queue(dev); - for (i = 0; i < dev->data->nb_rx_queues; i++) { - this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i]; - nfp_net_reset_rx_queue(this_rx_q); - nfp_net_rx_queue_release(dev, i); - } + nfp_net_close_rx_queue(dev); rte_intr_disable(pci_dev->intr_handle);