Merge branch 'Support static initialization of BPF_MAP_TYPE_PROG_ARRAY'
Hengqi Chen says:
====================
Make libbpf support static initialization of BPF_MAP_TYPE_PROG_ARRAY
with a syntax similar to map-in-map initialization:
SEC("socket")
int tailcall_1(void *ctx)
{
return 0;
}
struct {
__uint(type, BPF_MAP_TYPE_PROG_ARRAY);
__uint(max_entries, 2);
__uint(key_size, sizeof(__u32));
__array(values, int (void *));
} prog_array_init SEC(".maps") = {
.values = {
[1] = (void *)&tailcall_1,
},
};
v1->v2:
- Add stricter checks on relos collect, some renamings (Andrii)
- Update selftest to check tailcall result (Andrii)
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Please register or sign in to comment