Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f853d4f authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

i40e: allow XPS with QoS enabled



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: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 95bc2fb4
Loading
Loading
Loading
Loading
+6 −11
Original line number Original line Diff line number Diff line
@@ -2879,25 +2879,20 @@ static void i40e_vsi_free_rx_resources(struct i40e_vsi *vsi)
 **/
 **/
static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
{
{
	struct i40e_vsi *vsi = ring->vsi;
	int cpu;
	int cpu;


	if (!ring->q_vector || !ring->netdev)
	if (!ring->q_vector || !ring->netdev)
		return;
		return;


	if ((vsi->tc_config.numtc <= 1) &&
	/* We only initialize XPS once, so as not to overwrite user settings */
	    !test_and_set_bit(__I40E_TX_XPS_INIT_DONE, ring->state)) {
	if (test_and_set_bit(__I40E_TX_XPS_INIT_DONE, ring->state))
		return;

	cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
	cpu = cpumask_local_spread(ring->q_vector->v_idx, -1);
	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
	netif_set_xps_queue(ring->netdev, get_cpu_mask(cpu),
			    ring->queue_index);
			    ring->queue_index);
}
}


	/* schedule our worker thread which will take care of
	 * applying the new filter changes
	 */
	i40e_service_event_schedule(vsi->back);
}

/**
/**
 * i40e_configure_tx_ring - Configure a transmit ring context and rest
 * i40e_configure_tx_ring - Configure a transmit ring context and rest
 * @ring: The Tx ring to configure
 * @ring: The Tx ring to configure