From: Kalesh AP <kalesh-anakkur.pura...@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: sta...@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khapa...@broadcom.com> Reviewed-by: Somnath Kotur <somnath.ko...@broadcom.com> --- drivers/net/bnxt/bnxt_ethdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.10.1