net/mlx5e: RX, Add checks for calculated Striding RQ attributes
authorTariq Toukan <tariqt@nvidia.com>
Sun, 21 Jun 2020 18:35:34 +0000 (21:35 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 20 Apr 2021 03:17:09 +0000 (20:17 -0700)
commit6980ffa0c5a8e65d53ff803d2cafdba3e2022714
treebff61944eaf9e52978aab73770df52f6c7f2defe
parent6a5689ba0259acded00f69856fc364b158c54c2e
net/mlx5e: RX, Add checks for calculated Striding RQ attributes

Striding RQ attributes below are mutually dependent. An unaware
change to one might take the others out of the valid range derived
by the HW caps:
- The MPWQE size in bytes
- The number of strides in a MPWQE
- The stride size

Add checks to verify they are valid and comply to the HW spec
and SW assumptions/requirements.
This is not a fix, no particular issue exists today.

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c
drivers/net/ethernet/mellanox/mlx5/core/en/params.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
include/linux/mlx5/device.h