static int eth_igb_configure(struct rte_eth_dev *dev);
static int eth_igb_start(struct rte_eth_dev *dev);
-static void eth_igb_stop(struct rte_eth_dev *dev);
+static int eth_igb_stop(struct rte_eth_dev *dev);
static int eth_igb_dev_set_link_up(struct rte_eth_dev *dev);
static int eth_igb_dev_set_link_down(struct rte_eth_dev *dev);
static int eth_igb_close(struct rte_eth_dev *dev);
static void igbvf_intr_disable(struct e1000_hw *hw);
static int igbvf_dev_configure(struct rte_eth_dev *dev);
static int igbvf_dev_start(struct rte_eth_dev *dev);
-static void igbvf_dev_stop(struct rte_eth_dev *dev);
+static int igbvf_dev_stop(struct rte_eth_dev *dev);
static int igbvf_dev_close(struct rte_eth_dev *dev);
static int igbvf_promiscuous_enable(struct rte_eth_dev *dev);
static int igbvf_promiscuous_disable(struct rte_eth_dev *dev);
}
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
rte_eth_copy_pci_info(eth_dev, pci_dev);
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
* global reset on the MAC.
*
**********************************************************************/
-static void
+static int
eth_igb_stop(struct rte_eth_dev *dev)
{
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
E1000_DEV_PRIVATE(dev->data->dev_private);
if (adapter->stopped)
- return;
+ return 0;
eth_igb_rxtx_control(dev, false);
adapter->stopped = true;
dev->data->dev_started = 0;
+
+ return 0;
}
static int
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct e1000_filter_info *filter_info =
E1000_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private);
+ int ret;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- eth_igb_stop(dev);
+ ret = eth_igb_stop(dev);
e1000_phy_hw_reset(hw);
igb_release_manageability(hw);
/* clear all the filters list */
igb_filterlist_flush(dev);
- return 0;
+ return ret;
}
/*
return 0;
}
-static void
+static int
igbvf_dev_stop(struct rte_eth_dev *dev)
{
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
E1000_DEV_PRIVATE(dev->data->dev_private);
if (adapter->stopped)
- return;
+ return 0;
PMD_INIT_FUNC_TRACE();
adapter->stopped = true;
dev->data->dev_started = 0;
+
+ return 0;
}
static int
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct rte_ether_addr addr;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
+ int ret;
PMD_INIT_FUNC_TRACE();
e1000_reset_hw(hw);
- igbvf_dev_stop(dev);
+ ret = igbvf_dev_stop(dev);
+ if (ret != 0)
+ return ret;
igb_dev_free_queues(dev);