src/dpdk/drivers/net/mlx5/mlx5_rxq.c
int
mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
{
	int ret;

	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
		DRV_LOG(ERR, "Hairpin queue can't be started");
		rte_errno = EINVAL;
		return -EINVAL;
	}
	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_STARTED)
		return 0;
	if (rte_eal_process_type() ==  RTE_PROC_SECONDARY) {
		ret = mlx5_mp_os_req_queue_control(dev, idx,
						   MLX5_MP_REQ_QUEUE_RX_START);
	} else {
		ret = mlx5_rx_queue_start_primary(dev, idx);
	}
	return ret;
}
/**
 * Rx queue start. Device queue goes to the ready state,
 * all required mbufs are allocated and WQ is replenished.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 * @param idx
 *   RX queue index.
 *
 * @return
 *   0 on success, a negative errno value otherwise and rte_errno is set.
 */
Rx queue start. Device queue goes to the ready state,
all required mbufs are allocated and WQ is replenished.

@param dev
Pointer to Ethernet device structure.
@param idx
RX queue index.

@return
0 on success, a negative errno value otherwise and rte_errno is set.
Rx queue start . Device queue goes to the ready state all required mbufs are allocated and WQ is replenished . @param dev Pointer to Ethernet device structure . @param idx RX queue index . @return 0 on success a negative errno value otherwise and rte_errno is set .
int
mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
{
	int ret;
	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
		DRV_LOG(ERR, "Hairpin queue can't be started");
		rte_errno = EINVAL;
		return -EINVAL;
	}
	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_STARTED)
		return 0;
	if (rte_eal_process_type() ==  RTE_PROC_SECONDARY) {
		ret = mlx5_mp_os_req_queue_control(dev, idx,
						   MLX5_MP_REQ_QUEUE_RX_START);
	} else {
		ret = mlx5_rx_queue_start_primary(dev, idx);
	}
	return ret;
}
int mlx5_rx_queue_start ( struct rte_eth_dev * dev , uint16_t idx ) { int ret ; if ( rte_eth_dev_is_rx_hairpin_queue ( dev , idx ) ) { DRV_LOG ( ERR , " " ) ; rte_errno = EINVAL ; return - EINVAL ; } if ( dev -> data -> rx_queue_state [ idx ] == RTE_ETH_QUEUE_STATE_STARTED ) return 0 ; if ( rte_eal_process_type ( ) == RTE_PROC_SECONDARY ) { ret = mlx5_mp_os_req_queue_control ( dev , idx , MLX5_MP_REQ_QUEUE_RX_START ) ; } else { ret = mlx5_rx_queue_start_primary ( dev , idx ) ; } return ret ; }
Rx queue start.
Rx queue start .