lkml.org 
[lkml]   [2024]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH bpf-next v1] bpf,arena: Rename the kfunc set variable
Date
Rename the kfunc set variable to specify the 'arena' function scope,
although the 'UNSPEC' type BPF program is mapped to 'COMMON' hook.

And there is 'common_kfunc_set' defined for real 'common' function in
file 'kernel/bpf/helpers.c'.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
kernel/bpf/arena.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/bpf/arena.c b/kernel/bpf/arena.c
index 6c81630c5293..ef2177c0465f 100644
--- a/kernel/bpf/arena.c
+++ b/kernel/bpf/arena.c
@@ -557,13 +557,13 @@ BTF_ID_FLAGS(func, bpf_arena_alloc_pages, KF_TRUSTED_ARGS | KF_SLEEPABLE)
BTF_ID_FLAGS(func, bpf_arena_free_pages, KF_TRUSTED_ARGS | KF_SLEEPABLE)
BTF_KFUNCS_END(arena_kfuncs)

-static const struct btf_kfunc_id_set common_kfunc_set = {
+static const struct btf_kfunc_id_set arena_kfunc_set = {
.owner = THIS_MODULE,
.set = &arena_kfuncs,
};

static int __init kfunc_init(void)
{
- return register_btf_kfunc_id_set(BPF_PROG_TYPE_UNSPEC, &common_kfunc_set);
+ return register_btf_kfunc_id_set(BPF_PROG_TYPE_UNSPEC, &arena_kfunc_set);
}
late_initcall(kfunc_init);
--
2.43.2

\
 
 \ /
  Last update: 2024-05-27 18:17    [W:4.578 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site