net/bnxt: reduce cleanup time during reset recovery
authorRahul Gupta <rahul.gupta@broadcom.com>
Thu, 10 Oct 2019 01:41:48 +0000 (18:41 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:08 +0000 (16:43 +0200)
In stop_op(), don't wait for link down event's ASYNC response from FW.

Fixes: c023cd5b2192 ("net/bnxt: fix async link handling and update")
Cc: stable@dpdk.org
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c

index 84f7b87..69dafc4 100644 (file)
@@ -967,8 +967,12 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
                eth_dev->data->dev_link.link_status = 0;
        }
        bnxt_dev_set_link_down_op(eth_dev);
-       /* Wait for link to be reset and the async notification to process. */
-       rte_delay_ms(BNXT_LINK_WAIT_INTERVAL * 2);
+
+       /* Wait for link to be reset and the async notification to process.
+        * During reset recovery, there is no need to wait
+        */
+       if (!is_bnxt_in_error(bp))
+               rte_delay_ms(BNXT_LINK_WAIT_INTERVAL * 2);
 
        /* Clean queue intr-vector mapping */
        rte_intr_efd_disable(intr_handle);