Jiri Pirko ae3bbc04d4 net: devlink: add port_init/fini() helpers to allow pre-register/post-unregister functions
Lifetime of some of the devlink objects, like regions, is currently
forced to be different for devlink instance and devlink port instance
(per-port regions). The reason is that for devlink ports, the internal
structures initialization happens only after devlink_port_register() is
called.

To resolve this inconsistency, introduce new set of helpers to allow
driver to initialize devlink pointer and region list before
devlink_register() is called. That allows port regions to be created
before devlink port registration and destroyed after devlink
port unregistration.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-09-30 18:17:16 -07:00
..
2022-08-11 19:21:03 +02:00
2022-09-23 15:28:51 -07:00
2022-08-04 20:00:14 -07:00
2022-09-30 10:07:31 -07:00
2022-08-04 12:12:54 -07:00
2022-08-06 10:56:45 -07:00
2022-09-01 01:02:10 -04:00
2022-08-01 15:26:40 +02:00
2022-09-22 11:10:11 -07:00