src/dpdk/drivers/net/mlx4/mlx4_txq.c
static void
mlx4_txq_free_elts(struct txq *txq)
{
	unsigned int elts_head = txq->elts_head;
	unsigned int elts_tail = txq->elts_tail;
	struct txq_elt (*elts)[txq->elts_n] = txq->elts;
	unsigned int elts_m = txq->elts_n - 1;

	DEBUG("%p: freeing WRs", (void *)txq);
	while (elts_tail != elts_head) {
		struct txq_elt *elt = &(*elts)[elts_tail++ & elts_m];

		MLX4_ASSERT(elt->buf != NULL);
		rte_pktmbuf_free(elt->buf);
		elt->buf = NULL;
		elt->wqe = NULL;
	}
	txq->elts_tail = txq->elts_head;
}
/**
 * Free Tx queue elements.
 *
 * @param txq
 *   Pointer to Tx queue structure.
 */
Free Tx queue elements.
@param txq
Pointer to Tx queue structure.
Free Tx queue elements . @param txq Pointer to Tx queue structure .
static void
mlx4_txq_free_elts(struct txq *txq)
{
	unsigned int elts_head = txq->elts_head;
	unsigned int elts_tail = txq->elts_tail;
	struct txq_elt (*elts)[txq->elts_n] = txq->elts;
	unsigned int elts_m = txq->elts_n - 1;
	DEBUG("%p: freeing WRs", (void *)txq);
	while (elts_tail != elts_head) {
		struct txq_elt *elt = &(*elts)[elts_tail++ & elts_m];
		MLX4_ASSERT(elt->buf != NULL);
		rte_pktmbuf_free(elt->buf);
		elt->buf = NULL;
		elt->wqe = NULL;
	}
	txq->elts_tail = txq->elts_head;
}
static void mlx4_txq_free_elts ( struct txq * txq ) { unsigned int elts_head = txq -> elts_head ; unsigned int elts_tail = txq -> elts_tail ; struct txq_elt ( * elts ) [ txq -> elts_n ] = txq -> elts ; unsigned int elts_m = txq -> elts_n - 1 ; DEBUG ( " " , ( void * ) txq ) ; while ( elts_tail != elts_head ) { struct txq_elt * elt = & ( * elts ) [ elts_tail ++ & elts_m ] ; MLX4_ASSERT ( elt -> buf != NULL ) ; rte_pktmbuf_free ( elt -> buf ) ; elt -> buf = NULL ; elt -> wqe = NULL ; } txq -> elts_tail = txq -> elts_head ; }
Free Tx queue elements.
Free Tx queue elements .