]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Support querying max VFs from device
authorBodong Wang <bodong@mellanox.com>
Mon, 10 Jun 2019 23:38:19 +0000 (23:38 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Jun 2019 17:59:48 +0000 (10:59 -0700)
commitbba2160c24a50c3d06b279a89716199935cef07f
treea4d9df04a29b68c20056306b1b404eb670382ce4
parent9026efbb850031c56883422d6d4121db9ff3a739
net/mlx5: Support querying max VFs from device

For ECPF with eswitch manager privilege, query the host max VF count
by querying the device using query_functions command.

With this enhancement:
1. flow steering entries are created only for valid vports based on
   the max VF count of the PF.
2. Driver only queries cap of valid vport.

Eswitch requires the max VFs when doing initialization, so do sr-iov
init before eswitch init.

Signed-off-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
include/linux/mlx5/driver.h
include/linux/mlx5/mlx5_ifc.h