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

Function ixgbevf_dev_close

dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:5629–5659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5627}
5628
5629static int
5630ixgbevf_dev_close(struct rte_eth_dev *dev)
5631{
5632 struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
5633 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
5634 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
5635 int ret;
5636
5637 PMD_INIT_FUNC_TRACE();
5638 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
5639 return 0;
5640
5641 ixgbe_reset_hw(hw);
5642
5643 ret = ixgbevf_dev_stop(dev);
5644
5645 ixgbe_dev_free_queues(dev);
5646
5647 /**
5648 * Remove the VF MAC address ro ensure
5649 * that the VF traffic goes to the PF
5650 * after stop, close and detach of the VF
5651 **/
5652 ixgbevf_remove_mac_addr(dev, 0);
5653
5654 rte_intr_disable(intr_handle);
5655 rte_intr_callback_unregister(intr_handle,
5656 ixgbevf_dev_interrupt_handler, dev);
5657
5658 return ret;
5659}
5660
5661/*
5662 * Reset VF device

Callers 1

eth_ixgbevf_dev_uninitFunction · 0.85

Calls 7

rte_eal_process_typeFunction · 0.85
ixgbe_reset_hwFunction · 0.85
ixgbevf_dev_stopFunction · 0.85
ixgbe_dev_free_queuesFunction · 0.85
ixgbevf_remove_mac_addrFunction · 0.85
rte_intr_disableFunction · 0.50

Tested by

no test coverage detected