Lines Matching refs:map_fd
190 static void __hid_bpf_do_release_prog(int map_fd, unsigned int idx) in __hid_bpf_do_release_prog() argument
192 skel_map_delete_elem(map_fd, &idx); in __hid_bpf_do_release_prog()
198 int i, j, n, map_fd = -1; in hid_bpf_release_progs() local
204 map_fd = skel_map_get_fd_by_id(jmp_table.map->id); in hid_bpf_release_progs()
205 if (map_fd < 0) in hid_bpf_release_progs()
253 __hid_bpf_do_release_prog(map_fd, entry->idx); in hid_bpf_release_progs()
272 if (map_fd >= 0) in hid_bpf_release_progs()
273 close_fd(map_fd); in hid_bpf_release_progs()
278 int map_fd = -1; in hid_bpf_release_prog_at() local
281 map_fd = skel_map_get_fd_by_id(jmp_table.map->id); in hid_bpf_release_prog_at()
282 if (map_fd < 0) in hid_bpf_release_prog_at()
285 __hid_bpf_do_release_prog(map_fd, idx); in hid_bpf_release_prog_at()
287 close(map_fd); in hid_bpf_release_prog_at()
296 int i, index = -1, map_fd = -1, err = -EINVAL; in hid_bpf_insert_prog() local
299 map_fd = skel_map_get_fd_by_id(jmp_table.map->id); in hid_bpf_insert_prog()
301 if (map_fd < 0) { in hid_bpf_insert_prog()
321 err = skel_map_update_elem(map_fd, &index, &prog_fd, 0); in hid_bpf_insert_prog()
330 __hid_bpf_do_release_prog(map_fd, index); in hid_bpf_insert_prog()
331 if (map_fd >= 0) in hid_bpf_insert_prog()
332 close_fd(map_fd); in hid_bpf_insert_prog()
553 jmp_table.map = bpf_map_get_with_uref(skel->maps.hid_jmp_table.map_fd); in hid_bpf_preload_skel()