src/dpdk/drivers/net/nfb/nfb_ethdev.c
static int
nfb_eth_dev_start(struct rte_eth_dev *dev)
{
	int ret;
	uint16_t i;
	uint16_t nb_rx = dev->data->nb_rx_queues;
	uint16_t nb_tx = dev->data->nb_tx_queues;

	for (i = 0; i < nb_rx; i++) {
		ret = nfb_eth_rx_queue_start(dev, i);
		if (ret != 0)
			goto err_rx;
	}

	for (i = 0; i < nb_tx; i++) {
		ret = nfb_eth_tx_queue_start(dev, i);
		if (ret != 0)
			goto err_tx;
	}

	return 0;

err_tx:
	for (i = 0; i < nb_tx; i++)
		nfb_eth_tx_queue_stop(dev, i);
err_rx:
	for (i = 0; i < nb_rx; i++)
		nfb_eth_rx_queue_stop(dev, i);
	return ret;
}
/**
 * DPDK callback to start the device.
 *
 * Start device by starting all configured queues.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 *
 * @return
 *   0 on success, a negative errno value otherwise.
 */
DPDK callback to start the device.
Start device by starting all configured queues.

@param dev
Pointer to Ethernet device structure.

@return
0 on success, a negative errno value otherwise.
DPDK callback to start the device . Start device by starting all configured queues . @param dev Pointer to Ethernet device structure . @return 0 on success a negative errno value otherwise .
static int
nfb_eth_dev_start(struct rte_eth_dev *dev)
{
	int ret;
	uint16_t i;
	uint16_t nb_rx = dev->data->nb_rx_queues;
	uint16_t nb_tx = dev->data->nb_tx_queues;
	for (i = 0; i < nb_rx; i++) {
		ret = nfb_eth_rx_queue_start(dev, i);
		if (ret != 0)
			goto err_rx;
	}
	for (i = 0; i < nb_tx; i++) {
		ret = nfb_eth_tx_queue_start(dev, i);
		if (ret != 0)
			goto err_tx;
	}
	return 0;
err_tx:
	for (i = 0; i < nb_tx; i++)
		nfb_eth_tx_queue_stop(dev, i);
err_rx:
	for (i = 0; i < nb_rx; i++)
		nfb_eth_rx_queue_stop(dev, i);
	return ret;
}
static int nfb_eth_dev_start ( struct rte_eth_dev * dev ) { int ret ; uint16_t i ; uint16_t nb_rx = dev -> data -> nb_rx_queues ; uint16_t nb_tx = dev -> data -> nb_tx_queues ; for ( i = 0 ; i < nb_rx ; i ++ ) { ret = nfb_eth_rx_queue_start ( dev , i ) ; if ( ret != 0 ) goto err_rx ; } for ( i = 0 ; i < nb_tx ; i ++ ) { ret = nfb_eth_tx_queue_start ( dev , i ) ; if ( ret != 0 ) goto err_tx ; } return 0 ; err_tx : for ( i = 0 ; i < nb_tx ; i ++ ) nfb_eth_tx_queue_stop ( dev , i ) ; err_rx : for ( i = 0 ; i < nb_rx ; i ++ ) nfb_eth_rx_queue_stop ( dev , i ) ; return ret ; }
DPDK callback to start the device.
DPDK callback to start the device .