bpf-program: export hash_ops for BPFProgam objects

This commit is contained in:
Lennart Poettering
2021-06-08 22:02:35 +02:00
parent 06ad9d0c12
commit 7a7cf83dc3
3 changed files with 6 additions and 4 deletions
+2
View File
@@ -36,6 +36,8 @@ static const char *const bpf_cgroup_attach_type_table[__MAX_BPF_ATTACH_TYPE] = {
DEFINE_STRING_TABLE_LOOKUP(bpf_cgroup_attach_type, int);
DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(bpf_program_hash_ops, void, trivial_hash_func, trivial_compare_func, bpf_program_unref);
/* struct bpf_prog_info info must be initialized since its value is both input and output
* for BPF_OBJ_GET_INFO_BY_FD syscall. */
static int bpf_program_get_info_by_fd(int prog_fd, struct bpf_prog_info *info, uint32_t info_len) {