]> git.dujemihanovic.xyz Git - linux.git/commit
net/mlx5e: SHAMPO, Fix overflow of hd_per_wq
authorDragos Tatulea <dtatulea@nvidia.com>
Tue, 13 Aug 2024 10:34:54 +0000 (13:34 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 25 Sep 2024 20:15:46 +0000 (13:15 -0700)
commit023d2a43ed0d9ab73d4a35757121e4c8e01298e5
treeb52ff23c7e37fb733fbca892cc11371ba9bb048f
parentd15525f300109fac5477dce1b8fef244c5dc9ec3
net/mlx5e: SHAMPO, Fix overflow of hd_per_wq

When having larger RQ sizes and small MTUs sizes, the hd_per_wq variable
can overflow. Like in the following case:

$> ethtool --set-ring eth1 rx 8192
$> ip link set dev eth1 mtu 144
$> ethtool --features eth1 rx-gro-hw on

... yields in dmesg:

mlx5_core 0000:08:00.1: mlx5_cmd_out_err:808:(pid 194797): CREATE_MKEY(0x200) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x3bf6f), err(-22)

because hd_per_wq is 64K which overflows to 0 and makes the command
fail.

This patch increases the variable size to 32 bit.

Fixes: 99be56171fa9 ("net/mlx5e: SHAMPO, Re-enable HW-GRO")
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h