diff options
author | Parav Pandit <parav@mellanox.com> | 2019-05-15 07:04:27 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-07-03 21:50:42 +0200 |
commit | 2752b823169b216db142c4466b43269281962dcf (patch) | |
tree | 6c01796b4436773d85fec714f879cc301a66bb79 /drivers/infiniband/hw/mlx5/ib_rep.c | |
parent | net/mlx5: Expose device definitions for object events (diff) | |
download | linux-2752b823169b216db142c4466b43269281962dcf.tar.xz linux-2752b823169b216db142c4466b43269281962dcf.zip |
net/mlx5: Introduce and use mlx5_eswitch_get_total_vports()
Instead MLX5_TOTAL_VPORTS, use mlx5_eswitch_get_total_vports().
mlx5_eswitch_get_total_vports() in subsequent patch accounts for SF
vports as well.
Expanding MLX5_TOTAL_VPORTS macro would require exposing SF internals to
more generic vport.h header file. Such exposure is not desired.
Hence a mlx5_eswitch_get_total_vports() is introduced.
Given that mlx5_eswitch_get_total_vports() API wants to work on const
mlx5_core_dev*, change its helper functions also to accept const *dev.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/ib_rep.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/ib_rep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/ib_rep.c b/drivers/infiniband/hw/mlx5/ib_rep.c index 3065c5d0ee96..f2cb789d2331 100644 --- a/drivers/infiniband/hw/mlx5/ib_rep.c +++ b/drivers/infiniband/hw/mlx5/ib_rep.c @@ -29,7 +29,7 @@ mlx5_ib_set_vport_rep(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) static int mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) { - int num_ports = MLX5_TOTAL_VPORTS(dev); + int num_ports = mlx5_eswitch_get_total_vports(dev); const struct mlx5_ib_profile *profile; struct mlx5_ib_dev *ibdev; int vport_index; |