From c4d314a352d14af5e98e3391e38b92a1c16db7f7 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Tue, 19 Nov 2019 13:13:09 +0000 Subject: [PATCH] net/mlx5: fix assert in Tx inline settings Assert condition is fixed to not alert for the case when multi-packet write is not supported/engaged at all. Fixes: b53cd86965a1 ("net/mlx5: adjust inline setting for large Tx queue sizes") Signed-off-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_txq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 1bf5ebe513..81605163cb 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -1212,7 +1212,8 @@ txq_adjust_params(struct mlx5_txq_ctrl *txq_ctrl) assert(txq_ctrl->max_inline_data <= max_inline); assert(txq_ctrl->txq.inlen_mode <= max_inline); assert(txq_ctrl->txq.inlen_mode <= txq_ctrl->txq.inlen_send); - assert(txq_ctrl->txq.inlen_mode <= txq_ctrl->txq.inlen_empw); + assert(txq_ctrl->txq.inlen_mode <= txq_ctrl->txq.inlen_empw || + !txq_ctrl->txq.inlen_empw); return 0; error: rte_errno = ENOMEM; -- 2.20.1