summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2022-09-29 09:28:58 +0200
committerJakub Kicinski <kuba@kernel.org>2022-09-30 18:17:16 -0700
commitae3bbc04d4bfef5d0332cd4edda3ac8f714cea23 (patch)
treee150b9e6fd1d7233eb6c3a05bf53b89cae4d40ea /net/dsa
parent081adcfe930e4b01a55eaa329b2e453a442f35a9 (diff)
downloadlinux-stable-ae3bbc04d4bfef5d0332cd4edda3ac8f714cea23.tar.gz
linux-stable-ae3bbc04d4bfef5d0332cd4edda3ac8f714cea23.tar.bz2
linux-stable-ae3bbc04d4bfef5d0332cd4edda3ac8f714cea23.zip
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>
Diffstat (limited to 'net/dsa')
0 files changed, 0 insertions, 0 deletions