src/dpdk/drivers/net/mlx5/mlx5_rxq.c
void
mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	struct rte_intr_handle *intr_handle = dev->intr_handle;
	unsigned int i;
	unsigned int rxqs_n = priv->rxqs_n;
	unsigned int n = RTE_MIN(rxqs_n, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID);

	/* Representor shares dev->intr_handle with PF. */
	if (priv->representor)
		return;
	if (!dev->data->dev_conf.intr_conf.rxq)
		return;
	if (!intr_handle->intr_vec)
		goto free;
	for (i = 0; i != n; ++i) {
		if (intr_handle->intr_vec[i] == RTE_INTR_VEC_RXTX_OFFSET +
		    RTE_MAX_RXTX_INTR_VEC_ID)
			continue;
		/**
		 * Need to access directly the queue to release the reference
		 * kept in mlx5_rx_intr_vec_enable().
		 */
		mlx5_rxq_release(dev, i);
	}
free:
	rte_intr_free_epoll_fd(intr_handle);
	if (intr_handle->intr_vec)
		mlx5_free(intr_handle->intr_vec);
	intr_handle->nb_efd = 0;
	intr_handle->intr_vec = NULL;
}
/**
 * Clean up Rx interrupts handler.
 *
 * @param dev
 *   Pointer to Ethernet device.
 */
Clean up Rx interrupts handler.
@param dev
Pointer to Ethernet device.
Clean up Rx interrupts handler . @param dev Pointer to Ethernet device .
void
mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	struct rte_intr_handle *intr_handle = dev->intr_handle;
	unsigned int i;
	unsigned int rxqs_n = priv->rxqs_n;
	unsigned int n = RTE_MIN(rxqs_n, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID);
	if (priv->representor)
		return;
	if (!dev->data->dev_conf.intr_conf.rxq)
		return;
	if (!intr_handle->intr_vec)
		goto free;
	for (i = 0; i != n; ++i) {
		if (intr_handle->intr_vec[i] == RTE_INTR_VEC_RXTX_OFFSET +
		    RTE_MAX_RXTX_INTR_VEC_ID)
			continue;
		mlx5_rxq_release(dev, i);
	}
free:
	rte_intr_free_epoll_fd(intr_handle);
	if (intr_handle->intr_vec)
		mlx5_free(intr_handle->intr_vec);
	intr_handle->nb_efd = 0;
	intr_handle->intr_vec = NULL;
}
void mlx5_rx_intr_vec_disable ( struct rte_eth_dev * dev ) { struct mlx5_priv * priv = dev -> data -> dev_private ; struct rte_intr_handle * intr_handle = dev -> intr_handle ; unsigned int i ; unsigned int rxqs_n = priv -> rxqs_n ; unsigned int n = RTE_MIN ( rxqs_n , ( uint32_t ) RTE_MAX_RXTX_INTR_VEC_ID ) ; if ( priv -> representor ) return ; if ( ! dev -> data -> dev_conf . intr_conf . rxq ) return ; if ( ! intr_handle -> intr_vec ) goto free ; for ( i = 0 ; i != n ; ++ i ) { if ( intr_handle -> intr_vec [ i ] == RTE_INTR_VEC_RXTX_OFFSET + RTE_MAX_RXTX_INTR_VEC_ID ) continue ; mlx5_rxq_release ( dev , i ) ; } free : rte_intr_free_epoll_fd ( intr_handle ) ; if ( intr_handle -> intr_vec ) mlx5_free ( intr_handle -> intr_vec ) ; intr_handle -> nb_efd = 0 ; intr_handle -> intr_vec = NULL ; }
Clean up Rx interrupts handler.
Clean up Rx interrupts handler .
/* Representor shares dev->intr_handle with PF. */ /**
		 * Need to access directly the queue to release the reference
		 * kept in mlx5_rx_intr_vec_enable().
		 */