net: extract a few internals from netdevice.h
authorJakub Kicinski <kuba@kernel.org>
Wed, 6 Apr 2022 21:37:54 +0000 (14:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Apr 2022 03:32:09 +0000 (20:32 -0700)
commit6264f58ca0e54e41d63c2d00334a48bac28fbf30
treef57c030e59869e93863fc7fa673780b3272c7e49
parent2cc6cdd44a1655ac5a9863529a2fd6dbed2d092c
net: extract a few internals from netdevice.h

There's a number of functions and static variables used
under net/core/ but not from the outside. We currently
dump most of them into netdevice.h. That bad for many
reasons:
 - netdevice.h is very cluttered, hard to figure out
   what the APIs are;
 - netdevice.h is very long;
 - we have to touch netdevice.h more which causes expensive
   incremental builds.

Create a header under net/core/ and move some declarations.

The new header is also a bit of a catch-all but that's
fine, if we create more specific headers people will
likely over-think where their declaration fit best.
And end up putting them in netdevice.h, again.

More work should be done on splitting netdevice.h into more
targeted headers, but that'd be more time consuming so small
steps.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdevice.h
net/core/dev.c
net/core/dev.h [new file with mode: 0644]
net/core/dev_addr_lists.c
net/core/dev_ioctl.c
net/core/link_watch.c
net/core/net-procfs.c
net/core/net-sysfs.c
net/core/rtnetlink.c
net/core/sock.c
net/core/sysctl_net_core.c