summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-11-19 13:13:09 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-19 18:07:19 +0000
commit977c8976a35ddd85104c19de75b349ce3d91ee30 (patch)
tree33161c34c170fe0ac8e3af2528a850803ee10423
parenta5dece706bbf86d4b05132b2640db329066bebaa (diff)
downloaddpdk-next-net-brcm-977c8976a35ddd85104c19de75b349ce3d91ee30.zip
dpdk-next-net-brcm-977c8976a35ddd85104c19de75b349ce3d91ee30.tar.gz
dpdk-next-net-brcm-977c8976a35ddd85104c19de75b349ce3d91ee30.tar.xz
net/mlx5: fix assert in Tx inline settings ajustment
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>
-rw-r--r--drivers/net/mlx5/mlx5_txq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1bf5ebe..8160516 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;