]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Introduce and use mlx5_eswitch_get_total_vports()
authorParav Pandit <parav@mellanox.com>
Wed, 15 May 2019 05:04:27 +0000 (00:04 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 3 Jul 2019 19:50:42 +0000 (12:50 -0700)
commitb9c88b5ac9b43ab477e2749f43d21885c2e68db4
tree6c01796b4436773d85fec714f879cc301a66bb79
parent3d7bf42fc6390160460a65fec3dbd89d1cd47f92
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>
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
include/linux/mlx5/driver.h
include/linux/mlx5/eswitch.h
include/linux/mlx5/vport.h