| 5578 | } |
| 5579 | |
| 5580 | static int |
| 5581 | ixgbevf_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 | |
| 5629 | static int |
| 5630 | ixgbevf_dev_close(struct rte_eth_dev *dev) |
no test coverage detected