Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i40e: not compute affinity_mask for IRQ

After commit 759dc4a7e605 ("i40e: initialize our affinity_mask
based on cpu_possible_mask"), NAPI IRQ affinity_mask is bind to
all possible CPUs, not a fixed CPU

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

authored by

Li RongQing and committed by
Tony Nguyen
f49be6dc e059c6f3

+3 -9
+3 -9
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 11186 11186 * i40e_vsi_alloc_q_vector - Allocate memory for a single interrupt vector 11187 11187 * @vsi: the VSI being configured 11188 11188 * @v_idx: index of the vector in the vsi struct 11189 - * @cpu: cpu to be used on affinity_mask 11190 11189 * 11191 11190 * We allocate one q_vector. If allocation fails we return -ENOMEM. 11192 11191 **/ 11193 - static int i40e_vsi_alloc_q_vector(struct i40e_vsi *vsi, int v_idx, int cpu) 11192 + static int i40e_vsi_alloc_q_vector(struct i40e_vsi *vsi, int v_idx) 11194 11193 { 11195 11194 struct i40e_q_vector *q_vector; 11196 11195 ··· 11222 11223 static int i40e_vsi_alloc_q_vectors(struct i40e_vsi *vsi) 11223 11224 { 11224 11225 struct i40e_pf *pf = vsi->back; 11225 - int err, v_idx, num_q_vectors, current_cpu; 11226 + int err, v_idx, num_q_vectors; 11226 11227 11227 11228 /* if not MSIX, give the one vector only to the LAN VSI */ 11228 11229 if (pf->flags & I40E_FLAG_MSIX_ENABLED) ··· 11232 11233 else 11233 11234 return -EINVAL; 11234 11235 11235 - current_cpu = cpumask_first(cpu_online_mask); 11236 - 11237 11236 for (v_idx = 0; v_idx < num_q_vectors; v_idx++) { 11238 - err = i40e_vsi_alloc_q_vector(vsi, v_idx, current_cpu); 11237 + err = i40e_vsi_alloc_q_vector(vsi, v_idx); 11239 11238 if (err) 11240 11239 goto err_out; 11241 - current_cpu = cpumask_next(current_cpu, cpu_online_mask); 11242 - if (unlikely(current_cpu >= nr_cpu_ids)) 11243 - current_cpu = cpumask_first(cpu_online_mask); 11244 11240 } 11245 11241 11246 11242 return 0;