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 <viacheslavo@mellanox.com>
This commit is contained in:
Viacheslav Ovsiienko 2019-11-19 13:13:09 +00:00 committed by Ferruh Yigit
parent 6cfe84fbe7
commit c4d314a352

View File

@ -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;