]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: SF, Rely on hw table for SF devlink port allocation
authorParav Pandit <parav@nvidia.com>
Mon, 8 Mar 2021 09:18:53 +0000 (11:18 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 24 Apr 2021 07:58:51 +0000 (00:58 -0700)
commit7d41701bf01a73cfd1f77ca63d85feb07c70ca88
tree168c2a97d58f1dbd0b7be4b7e99742e556ecf529
parent05a8246dbe2053554a26ce1846890779518675dd
net/mlx5: SF, Rely on hw table for SF devlink port allocation

Supporting SF allocation is currently checked at two places:
(a) SF devlink port allocator and
(b) SF HW table handler.

Both layers are using HCA CAP to identify it using helper routine
mlx5_sf_supported() and mlx5_sf_max_functions().

Instead, rely on the HW table handler to check if SF is supported
or not.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Vu Pham <vuhuong@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c
drivers/net/ethernet/mellanox/mlx5/core/sf/priv.h