]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: devlink: introduce devlink_compat_switch_id_get() helper
authorJiri Pirko <jiri@mellanox.com>
Wed, 3 Apr 2019 12:24:17 +0000 (14:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Apr 2019 00:42:36 +0000 (17:42 -0700)
commit7e1146e8c10c00f859843817da8ecc5d902ea409
tree822a020b5a501b08faa86b25488bc07c46af7db7
parentbec5267cded268acdf679b651778c300d204e9f2
net: devlink: introduce devlink_compat_switch_id_get() helper

Introduce devlink_compat_switch_id_get() helper which fills up switch_id
according to passed netdev pointer. Call it directly from
dev_get_port_parent_id() as a fallback when ndo_get_port_parent_id
is not defined for given netdev.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/dev.c
net/core/devlink.c