[dpdk-stable] [PATCH 19.11 3/6] net/bnxt: invoke device removal event on recovery failure
Kalesh A P
kalesh-anakkur.purayil at broadcom.com
Mon Aug 16 16:50:56 CEST 2021
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
[ upstream commit 8ac3cbba621ad1887b069b271115faf76bf04b75 ]
When the driver receives RESET_NOTIFY async event from FW or detects
a FW fatal error condition, it tries to recover from the error.
When the driver fails to recover from the error condition, fixed to
send device removal event to the application.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 35f33b8..4d428b6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4288,6 +4288,10 @@ static void bnxt_dev_recover(void *arg)
err:
bp->flags |= BNXT_FLAG_FATAL_ERROR;
bnxt_uninit_resources(bp, false);
+ if (bp->eth_dev->data->dev_conf.intr_conf.rmv)
+ _rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_INTR_RMV,
+ NULL);
PMD_DRV_LOG(ERR, "Failed to recover from FW reset\n");
}
@@ -5236,7 +5240,8 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
static struct rte_pci_driver bnxt_rte_pmd = {
.id_table = bnxt_pci_id_map,
- .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+ .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+ RTE_PCI_DRV_INTR_RMV,
.probe = bnxt_pci_probe,
.remove = bnxt_pci_remove,
};
--
2.10.1
More information about the stable
mailing list