net/mlx5: Unify vport manager capability check
authorSaeed Mahameed <saeedm@mellanox.com>
Sun, 11 Jun 2017 16:05:10 +0000 (19:05 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 7 Aug 2017 07:47:06 +0000 (10:47 +0300)
commita9f7705ffd663ff057222e91a86d9bc1d697fd58
treedf798f2d8bd86b79afdbd4a620e6398d5ba1066c
parent07c9f1e57839c678c867b89aa9dcb2220e579b13
net/mlx5: Unify vport manager capability check

Expose MLX5_VPORT_MANAGER macro to check for strict vport manager
E-switch and MPFS (Multi Physical Function Switch) abilities.

VPORT manager must be a PF with an ethernet link and with FW advertised
vport group manager capability

Replace older checks with the new macro and use it where needed in
eswitch.c and mlx5e netdev eswitch related flows.

The same macro will be reused in MPFS separation downstream patch.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h