summaryrefslogtreecommitdiff
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-04-07 00:37:54 +0300
committerJakub Kicinski <kuba@kernel.org>2022-04-08 06:32:09 +0300
commit6264f58ca0e54e41d63c2d00334a48bac28fbf30 (patch)
treef57c030e59869e93863fc7fa673780b3272c7e49 /net/core/sock.c
parent2cc6cdd44a1655ac5a9863529a2fd6dbed2d092c (diff)
downloadlinux-6264f58ca0e54e41d63c2d00334a48bac28fbf30.tar.xz
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>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 1180a0cb0110..7000403eaeb2 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -141,6 +141,8 @@
#include <linux/ethtool.h>
+#include "dev.h"
+
static DEFINE_MUTEX(proto_list_mutex);
static LIST_HEAD(proto_list);