net/mlx5: Change POOL_NEXT_SIZE define value and make it global
authorPatrisious Haddad <phaddad@nvidia.com>
Wed, 19 Feb 2025 08:58:08 +0000 (10:58 +0200)
committerLeon Romanovsky <leon@kernel.org>
Sun, 23 Feb 2025 09:43:14 +0000 (04:43 -0500)
commit80df31f384b4146a62a01b3d4beb376cc7b9a89e
treed3bcefaa01ae2102e4fecec2d6e08ff3a684ec3b
parent531ca2b9a215d072ffb4b1ff760a73f5e80c9c46
net/mlx5: Change POOL_NEXT_SIZE define value and make it global

Change POOL_NEXT_SIZE define value from 0 to BIT(30), since this define
is used to request the available maximum sized flow table, and zero doesn't
make sense for it, whereas some places in the driver use zero explicitly
expecting the smallest table size possible but instead due to this
define they end up allocating the biggest table size unawarely.

In addition move the definition to "include/linux/mlx5/fs.h" to expose the
define to IB driver as well, while appropriately renaming it.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250219085808.349923-3-tariqt@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c
drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
include/linux/mlx5/fs.h