[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230712103136.1a85eb91@kernel.org>
Date: Wed, 12 Jul 2023 10:31:36 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Ivan Vecera <ivecera@...hat.com>
Cc: Leon Romanovsky <leon@...nel.org>, Tony Nguyen
<anthony.l.nguyen@...el.com>, davem@...emloft.net, pabeni@...hat.com,
edumazet@...gle.com, netdev@...r.kernel.org, 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 Wed, 12 Jul 2023 15:18:29 +0200 Ivan Vecera wrote:
> > This error is not accurate in the edge case, when VF state changed to
> > be INIT during msleep() while i was 14.
> >
> > Thanks
>
> Would you like to add an extra check after the cycle or just increase
> limit from 15 to 16 (there will be an extra msleep)...
15 or 16 is of lesser importance, the bigger irritant is that the last
sleep is no pointless. I'd move the condition check into the middle of
the loop:
for (i = 0;; i++) {
if (test())
return GOOD;
if (i >= 15)
return BAD;
take_a_nap();
}
Powered by blists - more mailing lists