]> git.ipfire.org Git - thirdparty/linux.git/commit
devlink: allow devlink instance allocation without a backing device
authorJiri Pirko <jiri@nvidia.com>
Thu, 12 Mar 2026 10:04:04 +0000 (11:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Mar 2026 20:08:49 +0000 (13:08 -0700)
commita4c6d53e5fd61829f707b7a723dd2937ed67c803
treecb8800f34361550c64f4694ff31f54c9fb66cffd
parent104733e1303efcec97c9a581adabbc03c6679006
devlink: allow devlink instance allocation without a backing device

Allow devlink_alloc_ns() to be called with dev=NULL to support
device-less devlink instances. When dev is NULL, the instance is
identified over netlink using "devlink_index" as bus_name and
the decimal index value as dev_name.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20260312100407.551173-11-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/core.c
net/devlink/dev.c
net/devlink/devl_internal.h