i40e: stop VF rings
Subsystems (2)
PATCH 1/1 i40e: stop VF rings
Explicitly stop the rings belonging to each VF when disabling SR-IOV. Even though the VFs were gone, and the associated VSIs were removed, the rings were not stopped, and in some circumstances the hardware would continue to access the memory formerly used by the rings, causing memory corruption or DMAR errors, both of which would lead to general malaise of the kernel.
To relieve this condition, explicitly stop all the rings associated with each VF before releasing its resources.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +5 -0
@@ -733,6 +733,11 @@ void i40e_free_vfs(struct i40e_pf *pf)while (test_and_set_bit (__I40E_VF_DISABLE, &pf->state))usleep_range (1000 ,2000 ); +for (i =0 ; i < pf->num_alloc_vfs; i++) +if (test_bit (I40E_VF_STAT_INIT , &pf->vf[i].vf_states)) +i40e_vsi_control_rings (pf->vsi[pf->vf[i].lan_vsi_index], + false); +/* Disable IOV before freeing resources. This lets any VF drivers * running in the host get themselves cleaned up before we yank * the carpet out from underneath their feet.
Signature · 1 line
2.1.0
Jeff Kirsher
AppliedPATCH 1/1 i40e: stop VF rings
Quoted 8 lines · Mitch Williams
Explicitly stop the rings belonging to each VF when disabling SR-IOV. Even though the VFs were gone, and the associated VSIs were removed, the rings were not stopped, and in some circumstances the hardware would
continue to access the memory formerly used by the rings, causing memory corruption or DMAR errors, both of which would lead to general malaise of the kernel.
Quoted 8 lines
To relieve this condition, explicitly stop all the rings associated with
each VF before releasing its resources.Signed-off-by Mitch Williams <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 +++++ 1 file changed, 5 insertions(+)
I have applied your patch to my queue.
Signature · 9 lines
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150403/a086872e/attachment.asc>