Jiri Pirko 02a68a47ea 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>
2022-11-03 20:48:33 -07:00
..
2022-11-03 15:16:50 +01:00
2022-11-02 11:58:13 +00:00
2022-10-26 20:14:40 -07:00
2022-10-28 18:31:40 -07:00
2022-08-22 14:26:30 +01:00
2022-08-22 14:26:30 +01:00