<div dir="auto"><div>Thanks Steve, is this something which will be fixed next iterations of NIC/FW? Or architecture limitation?</div><div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Thu, 21 Jul 2022, 2:47 pm Yang, SteveX, <<a href="mailto:stevex.yang@intel.com">stevex.yang@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nobin,<br>
<br>
It seems be limitation of the firmware/NIC implementation for reset VF.<br>
Firmware should spend some time to respond reset operation,<br>
if app/user reset VF with higher frequency, the HW/FW perhaps would be hung. (e.g.: 0xDEADBEEF code from register).<br>
This patch (<a href="https://github.com/DPDK/dpdk/commit/be7226980c9ad4963b92b489c8afb17f08899953" rel="noreferrer noreferrer" target="_blank">https://github.com/DPDK/dpdk/commit/be7226980c9ad4963b92b489c8afb17f08899953</a>) just is the workaround to delay reset checking.<br>
It cannot resolve this pressure testing.<br>
<br>
Thanks & Regards,<br>
Steve Yang.<br>
<br>
> -----Original Message-----<br>
> From: Nobin Mathew <<a href="mailto:nobin.mathew@gmail.com" target="_blank" rel="noreferrer">nobin.mathew@gmail.com</a>><br>
> Sent: Thursday, July 21, 2022 9:45 AM<br>
> To: Xing, Beilei <<a href="mailto:beilei.xing@intel.com" target="_blank" rel="noreferrer">beilei.xing@intel.com</a>><br>
> Cc: <a href="mailto:users@dpdk.org" target="_blank" rel="noreferrer">users@dpdk.org</a>; Yang, SteveX <<a href="mailto:stevex.yang@intel.com" target="_blank" rel="noreferrer">stevex.yang@intel.com</a>>; Yang, Qiming<br>
> <<a href="mailto:qiming.yang@intel.com" target="_blank" rel="noreferrer">qiming.yang@intel.com</a>><br>
> Subject: Re: VF is still resetting<br>
> <br>
> Any pointers?<br>
> Is this a firmware problem?<br>
> <br>
> I am not seeing<br>
>  " dev_err(&pf->pdev->dev, "VF reset check timeout on VF %d\n", " from<br>
> i40e driver  anywhere in syslog.<br>
> <br>
> -Nobin<br>
> <br>
> On Wed, Jul 20, 2022 at 11:56 AM Xing, Beilei <<a href="mailto:beilei.xing@intel.com" target="_blank" rel="noreferrer">beilei.xing@intel.com</a>> wrote:<br>
> ><br>
> > Hi Steve,<br>
> ><br>
> > Could you please help on this? Thanks.<br>
> ><br>
> > BR,<br>
> > Beilei<br>
> ><br>
> > > -----Original Message-----<br>
> > > From: Nobin Mathew <<a href="mailto:nobin.mathew@gmail.com" target="_blank" rel="noreferrer">nobin.mathew@gmail.com</a>><br>
> > > Sent: Wednesday, July 20, 2022 12:18 AM<br>
> > > To: <a href="mailto:users@dpdk.org" target="_blank" rel="noreferrer">users@dpdk.org</a><br>
> > > Subject: VF is still resetting<br>
> > ><br>
> > > Hi,<br>
> > ><br>
> > > We are running a dpdk app inside a pod, and orchestrating the app<br>
> > > very frequently(test app).<br>
> > ><br>
> > > 1/100 or so we are getting an error:<br>
> > ><br>
> > > 2022-07-17T22:34:24.620291289+03:00 iavf_check_vf_reset_done():<br>
> > > reset VFR value: 3<br>
> > > 2022-07-17T22:34:24.620310455+03:00 iavf_init_vf(): VF is still<br>
> > > resetting<br>
> > > 2022-07-17T22:34:24.620339697+03:00 iavf_dev_init(): Init vf failed<br>
> > > 2022-07-17T22:34:24.620390802+03:00 EAL: Releasing PCI mapped<br>
> > > resource for 0000:3b:0f.5<br>
> > > 2022-07-17T22:34:24.620397381+03:00 EAL: Calling pci_unmap_resource<br>
> > > for<br>
> > > 0000:3b:0f.5 at 0x2101000000<br>
> > > 2022-07-17T22:34:24.620442514+03:00 EAL: Calling pci_unmap_resource<br>
> > > for<br>
> > > 0000:3b:0f.5 at 0x2101010000<br>
> > > 2022-07-17T22:34:24.729012277+03:00 EAL: Requested device<br>
> > > 0000:3b:0f.5 cannot be used<br>
> > > 2022-07-17T22:34:24.729028758+03:00 EAL: Bus (pci) probe failed.<br>
> > ><br>
> > > we added one log in dpdk lib to print the VFGEN_RSTAT register of<br>
> > > the VF. In problematic cases, we are seeing the value 3 which maps<br>
> > > to 0xDEADBEEF<br>
> > ><br>
> > > / VF reset states - these are written into the RSTAT register:<br>
> > > * VFGEN_RSTAT on the VF<br>
> > > * When the PF initiates a reset, it writes 0<br>
> > > * When the reset is complete, it writes 1<br>
> > > * When the PF detects that the VF has recovered, it writes 2<br>
> > > * VF checks this register periodically to determine if a reset has<br>
> > > occurred,<br>
> > > * then polls it to know when the reset is complete.<br>
> > > * If either the PF or VF reads the register while the hardware<br>
> > > * is in a reset state, it will return DEADBEEF, which, when masked<br>
> > > * will result in 3.<br>
> > > /<br>
> > > enum virtchnl_vfr_states {<br>
> > > VIRTCHNL_VFR_INPROGRESS = 0,<br>
> > > VIRTCHNL_VFR_COMPLETED,<br>
> > > VIRTCHNL_VFR_VFACTIVE,<br>
> > > };<br>
> > ><br>
> > > We tried this patch also, increasing the poll time, no help.<br>
> > ><br>
> <a href="https://github.com/DPDK/dpdk/commit/be7226980c9ad4963b92b489c8afb" rel="noreferrer noreferrer" target="_blank">https://github.com/DPDK/dpdk/commit/be7226980c9ad4963b92b489c8afb</a><br>
> > > 17f08899953<br>
> > ><br>
> > > Details of the setup:<br>
> > ><br>
> > > DPDK library version<br>
> > > 21.11<br>
> > > VF Driver:-<br>
> > > intel-iavf version 4.0.1-3.2<br>
> > > PF driver:-<br>
> > > sudo ethtool -i enp94s0f1<br>
> > > driver: i40e<br>
> > > version: 2.14.13<br>
> > > firmware-version: 8.15 0x800096ca 20.0.17<br>
> > ><br>
> > > Since we are seeing 0xDEADBEEF, I am assuming VF-PF reset mailbox<br>
> > > msg is received by PF, and PF initiated the RESET sequence by<br>
> > > writing VFSWR to VPGEN_VFRTRIG register.<br>
> > ><br>
> > > I am not seeing<br>
> > > " dev_err(&pf->pdev->dev, "VF reset check timeout on VF %d\n", "<br>
> > > anywhere in syslog.<br>
> > ><br>
> > > Any pointers?, why does this happen(why VF reset is not complete)?...<br>
> > ><br>
> > > One more question, what is the sequence of calls in the reset path?<br>
> > > i40e_vc_process_vf_msg() -> VIRTCHNL_OP_RESET_VF<br>
> i40e_vc_reset_vf()<br>
> > > -><br>
> > > i40e_reset_vf() -> i40e_trigger_vf_reset() & i40e_cleanup_reset_vf()<br>
> > ><br>
> > > this one?<br>
> > ><br>
> > > -Nobin<br>
</blockquote></div></div></div>