[dpdk-dev] [PATCH v2 4/4] net/mlx5: engage free on completion queue

Ferruh Yigit ferruh.yigit at intel.com
Thu Jan 9 16:18:39 CET 2020


On 1/9/2020 10:56 AM, Viacheslav Ovsiienko wrote:
> The free on completion queue keeps the indices of elts array,
> all mbuf stored below this index should be freed on arrival
> of normal send completion. In debug version it also contains
> an index of completed transmitting descriptor (WQE) to check
> queues synchronization.
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> Acked-by: Matan Azrad <matan at mellanox.com>

<...>

> @@ -2108,17 +2108,18 @@ enum mlx5_txcmp_code {
>  			/*
>  			 * We are going to fetch all entries with
>  			 * MLX5_CQE_SYNDROME_WR_FLUSH_ERR status.
> +			 * The send queue is supposed to be empty.
>  			 */
>  			++ci;
> +			txq->cq_pi = ci;
> +			last_cqe = NULL;
>  			continue;
>  		}
>  		/* Normal transmit completion. */
> +		assert(ci != txq->cq_pi);
> +		assert((txq->fcqs[ci & txq->cqe_m] >> 16) == cqe->wqe_counter);

And same comments on these as previous patches, we spend some effort to remove
the 'rte_panic' from drivers, this is almost same thing.

I think a driver shouldn't decide to exit whole application, it's effect should
be limited to the driver.

Assert is useful for debug and during development, but not sure having them in
the production code.


More information about the dev mailing list