summaryrefslogtreecommitdiff
path: root/drivers/net/netdevsim
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2022-11-02 19:02:03 +0300
committerJakub Kicinski <kuba@kernel.org>2022-11-04 06:48:33 +0300
commit02a68a47eadedf95748facfca6ced31fb0181d52 (patch)
treeec9516721ac6b31f4d0c9ece1dfa6fbf5f709c6c /drivers/net/netdevsim
parentd41c9dbd12745cfc1cb2946cd99016d83c2c5364 (diff)
downloadlinux-02a68a47eadedf95748facfca6ced31fb0181d52.tar.xz
net: devlink: track netdev with devlink_port assigned
Currently, ethernet drivers are using devlink_port_type_eth_set() and devlink_port_type_clear() to set devlink port type and link to related netdev. Instead of calling them directly, let the driver use SET_NETDEV_DEVLINK_PORT macro to assign devlink_port pointer and let devlink to track it. Note the devlink port pointer is static during the time netdevice is registered. In devlink code, use per-namespace netdev notifier to track the netdevices with devlink_port assigned and change the internal devlink_port type and related type pointer accordingly. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim')
0 files changed, 0 insertions, 0 deletions