OSDN Git Service

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)
commit1d7979352f9f0d32743528fb72425f4ff29efcb9
tree168c2a97d58f1dbd0b7be4b7e99742e556ecf529
parent87bd418ea7515d904a3dc69de2479396f5cbd7a4
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