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

Function atl_dev_close

dpdk/drivers/net/atlantic/atl_ethdev.c:686–713  ·  view source on GitHub ↗

* Reset and stop device. */

Source from the content-addressed store, hash-verified

684 * Reset and stop device.
685 */
686static int
687atl_dev_close(struct rte_eth_dev *dev)
688{
689 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
690 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
691 struct aq_hw_s *hw;
692 int ret;
693
694 PMD_INIT_FUNC_TRACE();
695
696 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
697 return 0;
698
699 hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
700
701 ret = atl_dev_stop(dev);
702
703 atl_free_queues(dev);
704
705 /* disable uio intr before callback unregister */
706 rte_intr_disable(intr_handle);
707 rte_intr_callback_unregister(intr_handle,
708 atl_dev_interrupt_handler, dev);
709
710 pthread_mutex_destroy(&hw->mbox_mutex);
711
712 return ret;
713}
714
715static int
716atl_dev_reset(struct rte_eth_dev *dev)

Callers 1

atl_dev_resetFunction · 0.85

Calls 6

rte_eal_process_typeFunction · 0.85
atl_dev_stopFunction · 0.85
atl_free_queuesFunction · 0.85
pthread_mutex_destroyFunction · 0.85
rte_intr_disableFunction · 0.50

Tested by

no test coverage detected