[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230711173731.54b9fa80@kernel.org>
Date: Tue, 11 Jul 2023 17:37:31 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
pabeni@...hat.com, edumazet@...gle.com, netdev@...r.kernel.org, Ivan Vecera
<ivecera@...hat.com>, Ma Yuying <yuma@...hat.com>, Simon Horman
<simon.horman@...igine.com>, Rafal Romanowski <rafal.romanowski@...el.com>
Subject: Re: [PATCH net-next 1/2] i40e: Add helper for VF inited state check
with timeout
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
Powered by blists - more mailing lists