Blob Blame History Raw
From 4ffd117a8b63b9aed3e53f28e46d425da21c5270 Mon Sep 17 00:00:00 2001
From: Alaa Hleihel <ahleihel@redhat.com>
Date: Tue, 12 May 2020 10:54:45 -0400
Subject: [PATCH 173/312] [netdrv] net/mlx5e: Remove unneeded
 netif_set_real_num_tx_queues

Message-id: <20200512105530.4207-80-ahleihel@redhat.com>
Patchwork-id: 306951
Patchwork-instance: patchwork
O-Subject: [RHEL8.3 BZ 1789382 079/124] net/mlx5e: Remove unneeded netif_set_real_num_tx_queues
Bugzilla: 1789382
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
RH-Acked-by: Kamal Heib <kheib@redhat.com>
RH-Acked-by: Jarod Wilson <jarod@redhat.com>

Bugzilla: http://bugzilla.redhat.com/1789382
Upstream: v5.7-rc1

commit 600a3952a2a6228246fa2acb084f2e4522ca9cb1
Author: Maxim Mikityanskiy <maximmi@mellanox.com>
Date:   Mon Nov 25 14:29:46 2019 +0200

    net/mlx5e: Remove unneeded netif_set_real_num_tx_queues

    The number of queues is now updated by mlx5e_update_netdev_queues in a
    centralized way, when no channels are active. Remove an extra occurrence
    of netif_set_real_num_tx_queues to prepare it for the next commit.

    Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
    Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>

Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index d97c865989e1..ae91592165ea 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2960,17 +2960,11 @@ static void mlx5e_switch_priv_channels(struct mlx5e_priv *priv,
 				       mlx5e_fp_preactivate preactivate)
 {
 	struct net_device *netdev = priv->netdev;
-	int new_num_txqs;
 	int carrier_ok;
 
-	new_num_txqs = new_chs->num * new_chs->params.num_tc;
-
 	carrier_ok = netif_carrier_ok(netdev);
 	netif_carrier_off(netdev);
 
-	if (new_num_txqs < netdev->real_num_tx_queues)
-		netif_set_real_num_tx_queues(netdev, new_num_txqs);
-
 	mlx5e_deactivate_priv_channels(priv);
 	mlx5e_close_channels(&priv->channels);
 
-- 
2.13.6