Skip to content

Commit 82e0572

Browse files
michalx-jaronanguy11
authored andcommitted
i40e: Fix not setting default xps_cpus after reset
During tx rings configuration default XPS queue config is set and __I40E_TX_XPS_INIT_DONE is locked. __I40E_TX_XPS_INIT_DONE state is cleared and set again with default mapping only during queues build, it means after first setup or reset with queues rebuild. (i.e. ethtool -L <interface> combined <number>) After other resets (i.e. ethtool -t <interface>) XPS_INIT_DONE is not cleared and those default maps cannot be set again. It results in cleared xps_cpus mapping until queues are not rebuild or mapping is not set by user. Add clearing __I40E_TX_XPS_INIT_DONE state during reset to let the driver set xps_cpus to defaults again after it was cleared. Fixes: 6f853d4 ("i40e: allow XPS with QoS enabled") Signed-off-by: Michal Jaron <[email protected]> Signed-off-by: Kamil Maziarz <[email protected]> Tested-by: Gurucharan <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent e8b4fc1 commit 82e0572

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10654,6 +10654,21 @@ static int i40e_rebuild_channels(struct i40e_vsi *vsi)
1065410654
return 0;
1065510655
}
1065610656

10657+
/**
10658+
* i40e_clean_xps_state - clean xps state for every tx_ring
10659+
* @vsi: ptr to the VSI
10660+
**/
10661+
static void i40e_clean_xps_state(struct i40e_vsi *vsi)
10662+
{
10663+
int i;
10664+
10665+
if (vsi->tx_rings)
10666+
for (i = 0; i < vsi->num_queue_pairs; i++)
10667+
if (vsi->tx_rings[i])
10668+
clear_bit(__I40E_TX_XPS_INIT_DONE,
10669+
vsi->tx_rings[i]->state);
10670+
}
10671+
1065710672
/**
1065810673
* i40e_prep_for_reset - prep for the core to reset
1065910674
* @pf: board private structure
@@ -10678,8 +10693,10 @@ static void i40e_prep_for_reset(struct i40e_pf *pf)
1067810693
i40e_pf_quiesce_all_vsi(pf);
1067910694

1068010695
for (v = 0; v < pf->num_alloc_vsi; v++) {
10681-
if (pf->vsi[v])
10696+
if (pf->vsi[v]) {
10697+
i40e_clean_xps_state(pf->vsi[v]);
1068210698
pf->vsi[v]->seid = 0;
10699+
}
1068310700
}
1068410701

1068510702
i40e_shutdown_adminq(&pf->hw);

0 commit comments

Comments
 (0)