diff mbox series

[07/18] net/bnxt: set fast-path pointers only if recovery succeeds

Message ID 20220104083824.23001-8-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers show
Series bnxt PMD fixes | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Kalesh A P Jan. 4, 2022, 8:38 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

During reset recovery, fixed to set the fast-path pointers
only if recovery succeeds.

Fixes: 720b55ad278e ("net/bnxt: fix crash caused by error recovery")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 82350a5..80de320 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4376,16 +4376,16 @@  static void bnxt_dev_recover(void *arg)
 		goto err_start;
 	}
 
+	rc = bnxt_restore_filters(bp);
+	if (rc)
+		goto err_start;
+
 	rte_eth_fp_ops[bp->eth_dev->data->port_id].rx_pkt_burst =
 		bp->eth_dev->rx_pkt_burst;
 	rte_eth_fp_ops[bp->eth_dev->data->port_id].tx_pkt_burst =
 		bp->eth_dev->tx_pkt_burst;
 	rte_mb();
 
-	rc = bnxt_restore_filters(bp);
-	if (rc)
-		goto err_start;
-
 	PMD_DRV_LOG(INFO, "Port: %u Recovered from FW reset\n",
 		    bp->eth_dev->data->port_id);
 	pthread_mutex_unlock(&bp->err_recovery_lock);