]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net/mlx5: E-Switch, Return eswitch max ports when eswitch is supported
authorParav Pandit <parav@nvidia.com>
Tue, 2 Mar 2021 11:54:42 +0000 (13:54 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 24 Apr 2021 07:58:40 +0000 (00:58 -0700)
commit06ec5acc7747f225154fcafaf2afe52324694baa
treeefe5313ff885c2aefb2ff638c05c62f0f4393945
parentb2f0ca00e6b34bd57c9298a869ea133699e8ec39
net/mlx5: E-Switch, Return eswitch max ports when eswitch is supported

mlx5_eswitch_get_total_vports() doesn't honor MLX5_ESWICH Kconfig flag.

When MLX5_ESWITCH is disabled, FS layer continues to initialize eswitch
specific ACL namespaces.
Instead, start honoring MLX5_ESWITCH flag and perform vport specific
initialization only when vport count is non zero.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Vu Pham <vuhuong@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
include/linux/mlx5/eswitch.h