[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210528195946.2375109-3-memxor@gmail.com>
Date: Sat, 29 May 2021 01:29:41 +0530
From: Kumar Kartikeya Dwivedi <memxor@...il.com>
To: bpf@...r.kernel.org
Cc: Kumar Kartikeya Dwivedi <memxor@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Vlad Buslov <vladbu@...dia.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Joe Stringer <joe@...ium.io>,
Quentin Monnet <quentin@...valent.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
netdev@...r.kernel.org
Subject: [PATCH RFC bpf-next 2/7] bpf: export bpf_link functions for modules
These are required in a subsequent patch to implement the bpf_link
command for cls_bpf. Since the bpf_link object is tied to the
cls_bpf_prog object, it has to be initialized and managed from inside
the module.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@...il.com>
---
kernel/bpf/syscall.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 50457019da27..e5934b748ced 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -2338,6 +2338,7 @@ void bpf_link_init(struct bpf_link *link, enum bpf_link_type type,
link->ops = ops;
link->prog = prog;
}
+EXPORT_SYMBOL_GPL(bpf_link_init);
static void bpf_link_free_id(int id)
{
@@ -2363,6 +2364,7 @@ void bpf_link_cleanup(struct bpf_link_primer *primer)
fput(primer->file);
put_unused_fd(primer->fd);
}
+EXPORT_SYMBOL_GPL(bpf_link_cleanup);
void bpf_link_inc(struct bpf_link *link)
{
@@ -2510,6 +2512,7 @@ int bpf_link_prime(struct bpf_link *link, struct bpf_link_primer *primer)
primer->id = id;
return 0;
}
+EXPORT_SYMBOL_GPL(bpf_link_prime);
int bpf_link_settle(struct bpf_link_primer *primer)
{
@@ -2522,6 +2525,7 @@ int bpf_link_settle(struct bpf_link_primer *primer)
/* pass through installed FD */
return primer->fd;
}
+EXPORT_SYMBOL_GPL(bpf_link_settle);
int bpf_link_new_fd(struct bpf_link *link)
{
--
2.31.1
Powered by blists - more mailing lists