mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
d0f5172629
commit
31265c1e29
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user