[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4bc5b68c-1a25-b1e5-0cd2-d85b31728c5a@amd.com>
Date: Wed, 7 Dec 2022 11:45:30 -0800
From: Shannon Nelson <shannon.nelson@....com>
To: Jiri Pirko <jiri@...nulli.us>, Shannon Nelson <shnelson@....com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, michael.chan@...adcom.com,
ioana.ciornei@....com, dmichail@...gible.com,
jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com,
tchornyi@...vell.com, tariqt@...dia.com, saeedm@...dia.com,
leon@...nel.org, idosch@...dia.com, petrm@...dia.com,
vladimir.oltean@....com, claudiu.manoil@....com,
alexandre.belloni@...tlin.com, simon.horman@...igine.com,
brett.creeley@....com
Subject: Re: [patch net-next 1/8] devlink: call
devlink_port_register/unregister() on registered instance
On 12/7/22 5:27 AM, Jiri Pirko wrote:
> Tue, Dec 06, 2022 at 06:35:32PM CET, shnelson@....com wrote:
>> On 12/5/22 11:41 PM, Jiri Pirko wrote:
>>> Tue, Dec 06, 2022 at 12:55:32AM CET, shnelson@....com wrote:
>>>> On 12/5/22 7:22 AM, Jiri Pirko wrote:
>>>>>
>>>>> From: Jiri Pirko <jiri@...dia.com>
>>>>>
>>>>> Change the drivers that use devlink_port_register/unregister() to call
>>>>> these functions only in case devlink is registered.
>>
>>
>>>>
>>>> I haven't kept up on all the discussion about this, but is there no longer a
>>>> worry about registering the devlink object before all the related
>>>> configuration bits are in place?
>>>>
>>>> Does this open any potential issues with userland programs seeing the devlink
>>>> device and trying to access port before they get registered?
>>>
>>> What exactly do you have in mind? Could you please describe it?
>>
>> It looks like this could be setting up a race condition that some userland
>> udev automation might hit if it notices the device, looks for the port, but
>> doesn't see the port yet. Leon's patch turned this around so that the ports
>> would show up at the same time as the device.
>
> Any userland automation should not rely on that. Ports may come and go
> with the current code as well, see port split/unsplit, linecard
> provision unprovision.
As long as this is a clear expectation, I'm fine with this.
sln
Powered by blists - more mailing lists