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

Function txgbevf_dev_stop

dpdk/drivers/net/txgbe/txgbe_ethdev_vf.c:717–756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715}
716
717static int
718txgbevf_dev_stop(struct rte_eth_dev *dev)
719{
720 struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
721 struct txgbe_adapter *adapter = TXGBE_DEV_ADAPTER(dev);
722 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
723 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
724
725 if (hw->adapter_stopped)
726 return 0;
727
728 PMD_INIT_FUNC_TRACE();
729
730 txgbe_dev_wait_setup_link_complete(dev, 0);
731
732 txgbevf_intr_disable(dev);
733
734 hw->adapter_stopped = 1;
735 hw->mac.stop_hw(hw);
736
737 /*
738 * Clear what we set, but we still keep shadow_vfta to
739 * restore after device starts
740 */
741 txgbevf_set_vfta_all(dev, 0);
742
743 /* Clear stored conf */
744 dev->data->scattered_rx = 0;
745
746 txgbe_dev_clear_queues(dev);
747
748 /* Clean datapath event and queue/vec mapping */
749 rte_intr_efd_disable(intr_handle);
750 rte_intr_vec_list_free(intr_handle);
751
752 adapter->rss_reta_updated = 0;
753 hw->dev_start = false;
754
755 return 0;
756}
757
758static int
759txgbevf_dev_close(struct rte_eth_dev *dev)

Callers 1

txgbevf_dev_closeFunction · 0.85

Calls 6

txgbevf_intr_disableFunction · 0.85
txgbevf_set_vfta_allFunction · 0.85
txgbe_dev_clear_queuesFunction · 0.85
rte_intr_vec_list_freeFunction · 0.85
rte_intr_efd_disableFunction · 0.50

Tested by

no test coverage detected