diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-11-02 19:02:07 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-04 06:48:35 +0300 |
commit | 31265c1e29eb28f17df50d04ee421b5b6369fefd (patch) | |
tree | 86288d3757fbb2bbe74ea4f6f7bb124e8cdfb6d1 /include/net/devlink.h | |
parent | d0f5172629339f4a9cbbe5f9ae51cea48b4af333 (diff) | |
download | linux-31265c1e29eb28f17df50d04ee421b5b6369fefd.tar.xz |
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>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index b1582b32183a..7befad57afd4 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -129,6 +129,8 @@ struct devlink_port { union { struct { struct net_device *netdev; + int ifindex; + char ifname[IFNAMSIZ]; } type_eth; struct { struct ib_device *ibdev; |