net/mlx5: fix MPRQ stride devargs adjustment
authorMichael Baum <michaelba@nvidia.com>
Tue, 23 Nov 2021 18:38:05 +0000 (20:38 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Sun, 5 Dec 2021 11:22:09 +0000 (12:22 +0100)
commit34776af600df4475799ad8004e76d0eb77c163ff
tree192456ed00b3a9f8079de1b78b49c31700f33639
parent0947ed380febad9d6f794b6f4e9aa9137860a06e
net/mlx5: fix MPRQ stride devargs adjustment

In Multi-Packet RQ creation, the user can choose the number of strides
and their size in bytes. The user updates it using specific devargs for
both of these parameters.
The above two parameters determine the size of the WQE which is actually
their product of multiplication.

If the user selects values that are not in the supported range, the PMD
changes them to default values. However, apart from the range
limitations for each parameter individually there is also a minimum
value on their multiplication. When the user selects values that their
multiplication are lower than minimum value, no adjustment is made and
the creation of the WQE fails.

This patch adds an adjustment in these cases as well. When the user
selects values whose multiplication is lower than the minimum, they are
replaced with the default values.

Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_rxq.c