]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: expose instance locking and add locked port registering
authorJakub Kicinski <kuba@kernel.org>
Tue, 15 Mar 2022 06:00:04 +0000 (23:00 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Mar 2022 19:56:31 +0000 (12:56 -0700)
commitbb278e240ada98b315f9a940a821099be016465e
tree7a097268cd33bddcbc44114f2c1111e501373375
parent1c26a6473573dfc2eb1dab58c25d1daac2905d4b
devlink: expose instance locking and add locked port registering

It should be familiar and beneficial to expose devlink instance
lock to the drivers. This way drivers can block devlink from
calling them during critical sections without breakneck locking.

Add port helpers, port splitting callbacks will be the first
target.

Use 'devl_' prefix for "explicitly locked" API. Initial RFC used
'__devlink' but that's too much typing.

devl_lock_is_held() is not defined without lockdep, which is
the same behavior as lockdep_is_held() itself.

Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/devlink/index.rst
include/net/devlink.h
net/core/devlink.c