Subject: Re: [PATCH net-next 1/2] i40e: Add helper for VF inited state check with timeout

From: Jakub Kicinski <[email-masked]>
Date: Tue, 11 Jul 2023 17:37:31 -0700

On Tue, 11 Jul 2023 15:09:04 +0300 Leon Romanovsky wrote:
> > +	for (i = 0; i < 15; i++) {
> > +		if (test_bit(I40E_VF_STATE_INIT, &vf->vf_states))
> > +			return true;
> > +
> > +		msleep(20);
> > +	}
> > +
> > +	dev_err(&vf->pf->pdev->dev, "VF %d still in reset. Try again.\n",
> > +		vf->vf_id);  
> 
> This error is not accurate in the edge case, when VF state changed to
> be INIT during msleep() while i was 14.

Right, it's a change in behavior from existing code,
old code re-checked if INIT is set after the last sleep.
-- 
pw-bot: cr