]> git.ipfire.org Git - thirdparty/iproute2.git/commit
devlink: load port-ifname map on demand
authorJiri Pirko <jiri@nvidia.com>
Thu, 25 Aug 2022 08:04:19 +0000 (10:04 +0200)
committerDavid Ahern <dsahern@kernel.org>
Thu, 1 Sep 2022 02:36:41 +0000 (20:36 -0600)
commit5cddbb274eabaf03c8a95b289c2bcdf3e079bced
treefc57acde91ba6b1db911647b5e1d023d8d1b1a99
parentfc6be06cab4327eecac5885f80048e7a57dd28e8
devlink: load port-ifname map on demand

So far, the port-ifname map was loaded during devlink init
no matter if actually needed or not. Port dump cmd which is utilized
for this in kernel takes lock for every devlink instance.
That may lead to unnecessary blockage of command.

Load the map only in time it is needed to lookup ifname.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
devlink/devlink.c