devlink: split out core code
authorJakub Kicinski <kuba@kernel.org>
Thu, 5 Jan 2023 04:05:19 +0000 (20:05 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Jan 2023 06:13:31 +0000 (22:13 -0800)
commit687125b5799cd5120437fa455cfccbe8537916ff
tree5afe63a5ca41104d4328105f99ea61a65341007c
parente50ef40f9a9a35d8526d38e6b5a165178fa1857f
devlink: split out core code

Move core code into a separate file. It's spread around the main
file which makes refactoring and figuring out how devlink works
harder.

Move the xarray, all the most core devlink instance code out like
locking, ref counting, alloc, register, etc. Leave port stuff in
leftover.c, if we want to move port code it'd probably be to its
own file.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/Makefile
net/devlink/core.c [new file with mode: 0644]
net/devlink/devl_internal.h [new file with mode: 0644]
net/devlink/leftover.c