Skip to content

Commit 5e67b8e

Browse files
yonghong-songAlexei Starovoitov
authored andcommitted
bpf: Make struct cgroup btf id global
Make struct cgroup btf id global so later patch can reuse the same btf id. Acked-by: David Vernet <[email protected]> Signed-off-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent fdf4578 commit 5e67b8e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/linux/btf_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,6 @@ MAX_BTF_TRACING_TYPE,
265265
};
266266

267267
extern u32 btf_tracing_ids[];
268+
extern u32 bpf_cgroup_btf_id[];
268269

269270
#endif

kernel/bpf/cgroup_iter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static const struct seq_operations cgroup_iter_seq_ops = {
157157
.show = cgroup_iter_seq_show,
158158
};
159159

160-
BTF_ID_LIST_SINGLE(bpf_cgroup_btf_id, struct, cgroup)
160+
BTF_ID_LIST_GLOBAL_SINGLE(bpf_cgroup_btf_id, struct, cgroup)
161161

162162
static int cgroup_iter_seq_init(void *priv, struct bpf_iter_aux_info *aux)
163163
{

0 commit comments

Comments
 (0)