[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5CU1DkXVRoz3PcQ@nanopsycho>
Date: Wed, 7 Dec 2022 14:27:48 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: 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,
shannon.nelson@....com, brett.creeley@....com
Subject: Re: [patch net-next 1/8] devlink: call
devlink_port_register/unregister() on registered instance
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.
Powered by blists - more mailing lists