[v3,11/13] net/ionic: optimize device close operation

Message ID 20240207031317.32293-12-andrew.boyer@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/ionic: miscellaneous fixes and improvements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Boyer, Andrew Feb. 7, 2024, 3:13 a.m. UTC
  Use a single device reset command to speed up dev_close(). The LIF stop
and port reset commands are not needed.
This reduces the outage window when restarting the process by about 2ms
plus another 1ms per queue.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_ethdev.c | 3 ---
 drivers/net/ionic/ionic_lif.c    | 8 +-------
 2 files changed, 1 insertion(+), 10 deletions(-)
  

Patch

diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index bedcf958e2..7e80751846 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -1007,13 +1007,10 @@  ionic_dev_close(struct rte_eth_dev *eth_dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
-	ionic_lif_stop(lif);
-
 	IONIC_PRINT(NOTICE, "Removing device %s", eth_dev->device->name);
 	if (adapter->intf->unconfigure_intr)
 		(*adapter->intf->unconfigure_intr)(adapter);
 
-	ionic_port_reset(adapter);
 	ionic_reset(adapter);
 
 	ionic_lif_free_queues(lif);
diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 2713f8aa24..90efcc8cbb 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -1231,13 +1231,7 @@  ionic_lif_rss_setup(struct ionic_lif *lif)
 static void
 ionic_lif_rss_teardown(struct ionic_lif *lif)
 {
-	if (!lif->rss_ind_tbl)
-		return;
-
-	if (lif->rss_ind_tbl_z) {
-		/* Disable RSS on the NIC */
-		ionic_lif_rss_config(lif, 0x0, NULL, NULL);
-
+	if (lif->rss_ind_tbl) {
 		lif->rss_ind_tbl = NULL;
 		lif->rss_ind_tbl_pa = 0;
 		rte_memzone_free(lif->rss_ind_tbl_z);