return ret;
}
-static void
+static int
eth_dev_stop(struct rte_eth_dev *dev)
{
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
+ int ret;
- for (i = 0; i < nb_tx; i++)
- eth_tx_queue_stop(dev, i);
+ dev->data->dev_started = 0;
- for (i = 0; i < nb_rx; i++)
- eth_rx_queue_stop(dev, i);
+ for (i = 0; i < nb_tx; i++) {
+ ret = eth_tx_queue_stop(dev, i);
+ if (ret != 0)
+ return ret;
+ }
+
+ for (i = 0; i < nb_rx; i++) {
+ ret = eth_rx_queue_stop(dev, i);
+ if (ret != 0)
+ return ret;
+ }
+
+ return 0;
}
static int
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
+ int ret;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- eth_dev_stop(dev);
+ ret = eth_dev_stop(dev);
free(internals->sze_dev_path);
}
dev->data->nb_tx_queues = 0;
- return 0;
+ return ret;
}
static int
rte_ether_addr_copy(ð_addr, data->mac_addrs);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
PMD_INIT_LOG(INFO, "%s device %s successfully initialized",
RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name);