> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-boun...@osuosl.org> On Behalf Of > Drewek, Wojciech > Sent: Tuesday, October 10, 2023 1:43 PM > To: mschmidt <mschm...@redhat.com>; intel-wired-...@lists.osuosl.org > Cc: Radoslaw Tyl <radoslawx....@intel.com>; Nguyen, Anthony L > <anthony.l.ngu...@intel.com>; Brandeburg, Jesse > <jesse.brandeb...@intel.com> > Subject: Re: [Intel-wired-lan] [PATCH net-next 5/5] iavf: fix the waiting time > for initial reset > > > > > -----Original Message----- > > From: Intel-wired-lan <intel-wired-lan-boun...@osuosl.org> On Behalf > > Of Michal Schmidt > > Sent: Tuesday, October 10, 2023 2:25 AM > > To: intel-wired-...@lists.osuosl.org > > Cc: Nguyen, Anthony L <anthony.l.ngu...@intel.com>; Radoslaw Tyl > > <radoslawx....@intel.com>; Brandeburg, Jesse > > <jesse.brandeb...@intel.com> > > Subject: [Intel-wired-lan] [PATCH net-next 5/5] iavf: fix the waiting > > time for initial reset > > > > Every time I create VFs on ice, I receive at least one "Device is > > still in reset (-16), retrying" message per VF. It recovers fine, but > > typical usecases should not trigger scary-looking messages. > > > > The waiting for reset is too short. It makes no sense to check every > > 10 microseconds. Typical reset waiting times are at least tens of > > milliseconds and can be several seconds. I suspect the polling > > interval was meant to be 10 milliseconds all along. > > > > IAVF_RESET_WAIT_COMPLETE_COUNT is defined as 2000, so the total > > waiting time could be over 20 seconds. I have seen resets take 5 > > seconds (with > > 128 VFs on ice). > > > > The added benefit of not triggering the "Device is still in reset" > > path is that we avoid going through the __IAVF_INIT_FAILED state, > > which would take a full second before retrying. > > > > Signed-off-by: Michal Schmidt <mschm...@redhat.com> > > Reviewed-by: Wojciech Drewek <wojciech.dre...@intel.com> > > > --- > > drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c > > b/drivers/net/ethernet/intel/iavf/iavf_main.c > > index 2ab08b015b85..f35d74566faa 100644 > > --- a/drivers/net/ethernet/intel/iavf/iavf_main.c > > +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c > > @@ -4791,7 +4791,7 @@ static int iavf_check_reset_complete(struct > > iavf_hw *hw) > > if ((rstat == VIRTCHNL_VFR_VFACTIVE) || > > (rstat == VIRTCHNL_VFR_COMPLETED)) > > return 0; > > - usleep_range(10, 20); > > + msleep(IAVF_RESET_WAIT_MS); > > } > > return -EBUSY; > > } > > -- > > 2.41.0 > > > > _______________________________________________ > > Intel-wired-lan mailing list > > Intel-wired-lan@osuosl.org > > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan > _______________________________________________ > Intel-wired-lan mailing list > Intel-wired-lan@osuosl.org > https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by: Rafal Romanowski <rafal.romanow...@intel.com> _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan