net/mlx5e: Correct the calculation of max channels for rep
authorMoshe Tal <moshet@nvidia.com>
Wed, 27 Apr 2022 15:26:52 +0000 (18:26 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 18 May 2022 06:41:48 +0000 (23:41 -0700)
commit6d0ba49321a40a8dada22c223bbe91c063b08db4
tree3a2ac3a8d0846824e54c052ad05b5dba0793e0c9
parent77422a8f6f61be1ef64978e9a94f40fed0d1634e
net/mlx5e: Correct the calculation of max channels for rep

Correct the calculation of maximum channels of rep to better utilize
the hardware resources and allow a larger scale of reps.

This will allow creation of all virtual ports configured.

Fixes: 473baf2e9e8c ("net/mlx5e: Allow profile-specific limitation on max num of channels")
Signed-off-by: Moshe Tal <moshet@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
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c