MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_dev_close_op

Function bnxt_dev_close_op

dpdk/drivers/net/bnxt/bnxt_ethdev.c:1701–1732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1699}
1700
1701static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
1702{
1703 struct bnxt *bp = eth_dev->data->dev_private;
1704 int ret = 0;
1705
1706 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
1707 return 0;
1708
1709 pthread_mutex_lock(&bp->err_recovery_lock);
1710 if (bp->flags & BNXT_FLAG_FW_RESET) {
1711 PMD_DRV_LOG(ERR,
1712 "Adapter recovering from error...Please retry\n");
1713 pthread_mutex_unlock(&bp->err_recovery_lock);
1714 return -EAGAIN;
1715 }
1716 pthread_mutex_unlock(&bp->err_recovery_lock);
1717
1718 /* cancel the recovery handler before remove dev */
1719 rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
1720 rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
1721 bnxt_cancel_fc_thread(bp);
1722 rte_eal_alarm_cancel(bnxt_handle_vf_cfg_change, (void *)bp);
1723
1724 if (eth_dev->data->dev_started)
1725 ret = bnxt_dev_stop(eth_dev);
1726
1727 bnxt_uninit_resources(bp, false);
1728
1729 bnxt_drv_uninit(bp);
1730
1731 return ret;
1732}
1733
1734static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
1735 uint32_t index)

Callers 1

bnxt_dev_uninitFunction · 0.85

Calls 8

rte_eal_process_typeFunction · 0.85
pthread_mutex_lockFunction · 0.85
pthread_mutex_unlockFunction · 0.85
bnxt_cancel_fc_threadFunction · 0.85
bnxt_dev_stopFunction · 0.85
bnxt_uninit_resourcesFunction · 0.85
bnxt_drv_uninitFunction · 0.85
rte_eal_alarm_cancelFunction · 0.50

Tested by

no test coverage detected