*/
#include <rte_string_fns.h>
-#include <rte_ethdev_pci.h>
+#include <ethdev_pci.h>
#include <rte_alarm.h>
#include "atl_ethdev.h"
static int eth_atl_dev_init(struct rte_eth_dev *eth_dev);
static int atl_dev_configure(struct rte_eth_dev *dev);
static int atl_dev_start(struct rte_eth_dev *dev);
-static void atl_dev_stop(struct rte_eth_dev *dev);
+static int atl_dev_stop(struct rte_eth_dev *dev);
static int atl_dev_set_link_up(struct rte_eth_dev *dev);
static int atl_dev_set_link_down(struct rte_eth_dev *dev);
static int atl_dev_close(struct rte_eth_dev *dev);
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
/* Vendor and Device ID need to be set before init of shared code */
hw->device_id = pci_dev->id.device_id;
/*
* Stop device: disable rx and tx functions to allow for reconfiguring.
*/
-static void
+static int
atl_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_link link;
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
PMD_INIT_FUNC_TRACE();
+ dev->data->dev_started = 0;
/* disable interrupts */
atl_disable_intr(hw);
rte_free(intr_handle->intr_vec);
intr_handle->intr_vec = NULL;
}
+
+ return 0;
}
/*
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct aq_hw_s *hw;
+ int ret;
PMD_INIT_FUNC_TRACE();
hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- atl_dev_stop(dev);
+ ret = atl_dev_stop(dev);
atl_free_queues(dev);
- dev->dev_ops = NULL;
- dev->rx_pkt_burst = NULL;
- dev->tx_pkt_burst = NULL;
-
/* disable uio intr before callback unregister */
rte_intr_disable(intr_handle);
rte_intr_callback_unregister(intr_handle,
pthread_mutex_destroy(&hw->mbox_mutex);
- return 0;
+ return ret;
}
static int