]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Add missing sanity checks for max TX WQE size
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Thu, 3 Nov 2022 06:55:42 +0000 (23:55 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 9 Nov 2022 18:30:43 +0000 (10:30 -0800)
commitf9c955b4fe5c8626d11b8a9b93ccc0ba77358fec
tree4bb5c6101c1681e63dedcda70e15ffae286236e0
parent7d167b4a4c810919ba1affd02fc6b7f40e7e6eeb
net/mlx5e: Add missing sanity checks for max TX WQE size

The commit cited below started using the firmware capability for the
maximum TX WQE size. This commit adds an important check to verify that
the driver doesn't attempt to exceed this capability, and also restores
another check mistakenly removed in the cited commit (a WQE must not
exceed the page size).

Fixes: c27bd1718c06 ("net/mlx5e: Read max WQEBBs on the SQ from firmware")
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c