summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2022-11-02 17:02:03 +0100
committerJakub Kicinski <kuba@kernel.org>2022-11-03 20:48:33 -0700
commit02a68a47eadedf95748facfca6ced31fb0181d52 (patch)
treeec9516721ac6b31f4d0c9ece1dfa6fbf5f709c6c /drivers/net
parentd41c9dbd12745cfc1cb2946cd99016d83c2c5364 (diff)
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')
0 files changed, 0 insertions, 0 deletions