]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
i40e: allow XPS with QoS enabled
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 7 Sep 2017 12:05:53 +0000 (08:05 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Oct 2017 21:28:56 +0000 (14:28 -0700)
Recently, the kernel gained support for enabling XPS and QoS at the
same time. Thus, we no longer need to worry about the number of
traffic classes when enabling XPS.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 74875ddaeb330e8beb60645a63dcc4a85bea4f94..b26f615bed5a10c8bfc7781a268b154c63e164ef 100644 (file)
@@ -2879,23 +2879,18 @@ static void i40e_vsi_free_rx_resources(struct i40e_vsi *vsi)
  **/
 static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
 {
-       struct i40e_vsi *vsi = ring->vsi;
        int cpu;
 
        if (!ring->q_vector || !ring->netdev)
                return;
 
-       if ((vsi->tc_config.numtc <= 1) &&
-           !test_and_set_bit(__I40E_TX_XPS_INIT_DONE, ring->state)) {
-               cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
-               netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
-                                   ring->queue_index);
-       }
+       /* We only initialize XPS once, so as not to overwrite user settings */
+       if (test_and_set_bit(__I40E_TX_XPS_INIT_DONE, ring->state))
+               return;
 
-       /* schedule our worker thread which will take care of
-        * applying the new filter changes
-        */
-       i40e_service_event_schedule(vsi->back);
+       cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
+       netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
+                           ring->queue_index);
 }
 
 /**