]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5e: Fix default amount of channels for VF representors
authorGavi Teitz <gavi@mellanox.com>
Mon, 19 Nov 2018 15:22:30 +0000 (17:22 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Dec 2018 09:24:44 +0000 (01:24 -0800)
The default amount of channels a representor opens was erroneously
changed from one to the maximum amount of channels, restore to its
intended value.

Fixes: 779d986d60de ("net/mlx5e: Do not ignore netdevice TX/RX queues number")
Signed-off-by: Gavi Teitz <gavi@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

index c3c657548824117f1732f3c7d14158c9a2a8e2a0..6a4d782c1de1712f2a63f4ee32c6bf51a4f571b1 100644 (file)
@@ -46,6 +46,7 @@
 
 #define MLX5E_REP_PARAMS_LOG_SQ_SIZE \
        max(0x6, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
+#define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
 
 static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
 
@@ -1083,9 +1084,7 @@ static int mlx5e_init_rep(struct mlx5_core_dev *mdev,
        if (err)
                return err;
 
-
-       priv->channels.params.num_channels =
-                               mlx5e_get_netdev_max_channels(netdev);
+       priv->channels.params.num_channels = MLX5E_REP_PARAMS_DEF_NUM_CHANNELS;
 
        mlx5e_build_rep_params(mdev, &priv->channels.params, netdev->mtu);
        mlx5e_build_rep_netdev(netdev);