]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3818184d166fd71b9dae7f65da52c7ec1908aec5
treebff61944eaf9e52978aab73770df52f6c7f2defe
parentb4dc5d0c1a0ce11d840add2dbf4a5f09e8a36122
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