aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_tap.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-26 14:56:52 -0700
committerPaolo Abeni <pabeni@redhat.com>2022-07-28 11:29:36 +0200
commit5f10376b6bc1e2773f56977980ab08c9e4fa91a7 (patch)
tree3ff84167fed44603554cc97595bd0fb761f14d3f /include/linux/if_tap.h
parentRevert "Merge branch 'octeontx2-minor-tc-fixes'" (diff)
downloadlinux-dev-5f10376b6bc1e2773f56977980ab08c9e4fa91a7.tar.xz
linux-dev-5f10376b6bc1e2773f56977980ab08c9e4fa91a7.zip
add missing includes and forward declarations to networking includes under linux/
Similarly to a recent include/net/ cleanup, this patch adds missing includes to networking headers under include/linux. All these problems are currently masked by the existing users including the missing dependency before the broken header. Link: https://lore.kernel.org/all/20220723045755.2676857-1-kuba@kernel.org/ v1 Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20220726215652.158167-1-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/if_tap.h')
-rw-r--r--include/linux/if_tap.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/if_tap.h b/include/linux/if_tap.h
index 915a187cfabd..553552fa635c 100644
--- a/include/linux/if_tap.h
+++ b/include/linux/if_tap.h
@@ -2,14 +2,18 @@
#ifndef _LINUX_IF_TAP_H_
#define _LINUX_IF_TAP_H_
+#include <net/sock.h>
+#include <linux/skb_array.h>
+
+struct file;
+struct socket;
+
#if IS_ENABLED(CONFIG_TAP)
struct socket *tap_get_socket(struct file *);
struct ptr_ring *tap_get_ptr_ring(struct file *file);
#else
#include <linux/err.h>
#include <linux/errno.h>
-struct file;
-struct socket;
static inline struct socket *tap_get_socket(struct file *f)
{
return ERR_PTR(-EINVAL);
@@ -20,9 +24,6 @@ static inline struct ptr_ring *tap_get_ptr_ring(struct file *f)
}
#endif /* CONFIG_TAP */
-#include <net/sock.h>
-#include <linux/skb_array.h>
-
/*
* Maximum times a tap device can be opened. This can be used to
* configure the number of receive queue, e.g. for multiqueue virtio.