aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-04-06 14:37:54 -0700
committerJakub Kicinski <kuba@kernel.org>2022-04-07 20:32:09 -0700
commit6264f58ca0e54e41d63c2d00334a48bac28fbf30 (patch)
treef57c030e59869e93863fc7fa673780b3272c7e49 /net/core/sock.c
parentnet: unexport a handful of dev_* functions (diff)
downloadlinux-dev-6264f58ca0e54e41d63c2d00334a48bac28fbf30.tar.xz
linux-dev-6264f58ca0e54e41d63c2d00334a48bac28fbf30.zip
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);