src/dpdk/drivers/net/mlx4/mlx4_txq.c
void
mlx4_tx_queue_release(void *dpdk_txq)
{
	struct txq *txq = (struct txq *)dpdk_txq;
	struct mlx4_priv *priv;
	unsigned int i;

	if (txq == NULL)
		return;
	priv = txq->priv;
	for (i = 0; i != ETH_DEV(priv)->data->nb_tx_queues; ++i)
		if (ETH_DEV(priv)->data->tx_queues[i] == txq) {
			DEBUG("%p: removing Tx queue %p from list",
			      (void *)ETH_DEV(priv), (void *)txq);
			ETH_DEV(priv)->data->tx_queues[i] = NULL;
			break;
		}
	mlx4_txq_free_elts(txq);
	if (txq->qp)
		claim_zero(mlx4_glue->destroy_qp(txq->qp));
	if (txq->cq)
		claim_zero(mlx4_glue->destroy_cq(txq->cq));
	mlx4_mr_btree_free(&txq->mr_ctrl.cache_bh);
	rte_free(txq);
}
/**
 * DPDK callback to release a Tx queue.
 *
 * @param dpdk_txq
 *   Generic Tx queue pointer.
 */
DPDK callback to release a Tx queue.
@param dpdk_txq
Generic Tx queue pointer.
DPDK callback to release a Tx queue . @param dpdk_txq Generic Tx queue pointer .
void
mlx4_tx_queue_release(void *dpdk_txq)
{
	struct txq *txq = (struct txq *)dpdk_txq;
	struct mlx4_priv *priv;
	unsigned int i;
	if (txq == NULL)
		return;
	priv = txq->priv;
	for (i = 0; i != ETH_DEV(priv)->data->nb_tx_queues; ++i)
		if (ETH_DEV(priv)->data->tx_queues[i] == txq) {
			DEBUG("%p: removing Tx queue %p from list",
			      (void *)ETH_DEV(priv), (void *)txq);
			ETH_DEV(priv)->data->tx_queues[i] = NULL;
			break;
		}
	mlx4_txq_free_elts(txq);
	if (txq->qp)
		claim_zero(mlx4_glue->destroy_qp(txq->qp));
	if (txq->cq)
		claim_zero(mlx4_glue->destroy_cq(txq->cq));
	mlx4_mr_btree_free(&txq->mr_ctrl.cache_bh);
	rte_free(txq);
}
void mlx4_tx_queue_release ( void * dpdk_txq ) { struct txq * txq = ( struct txq * ) dpdk_txq ; struct mlx4_priv * priv ; unsigned int i ; if ( txq == NULL ) return ; priv = txq -> priv ; for ( i = 0 ; i != ETH_DEV ( priv ) -> data -> nb_tx_queues ; ++ i ) if ( ETH_DEV ( priv ) -> data -> tx_queues [ i ] == txq ) { DEBUG ( " " , ( void * ) ETH_DEV ( priv ) , ( void * ) txq ) ; ETH_DEV ( priv ) -> data -> tx_queues [ i ] = NULL ; break ; } mlx4_txq_free_elts ( txq ) ; if ( txq -> qp ) claim_zero ( mlx4_glue -> destroy_qp ( txq -> qp ) ) ; if ( txq -> cq ) claim_zero ( mlx4_glue -> destroy_cq ( txq -> cq ) ) ; mlx4_mr_btree_free ( & txq -> mr_ctrl . cache_bh ) ; rte_free ( txq ) ; }
DPDK callback to release a Tx queue.
DPDK callback to release a Tx queue .