]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: SHAMPO, Fix constant expression result
authorBen Ben-Ishay <benishay@nvidia.com>
Sun, 31 Oct 2021 16:31:02 +0000 (18:31 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 1 Dec 2021 06:35:06 +0000 (22:35 -0800)
commitb50dd174a98513865f351876666e25a482207938
tree8b2e5979a29baf2bc042e794e6cf844579871d7f
parent40996bba0adb708db80b44961f3041800d373b02
net/mlx5e: SHAMPO, Fix constant expression result

mlx5e_build_shampo_hd_umr uses counters i and index incorrectly
as unsigned, thus the err state err_unmap could stuck in endless loop.
Change i to int to solve the first issue.
Reduce index check to solve the second issue, the caller function
validates that index could not rotate.

Fixes: 2c6e5a9d4b65 ("net/mlx5e: Add data path for SHAMPO feature")
Signed-off-by: Ben Ben-Ishay <benishay@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c