[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825150132.5ec89092@kernel.org>
Date: Thu, 25 Aug 2022 15:01:32 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
edumazet@...gle.com, andrew@...n.ch, vivien.didelot@...il.com,
f.fainelli@...il.com, olteanv@...il.com, tariqt@...dia.com,
moshe@...dia.com, saeedm@...dia.com
Subject: Re: [patch net-next 0/7] devlink: sanitize per-port region
creation/destruction
On Thu, 25 Aug 2022 12:33:53 +0200 Jiri Pirko wrote:
> Currently the only user of per-port devlink regions is DSA. All drivers
> that use regions register them before devlink registration. For DSA,
> this was not possible as the internals of struct devlink_port needed for
> region creation are initialized during port registration.
>
> This introduced a mismatch in creation flow of devlink and devlink port
> regions. As you can see, it causes the DSA driver to make the port
> init/exit flow a bit cumbersome.
>
> Fix this by introducing port_init/fini() which could be optionally
> called by drivers like DSA, to prepare struct devlink_port to be used
> for region creation purposes before devlink port register is called.
>
> Force similar limitation as for devlink params and disallow to create
> regions after devlink or devlink port are registered. That allows to
> simplify the devlink region internal API to not to rely on
> devlink->lock.
The point of exposing the devlink lock was to avoid forcing drivers
to order object registration in a specific way. I don't like.
Please provide some solid motivation here 'cause if it's you like vs
I like...
Also the patches don't apply.
Powered by blists - more mailing lists