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

Function ixgbevf_dev_stop

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

Source from the content-addressed store, hash-verified

5578}
5579
5580static int
5581ixgbevf_dev_stop(struct rte_eth_dev *dev)
5582{
5583 struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
5584 struct ixgbe_adapter *adapter = dev->data->dev_private;
5585 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
5586 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
5587
5588 /*
5589 * This function calls into the base driver, which in turn will use
5590 * function pointers, which are not guaranteed to be valid in secondary
5591 * processes, so avoid using this function in secondary processes.
5592 */
5593 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
5594 return -E_RTE_SECONDARY;
5595
5596 if (hw->adapter_stopped)
5597 return 0;
5598
5599 PMD_INIT_FUNC_TRACE();
5600
5601 ixgbe_dev_wait_setup_link_complete(dev, 0);
5602
5603 ixgbevf_intr_disable(dev);
5604
5605 dev->data->dev_started = 0;
5606 hw->adapter_stopped = 1;
5607 ixgbe_stop_adapter(hw);
5608
5609 /*
5610 * Clear what we set, but we still keep shadow_vfta to
5611 * restore after device starts
5612 */
5613 ixgbevf_set_vfta_all(dev, 0);
5614
5615 /* Clear stored conf */
5616 dev->data->scattered_rx = 0;
5617
5618 ixgbe_dev_clear_queues(dev);
5619
5620 /* Clean datapath event and queue/vec mapping */
5621 rte_intr_efd_disable(intr_handle);
5622 rte_intr_vec_list_free(intr_handle);
5623
5624 adapter->rss_reta_updated = 0;
5625
5626 return 0;
5627}
5628
5629static int
5630ixgbevf_dev_close(struct rte_eth_dev *dev)

Callers 1

ixgbevf_dev_closeFunction · 0.85

Calls 8

rte_eal_process_typeFunction · 0.85
ixgbevf_intr_disableFunction · 0.85
ixgbe_stop_adapterFunction · 0.85
ixgbevf_set_vfta_allFunction · 0.85
ixgbe_dev_clear_queuesFunction · 0.85
rte_intr_vec_list_freeFunction · 0.85
rte_intr_efd_disableFunction · 0.50

Tested by

no test coverage detected