]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: Add per devlink instance lock
authorArkadi Sharshevsky <arkadis@mellanox.com>
Mon, 15 Jan 2018 07:59:02 +0000 (08:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jan 2018 19:15:34 +0000 (14:15 -0500)
commiteb9d9a5bf917789dad2ff96a9228657867e7fe50
treef52c791e9abfca5b0f239ba315d1381af950545f
parent2da66b8953221560b927f2cb013ebbfc5b9c4032
devlink: Add per devlink instance lock

This is a preparation before introducing resources and hot reload support.
Currently there are two global lock where one protects all devlink access,
and the second one protects devlink port access. This patch adds per devlink
instance lock which protects the internal members which are the sb/dpipe/
resource/ports. By introducing this lock the global devlink port lock can
be discarded.

Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c