net/mlx5: fix Tx when inlining is impossible
authorDmitry Kozlyuk <dkozlyuk@nvidia.com>
Thu, 31 Mar 2022 14:38:41 +0000 (17:38 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 21 Apr 2022 10:47:38 +0000 (12:47 +0200)
commite2259f93ef455c75bfeda9a7349689b7e9be5981
treefa05d21d4660ee9971e76d5e6c43cd18b74b64e6
parent8113251862a0813e171d76a6a56b7f93987690ce
net/mlx5: fix Tx when inlining is impossible

When txq_inline_max is too large and an mbuf is multi-segment
it may be impossible to inline data and build a valid WQE,
because WQE length would be larger then HW can represent.
It is impossible to detect misconfiguration at startup,
because the condition depends on the mbuf composition.
The check on the data path to prevent the error
treated the length limit as expressed in 64B units,
while the calculated length and limit are in 16B units.
Fix the condition to avoid subsequent TxQ failure and recovery.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_tx.h