All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org
Cc: bpf@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH bpf-next 5/5] bpf: push down the bpf-link include
Date: Mon, 13 Dec 2021 15:42:23 -0800	[thread overview]
Message-ID: <20211213234223.356977-6-kuba@kernel.org> (raw)
In-Reply-To: <20211213234223.356977-1-kuba@kernel.org>

Turns out bpf_link is not dereferenced or embedded much.
Since we have separated it out to its own header why not
drop the include from bpf.h completely...

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 include/linux/bpf.h   | 2 +-
 kernel/bpf/bpf_iter.c | 1 +
 kernel/bpf/syscall.c  | 1 +
 net/core/dev.c        | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 64bdae62a594..0be6890f01ec 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -23,12 +23,12 @@
 #include <linux/slab.h>
 #include <linux/percpu-refcount.h>
 #include <linux/bpf-cgroup-types.h>
-#include <linux/bpf-link.h>
 #include <linux/bpfptr.h>
 
 struct bpf_verifier_env;
 struct bpf_verifier_log;
 struct perf_event;
+struct bpf_link;
 struct bpf_prog;
 struct bpf_prog_aux;
 struct bpf_map;
diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c
index b7aef5b3416d..9e4d00446227 100644
--- a/kernel/bpf/bpf_iter.c
+++ b/kernel/bpf/bpf_iter.c
@@ -5,6 +5,7 @@
 #include <linux/anon_inodes.h>
 #include <linux/filter.h>
 #include <linux/bpf.h>
+#include <linux/bpf-link.h>
 
 struct bpf_iter_target_info {
 	struct list_head list;
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index ddd81d543203..9034bb833ec3 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -5,6 +5,7 @@
 #include <linux/bpf_trace.h>
 #include <linux/bpf_lirc.h>
 #include <linux/bpf_verifier.h>
+#include <linux/bpf-link.h>
 #include <linux/btf.h>
 #include <linux/syscalls.h>
 #include <linux/slab.h>
diff --git a/net/core/dev.c b/net/core/dev.c
index 4420086f3aeb..d8e51e826852 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -93,6 +93,7 @@
 #include <linux/skbuff.h>
 #include <linux/kthread.h>
 #include <linux/bpf.h>
+#include <linux/bpf-link.h>
 #include <linux/bpf_trace.h>
 #include <net/net_namespace.h>
 #include <net/sock.h>
-- 
2.31.1


      parent reply	other threads:[~2021-12-13 23:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 23:42 [PATCH bpf-next 0/5] bpf: remove the cgroup -> bpf header dependecy Jakub Kicinski
2021-12-13 23:42 ` [PATCH bpf-next 1/5] bpf: add header for enum bpf_cgroup_storage_type Jakub Kicinski
2021-12-13 23:42 ` [PATCH bpf-next 2/5] bpf: create a header for cgroup_storage_type() Jakub Kicinski
2021-12-13 23:42 ` [PATCH bpf-next 3/5] bpf: create a header for struct bpf_link Jakub Kicinski
2021-12-14  5:15   ` Alexei Starovoitov
2021-12-14 15:04     ` Jakub Kicinski
2021-12-14 15:18       ` Jakub Kicinski
2021-12-14 15:24         ` Jakub Kicinski
2021-12-13 23:42 ` [PATCH bpf-next 4/5] bpf: remove the cgroup -> bpf header dependecy Jakub Kicinski
2021-12-14 19:27   ` kernel test robot
2021-12-14 19:27     ` kernel test robot
2021-12-13 23:42 ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211213234223.356977-6-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.