|
@@ -2399,20 +2399,20 @@ static void i40e_config_xps_tx_ring(struct i40e_ring *ring)
|
|
struct i40e_vsi *vsi = ring->vsi;
|
|
struct i40e_vsi *vsi = ring->vsi;
|
|
cpumask_var_t mask;
|
|
cpumask_var_t mask;
|
|
|
|
|
|
- if (ring->q_vector && ring->netdev) {
|
|
|
|
- /* Single TC mode enable XPS */
|
|
|
|
- if (vsi->tc_config.numtc <= 1 &&
|
|
|
|
- !test_and_set_bit(__I40E_TX_XPS_INIT_DONE, &ring->state)) {
|
|
|
|
|
|
+ if (!ring->q_vector || !ring->netdev)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ /* Single TC mode enable XPS */
|
|
|
|
+ if (vsi->tc_config.numtc <= 1) {
|
|
|
|
+ if (!test_and_set_bit(__I40E_TX_XPS_INIT_DONE, &ring->state))
|
|
netif_set_xps_queue(ring->netdev,
|
|
netif_set_xps_queue(ring->netdev,
|
|
&ring->q_vector->affinity_mask,
|
|
&ring->q_vector->affinity_mask,
|
|
ring->queue_index);
|
|
ring->queue_index);
|
|
- } else if (alloc_cpumask_var(&mask, GFP_KERNEL)) {
|
|
|
|
- /* Disable XPS to allow selection based on TC */
|
|
|
|
- bitmap_zero(cpumask_bits(mask), nr_cpumask_bits);
|
|
|
|
- netif_set_xps_queue(ring->netdev, mask,
|
|
|
|
- ring->queue_index);
|
|
|
|
- free_cpumask_var(mask);
|
|
|
|
- }
|
|
|
|
|
|
+ } else if (alloc_cpumask_var(&mask, GFP_KERNEL)) {
|
|
|
|
+ /* Disable XPS to allow selection based on TC */
|
|
|
|
+ bitmap_zero(cpumask_bits(mask), nr_cpumask_bits);
|
|
|
|
+ netif_set_xps_queue(ring->netdev, mask, ring->queue_index);
|
|
|
|
+ free_cpumask_var(mask);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|