Re: [patch net-next] devlink: don't take instance lock for nested handle put

Jakub Kicinski
2023-10-10T14:52:33Z

On Tue, 10 Oct 2023 09:31:20 +0200 Jiri Pirko wrote:
>> In Linux the PF is what controls the SFs, right?
>> Privileges, configuration/admin, resource control.
>> How can the parent disappear and children still exist.
>
> It's not like the PF instance disappears, the devlink port related to
> the SF is removed. Whan user does it, driver asks FW to shutdown the SF.
> That invokes FW flow which eventually leads to event delivered back to
> driver that removes the SF instance itself.

You understand what I'm saying tho, right?

If we can depend on the parent not disappearing before the child,
and the hierarchy is a DAG - the locking is much easier, because
parent can lock the child.

If it's only nVidia that put the control in hands of FW we shouldn't
complicate the core for y'all.