]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ixgbe: There is no need to update num_rx_pools in L2 fwd offload
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 22 Nov 2017 18:56:34 +0000 (10:56 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 9 Jan 2018 16:47:12 +0000 (08:47 -0800)
The num_rx_pools value is overwritten when we reinitialize the queue
configuration. In reality we shouldn't need to be updating the value since
it is redone every time we call into ixgbe_setup_tc so for now just drop
the spots where we were incrementing or decrementing the value.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 8e2a957aca1870392232e048693701a0f90e6c36..56622adc76dc3b74ed1f9642b3d62a774b8d28e5 100644 (file)
@@ -701,7 +701,7 @@ static void ixgbe_set_num_queues(struct ixgbe_adapter *adapter)
        adapter->num_rx_queues = 1;
        adapter->num_tx_queues = 1;
        adapter->num_xdp_queues = 0;
-       adapter->num_rx_pools = adapter->num_rx_queues;
+       adapter->num_rx_pools = 1;
        adapter->num_rx_queues_per_pool = 1;
 
 #ifdef CONFIG_IXGBE_DCB
index 5ccc3b6ccab1cd5761f61f23844a977a0b494d5d..4efb2b078f20b6071967e54ff659276c41cfce8d 100644 (file)
@@ -9843,7 +9843,6 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
                return ERR_PTR(-ENOMEM);
 
        pool = find_first_zero_bit(&adapter->fwd_bitmask, 32);
-       adapter->num_rx_pools++;
        set_bit(pool, &adapter->fwd_bitmask);
        limit = find_last_bit(&adapter->fwd_bitmask, 32);
 
@@ -9872,7 +9871,6 @@ fwd_add_err:
        netdev_info(pdev,
                    "%s: dfwd hardware acceleration failed\n", vdev->name);
        clear_bit(pool, &adapter->fwd_bitmask);
-       adapter->num_rx_pools--;
        kfree(fwd_adapter);
        return ERR_PTR(err);
 }
@@ -9884,7 +9882,6 @@ static void ixgbe_fwd_del(struct net_device *pdev, void *priv)
        unsigned int limit;
 
        clear_bit(fwd_adapter->pool, &adapter->fwd_bitmask);
-       adapter->num_rx_pools--;
 
        limit = find_last_bit(&adapter->fwd_bitmask, 32);
        adapter->ring_feature[RING_F_VMDQ].limit = limit + 1;