net: devlink: store copy netdevice ifindex and ifname to allow port_fill() without...
authorJiri Pirko <jiri@nvidia.com>
Wed, 2 Nov 2022 16:02:07 +0000 (17:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Nov 2022 03:48:35 +0000 (20:48 -0700)
commit31265c1e29eb28f17df50d04ee421b5b6369fefd
tree86288d3757fbb2bbe74ea4f6f7bb124e8cdfb6d1
parentd0f5172629339f4a9cbbe5f9ae51cea48b4af333
net: devlink: store copy netdevice ifindex and ifname to allow port_fill() without RTNL held

To avoid a need to take RTNL mutex in port_fill() function, benefit from
the introduce infrastructure that tracks netdevice notifier events.
Store the ifindex and ifname upon register and change name events.
Remove the rtnl_held bool propagated down to port_fill() function as it
is no longer needed.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/devlink.h
net/core/devlink.c