]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'devlink-expose-instance-locking-and-simplify-port-splitting'
authorJakub Kicinski <kuba@kernel.org>
Wed, 16 Mar 2022 19:56:49 +0000 (12:56 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Mar 2022 19:56:54 +0000 (12:56 -0700)
commitd6e0b3a576525c0523d5eb6e8c251df7bd3f592c
tree765804a5cfb6868ff577cd56e44b1a6c823f3d72
parentca14f988e2a5489a81641a315a3dee05d2f056a3
parent0ea1780729bbe7ccf27b2074bac8733ce016d8c8
Merge branch 'devlink-expose-instance-locking-and-simplify-port-splitting'

Jakub Kicinski says:

====================
devlink: expose instance locking and simplify port splitting

This series puts the devlink ports fully under the devlink instance
lock's protection. As discussed in the past it implements my preferred
solution of exposing the instance lock to the drivers. This way drivers
which want to support port splitting can lock the devlink instance
themselves on the probe path, and we can take that lock in the core
on the split/unsplit paths.

nfp and mlxsw are converted, with slightly deeper changes done in
nfp since I'm more familiar with that driver.

Now that the devlink port is protected we can pass a pointer to
the drivers, instead of passing a port index and forcing the drivers
to do their own lookups. Both nfp and mlxsw can container_of() to
their own structures.
====================

Link: https://lore.kernel.org/r/20220315060009.1028519-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>