]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
net/mlx5: Introduce and use mlx5_eswitch_get_total_vports()
[linux.git] / drivers / net / ethernet / mellanox / mlx5 / core / eswitch.c
index 89f52370e770b72103dabad88f6adfc181ebde1d..9137a8390216d744f1756f34b4c6a5788153ab10 100644 (file)
@@ -1868,14 +1868,16 @@ void mlx5_eswitch_disable(struct mlx5_eswitch *esw)
 
 int mlx5_eswitch_init(struct mlx5_core_dev *dev)
 {
-       int total_vports = MLX5_TOTAL_VPORTS(dev);
        struct mlx5_eswitch *esw;
        struct mlx5_vport *vport;
+       int total_vports;
        int err, i;
 
        if (!MLX5_VPORT_MANAGER(dev))
                return 0;
 
+       total_vports = mlx5_eswitch_get_total_vports(dev);
+
        esw_info(dev,
                 "Total vports %d, per vport: max uc(%d) max mc(%d)\n",
                 total_vports,