[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc1fecb7-d144-fe8b-acb5-91510fcc7848@redhat.com>
Date: Wed, 12 Jul 2023 15:28:21 +0200
From: Ivan Vecera <ivecera@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>, 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,
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 12. 07. 23 2:37, Jakub Kicinski wrote:
> 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.
I will simplify this and add an extra check.
Thanks for the review..
I.
Powered by blists - more mailing lists