src/dpdk/drivers/net/mlx5/mlx5_rxq.c
int
mlx5_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	struct mlx5_rxq_ctrl *rxq_ctrl;
	int ret = 0;

	rxq_ctrl = mlx5_rxq_get(dev, rx_queue_id);
	if (!rxq_ctrl) {
		rte_errno = EINVAL;
		return -rte_errno;
	}
	if (!rxq_ctrl->obj)
		goto error;
	if (rxq_ctrl->irq) {
		ret = priv->obj_ops.rxq_event_get(rxq_ctrl->obj);
		if (ret < 0)
			goto error;
		rxq_ctrl->rxq.cq_arm_sn++;
	}
	mlx5_rxq_release(dev, rx_queue_id);
	return 0;
error:
	/**
	 * The ret variable may be EAGAIN which means the get_event function was
	 * called before receiving one.
	 */
	if (ret < 0)
		rte_errno = errno;
	else
		rte_errno = EINVAL;
	ret = rte_errno; /* Save rte_errno before cleanup. */
	mlx5_rxq_release(dev, rx_queue_id);
	if (ret != EAGAIN)
		DRV_LOG(WARNING, "port %u unable to disable interrupt on Rx queue %d",
			dev->data->port_id, rx_queue_id);
	rte_errno = ret; /* Restore rte_errno. */
	return -rte_errno;
}
/**
 * DPDK callback for Rx queue interrupt disable.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 * @param rx_queue_id
 *   Rx queue number.
 *
 * @return
 *   0 on success, a negative errno value otherwise and rte_errno is set.
 */
DPDK callback for Rx queue interrupt disable.
@param dev
Pointer to Ethernet device structure.
@param rx_queue_id
Rx queue number.

@return
0 on success, a negative errno value otherwise and rte_errno is set.
DPDK callback for Rx queue interrupt disable . @param dev Pointer to Ethernet device structure . @param rx_queue_id Rx queue number . @return 0 on success a negative errno value otherwise and rte_errno is set .
int
mlx5_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	struct mlx5_rxq_ctrl *rxq_ctrl;
	int ret = 0;
	rxq_ctrl = mlx5_rxq_get(dev, rx_queue_id);
	if (!rxq_ctrl) {
		rte_errno = EINVAL;
		return -rte_errno;
	}
	if (!rxq_ctrl->obj)
		goto error;
	if (rxq_ctrl->irq) {
		ret = priv->obj_ops.rxq_event_get(rxq_ctrl->obj);
		if (ret < 0)
			goto error;
		rxq_ctrl->rxq.cq_arm_sn++;
	}
	mlx5_rxq_release(dev, rx_queue_id);
	return 0;
error:
	if (ret < 0)
		rte_errno = errno;
	else
		rte_errno = EINVAL;
	ret = rte_errno; 
	mlx5_rxq_release(dev, rx_queue_id);
	if (ret != EAGAIN)
		DRV_LOG(WARNING, "port %u unable to disable interrupt on Rx queue %d",
			dev->data->port_id, rx_queue_id);
	rte_errno = ret; 
	return -rte_errno;
}
int mlx5_rx_intr_disable ( struct rte_eth_dev * dev , uint16_t rx_queue_id ) { struct mlx5_priv * priv = dev -> data -> dev_private ; struct mlx5_rxq_ctrl * rxq_ctrl ; int ret = 0 ; rxq_ctrl = mlx5_rxq_get ( dev , rx_queue_id ) ; if ( ! rxq_ctrl ) { rte_errno = EINVAL ; return - rte_errno ; } if ( ! rxq_ctrl -> obj ) goto error ; if ( rxq_ctrl -> irq ) { ret = priv -> obj_ops . rxq_event_get ( rxq_ctrl -> obj ) ; if ( ret < 0 ) goto error ; rxq_ctrl -> rxq . cq_arm_sn ++ ; } mlx5_rxq_release ( dev , rx_queue_id ) ; return 0 ; error : if ( ret < 0 ) rte_errno = errno ; else rte_errno = EINVAL ; ret = rte_errno ; mlx5_rxq_release ( dev , rx_queue_id ) ; if ( ret != EAGAIN ) DRV_LOG ( WARNING , " " , dev -> data -> port_id , rx_queue_id ) ; rte_errno = ret ; return - rte_errno ; }
DPDK callback for Rx queue interrupt disable.
DPDK callback for Rx queue interrupt disable .
/**
	 * The ret variable may be EAGAIN which means the get_event function was
	 * called before receiving one.
	 */ /* Save rte_errno before cleanup. */ /* Restore rte_errno. */