[11/13] net/ionic: optimize device close operation
Checks
Commit Message
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(-)
@@ -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);
@@ -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);