[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230112112021.0ff88cdb@kernel.org>
Date: Thu, 12 Jan 2023 11:20:21 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: Jacob Keller <jacob.e.keller@...el.com>,
Jiri Pirko <jiri@...nulli.us>, davem@...emloft.net,
netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH net-next 7/9] devlink: allow registering parameters
after the instance
On Thu, 12 Jan 2023 09:07:43 +0200 Leon Romanovsky wrote:
> As a user, I don't want to see any late dynamic object addition which is
> not triggered by me explicitly. As it doesn't make any sense to add
> various delays per-vendor/kernel in configuration scripts just because
> not everything is ready. Users need predictability, lazy addition of
> objects adds chaos instead.
>
> Agree with Jakub, it is anti-pattern.
To be clear my preference would be to always construct the three from
the root. Register the main instance, then sub-objects. I mean - you
tried forcing the opposite order and it only succeeded in 90-something
percent of cases. There's always special cases.
I don't understand your concern about user experience here. We have
notifications for each sub-object. Plus I think drivers should hold
the instance lock throughout the probe routine. I don't see a scenario
in which registering the main instance first would lead to retry/sleep
hacks in user space, do you? I'm talking about devlink and the subobjs
we have specifically.
Powered by blists - more mailing lists