map_fd 390 include/uapi/linux/bpf.h __u32 map_fd; map_fd 743 kernel/bpf/syscall.c int ufd = attr->map_fd; map_fd 878 kernel/bpf/syscall.c int ufd = attr->map_fd; map_fd 990 kernel/bpf/syscall.c int ufd = attr->map_fd; map_fd 1041 kernel/bpf/syscall.c int ufd = attr->map_fd; map_fd 1107 kernel/bpf/syscall.c int ufd = attr->map_fd; map_fd 1165 kernel/bpf/syscall.c #define BPF_MAP_FREEZE_LAST_FIELD map_fd map_fd 1169 kernel/bpf/syscall.c int err = 0, ufd = attr->map_fd; map_fd 36 samples/bpf/bpf_load.c int map_fd[MAX_MAPS]; map_fd 275 samples/bpf/bpf_load.c map_fd[i] = maps[i].fd; map_fd 285 samples/bpf/bpf_load.c int inner_map_fd = map_fd[maps[i].def.inner_map_idx]; map_fd 287 samples/bpf/bpf_load.c map_fd[i] = bpf_create_map_in_map_node(maps[i].def.type, map_fd 295 samples/bpf/bpf_load.c map_fd[i] = bpf_create_map_node(maps[i].def.type, map_fd 303 samples/bpf/bpf_load.c if (map_fd[i] < 0) { map_fd 308 samples/bpf/bpf_load.c maps[i].fd = map_fd[i]; map_fd 311 samples/bpf/bpf_load.c prog_array_fd = map_fd[i]; map_fd 37 samples/bpf/bpf_load.h extern int map_fd[MAX_MAPS]; map_fd 64 samples/bpf/cookie_uid_helper_example.c static int map_fd, prog_fd; map_fd 70 samples/bpf/cookie_uid_helper_example.c map_fd = bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(uint32_t), map_fd 72 samples/bpf/cookie_uid_helper_example.c if (map_fd < 0) map_fd 100 samples/bpf/cookie_uid_helper_example.c BPF_LD_MAP_FD(BPF_REG_1, map_fd), map_fd 135 samples/bpf/cookie_uid_helper_example.c BPF_LD_MAP_FD(BPF_REG_1, map_fd), map_fd 194 samples/bpf/cookie_uid_helper_example.c while (bpf_map_get_next_key(map_fd, &curN, &nextN) > -1) { map_fd 196 samples/bpf/cookie_uid_helper_example.c res = bpf_map_lookup_elem(map_fd, &curN, &curEntry); map_fd 236 samples/bpf/cookie_uid_helper_example.c res = bpf_map_lookup_elem(map_fd, &cookie, &dataEntry); map_fd 255 samples/bpf/cookie_uid_helper_example.c res = bpf_map_lookup_elem(map_fd, &cookie, &dataEntry); map_fd 321 samples/bpf/cookie_uid_helper_example.c close(map_fd); map_fd 184 samples/bpf/cpustat_user.c cpu_stat_update(map_fd[1], map_fd[2]); map_fd 213 samples/bpf/cpustat_user.c cpu_stat_update(map_fd[1], map_fd[2]); map_fd 129 samples/bpf/hbm.c int map_fd; map_fd 142 samples/bpf/hbm.c map_fd = bpf_map__fd(map); map_fd 143 samples/bpf/hbm.c if (map_fd < 0) { map_fd 144 samples/bpf/hbm.c printf("Map not found: %s\n", strerror(map_fd)); map_fd 154 samples/bpf/hbm.c ret = map_fd; map_fd 162 samples/bpf/hbm.c int map_fd; map_fd 171 samples/bpf/hbm.c map_fd = prog_load(prog); map_fd 172 samples/bpf/hbm.c if (map_fd == -1) map_fd 193 samples/bpf/hbm.c if (bpf_map_update_elem(map_fd, &key, &qstats, BPF_ANY)) { map_fd 216 samples/bpf/hbm.c bpf_map_lookup_elem(map_fd, &key, &qstats); map_fd 245 samples/bpf/hbm.c bpf_map_lookup_elem(map_fd, &key, &qstats); map_fd 292 samples/bpf/hbm.c if (bpf_map_update_elem(map_fd, &key, &qstats, BPF_ANY)) map_fd 299 samples/bpf/hbm.c if (stats_flag && bpf_map_lookup_elem(map_fd, &key, &qstats)) { map_fd 48 samples/bpf/ibumad_user.c dump_counts(map_fd[0]); map_fd 50 samples/bpf/ibumad_user.c dump_counts(map_fd[1]); map_fd 94 samples/bpf/lathist_user.c get_data(map_fd[1]); map_fd 36 samples/bpf/lwt_len_hist_user.c int i, map_fd; map_fd 38 samples/bpf/lwt_len_hist_user.c map_fd = bpf_obj_get(map_filename); map_fd 39 samples/bpf/lwt_len_hist_user.c if (map_fd < 0) { map_fd 45 samples/bpf/lwt_len_hist_user.c while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) { map_fd 51 samples/bpf/lwt_len_hist_user.c bpf_map_lookup_elem(map_fd, &next_key, values); map_fd 74 samples/bpf/lwt_len_hist_user.c close(map_fd); map_fd 92 samples/bpf/map_perf_test_user.c int fd = map_fd[lru_hash_lookup_idx]; map_fd 126 samples/bpf/map_perf_test_user.c int outer_fd = map_fd[array_of_lru_hashs_idx]; map_fd 148 samples/bpf/map_perf_test_user.c inner_lru_map_fds[cpu] = map_fd[inner_lru_hash_idx]; map_fd 380 samples/bpf/map_perf_test_user.c r = bpf_map_update_elem(map_fd[6], key, &value, 0); map_fd 391 samples/bpf/map_perf_test_user.c r = bpf_map_update_elem(map_fd[6], key, &value, 0); map_fd 55 samples/bpf/offwaketime_user.c if (bpf_map_lookup_elem(map_fd[3], &key->tret, ip) != 0) { map_fd 62 samples/bpf/offwaketime_user.c if (bpf_map_lookup_elem(map_fd[3], &key->wret, ip) != 0) { map_fd 92 samples/bpf/offwaketime_user.c print_stacks(map_fd[0]); map_fd 121 samples/bpf/offwaketime_user.c print_stacks(map_fd[0]); map_fd 131 samples/bpf/sampleip_user.c print_ip_map(map_fd[0]); map_fd 197 samples/bpf/sampleip_user.c print_ip_map(map_fd[0]); map_fd 37 samples/bpf/sock_example.c int sock = -1, map_fd, prog_fd, i, key; map_fd 40 samples/bpf/sock_example.c map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key), sizeof(value), map_fd 42 samples/bpf/sock_example.c if (map_fd < 0) { map_fd 53 samples/bpf/sock_example.c BPF_LD_MAP_FD(BPF_REG_1, map_fd), map_fd 80 samples/bpf/sock_example.c assert(bpf_map_lookup_elem(map_fd, &key, &tcp_cnt) == 0); map_fd 83 samples/bpf/sock_example.c assert(bpf_map_lookup_elem(map_fd, &key, &udp_cnt) == 0); map_fd 86 samples/bpf/sock_example.c assert(bpf_map_lookup_elem(map_fd, &key, &icmp_cnt) == 0); map_fd 14 samples/bpf/sockex1_user.c int map_fd, prog_fd; map_fd 25 samples/bpf/sockex1_user.c map_fd = bpf_object__find_map_fd_by_name(obj, "my_map"); map_fd 40 samples/bpf/sockex1_user.c assert(bpf_map_lookup_elem(map_fd, &key, &tcp_cnt) == 0); map_fd 43 samples/bpf/sockex1_user.c assert(bpf_map_lookup_elem(map_fd, &key, &udp_cnt) == 0); map_fd 46 samples/bpf/sockex1_user.c assert(bpf_map_lookup_elem(map_fd, &key, &icmp_cnt) == 0); map_fd 21 samples/bpf/sockex2_user.c int map_fd, prog_fd; map_fd 33 samples/bpf/sockex2_user.c map_fd = bpf_object__find_map_fd_by_name(obj, "hash_map"); map_fd 47 samples/bpf/sockex2_user.c while (bpf_map_get_next_key(map_fd, &key, &next_key) == 0) { map_fd 48 samples/bpf/sockex2_user.c bpf_map_lookup_elem(map_fd, &next_key, &value); map_fd 14 samples/bpf/sockex3_user.c #define PROG_ARRAY_FD (map_fd[0]) map_fd 72 samples/bpf/sockex3_user.c while (bpf_map_get_next_key(map_fd[2], &key, &next_key) == 0) { map_fd 73 samples/bpf/sockex3_user.c bpf_map_lookup_elem(map_fd[2], &next_key, &value); map_fd 36 samples/bpf/spintest_user.c while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) { map_fd 37 samples/bpf/spintest_user.c bpf_map_lookup_elem(map_fd[0], &next_key, &value); map_fd 51 samples/bpf/spintest_user.c while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) map_fd 52 samples/bpf/spintest_user.c bpf_map_delete_elem(map_fd[0], &next_key); map_fd 59 samples/bpf/syscall_tp_user.c printf("prog #%d: map ids %d %d\n", i, map_fd[0], map_fd[1]); map_fd 60 samples/bpf/syscall_tp_user.c map0_fds[i] = map_fd[0]; map_fd 61 samples/bpf/syscall_tp_user.c map1_fds[i] = map_fd[1]; map_fd 42 samples/bpf/test_cgrp2_attach.c static int prog_load(int map_fd, int verdict) map_fd 52 samples/bpf/test_cgrp2_attach.c BPF_LD_MAP_FD(BPF_REG_1, map_fd), /* load map fd to r1 */ map_fd 63 samples/bpf/test_cgrp2_attach.c BPF_LD_MAP_FD(BPF_REG_1, map_fd), map_fd 89 samples/bpf/test_cgrp2_attach.c int prog_fd, map_fd, ret, key; map_fd 92 samples/bpf/test_cgrp2_attach.c map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, map_fd 95 samples/bpf/test_cgrp2_attach.c if (map_fd < 0) { map_fd 100 samples/bpf/test_cgrp2_attach.c prog_fd = prog_load(map_fd, verdict); map_fd 116 samples/bpf/test_cgrp2_attach.c assert(bpf_map_lookup_elem(map_fd, &key, &pkt_cnt) == 0); map_fd 119 samples/bpf/test_cgrp2_attach.c assert(bpf_map_lookup_elem(map_fd, &key, &byte_cnt) == 0); map_fd 35 samples/bpf/test_current_task_under_cgroup_user.c if (bpf_map_update_elem(map_fd[0], &idx, &cg2, BPF_ANY)) { map_fd 49 samples/bpf/test_current_task_under_cgroup_user.c bpf_map_lookup_elem(map_fd[1], &idx, &remote_pid); map_fd 63 samples/bpf/test_current_task_under_cgroup_user.c bpf_map_update_elem(map_fd[1], &idx, &remote_pid, BPF_ANY); map_fd 66 samples/bpf/test_current_task_under_cgroup_user.c bpf_map_lookup_elem(map_fd[1], &idx, &remote_pid); map_fd 102 samples/bpf/test_lru_dist.c int map_fd; map_fd 108 samples/bpf/test_lru_dist.c lru->map_fd = bpf_create_map(BPF_MAP_TYPE_HASH, map_fd 112 samples/bpf/test_lru_dist.c assert(lru->map_fd != -1); map_fd 125 samples/bpf/test_lru_dist.c close(lru->map_fd); map_fd 136 samples/bpf/test_lru_dist.c if (!bpf_map_lookup_elem(lru->map_fd, &key, &node)) { map_fd 153 samples/bpf/test_lru_dist.c bpf_map_update_elem(lru->map_fd, &node->key, &null_node, BPF_EXIST); map_fd 161 samples/bpf/test_lru_dist.c assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_EXIST)); map_fd 164 samples/bpf/test_lru_dist.c assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_NOEXIST)); map_fd 210 samples/bpf/test_lru_dist.c int map_fd; map_fd 212 samples/bpf/test_lru_dist.c map_fd = bpf_create_map(map_type, sizeof(unsigned long long), map_fd 215 samples/bpf/test_lru_dist.c if (map_fd == -1) map_fd 218 samples/bpf/test_lru_dist.c return map_fd; map_fd 341 samples/bpf/test_lru_dist.c int map_fd; map_fd 349 samples/bpf/test_lru_dist.c map_fd = create_map(map_type, map_flags, 900 * nr_cpus); map_fd 351 samples/bpf/test_lru_dist.c map_fd = create_map(map_type, map_flags, 900); map_fd 353 samples/bpf/test_lru_dist.c assert(map_fd != -1); map_fd 360 samples/bpf/test_lru_dist.c assert(bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST) == 0); map_fd 366 samples/bpf/test_lru_dist.c bpf_map_lookup_elem(map_fd, &start_key, value); map_fd 372 samples/bpf/test_lru_dist.c if (bpf_map_lookup_elem(map_fd, &key, value)) { map_fd 382 samples/bpf/test_lru_dist.c close(map_fd); map_fd 392 samples/bpf/test_lru_dist.c int map_fd; map_fd 401 samples/bpf/test_lru_dist.c map_fd = create_map(map_type, map_flags, 1000 * nr_cpus); map_fd 403 samples/bpf/test_lru_dist.c map_fd = create_map(map_type, map_flags, 1000); map_fd 405 samples/bpf/test_lru_dist.c assert(map_fd != -1); map_fd 410 samples/bpf/test_lru_dist.c assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); map_fd 413 samples/bpf/test_lru_dist.c if (bpf_map_lookup_elem(map_fd, &key, value)) map_fd 417 samples/bpf/test_lru_dist.c close(map_fd); map_fd 427 samples/bpf/test_lru_dist.c int map_fd = *(int *)data; map_fd 438 samples/bpf/test_lru_dist.c assert(bpf_map_update_elem(map_fd, &next_ins_key, value, map_fd 450 samples/bpf/test_lru_dist.c bpf_map_lookup_elem(map_fd, &key, value); map_fd 452 samples/bpf/test_lru_dist.c bpf_map_update_elem(map_fd, &next_ins_key, value, map_fd 460 samples/bpf/test_lru_dist.c if (bpf_map_lookup_elem(map_fd, &key, value)) map_fd 470 samples/bpf/test_lru_dist.c int map_fd; map_fd 477 samples/bpf/test_lru_dist.c map_fd = create_map(map_type, map_flags, map_fd 480 samples/bpf/test_lru_dist.c map_fd = create_map(map_type, map_flags, map_fd 483 samples/bpf/test_lru_dist.c assert(map_fd != -1); map_fd 485 samples/bpf/test_lru_dist.c run_parallel(nr_tasks, do_test_parallel_lru_loss, &map_fd); map_fd 487 samples/bpf/test_lru_dist.c close(map_fd); map_fd 16 samples/bpf/test_map_in_map_user.c #define PORT_A (map_fd[0]) map_fd 17 samples/bpf/test_map_in_map_user.c #define PORT_H (map_fd[1]) map_fd 18 samples/bpf/test_map_in_map_user.c #define REG_RESULT_H (map_fd[2]) map_fd 19 samples/bpf/test_map_in_map_user.c #define INLINE_RESULT_H (map_fd[3]) map_fd 20 samples/bpf/test_map_in_map_user.c #define A_OF_PORT_A (map_fd[4]) /* Test case #0 */ map_fd 21 samples/bpf/test_map_in_map_user.c #define H_OF_PORT_A (map_fd[5]) /* Test case #1 */ map_fd 22 samples/bpf/test_map_in_map_user.c #define H_OF_PORT_H (map_fd[6]) /* Test case #2 */ map_fd 54 samples/bpf/test_probe_write_user_user.c assert(!bpf_map_update_elem(map_fd[0], &mapped_addr, &serv_addr, BPF_ANY)); map_fd 68 samples/bpf/trace_event_user.c if (bpf_map_lookup_elem(map_fd[1], &key->kernstack, ip) != 0) { map_fd 75 samples/bpf/trace_event_user.c if (bpf_map_lookup_elem(map_fd[1], &key->userstack, ip) != 0) { map_fd 105 samples/bpf/trace_event_user.c int fd = map_fd[0], stack_map = map_fd[1]; map_fd 73 samples/bpf/trace_output_user.c pb = perf_buffer__new(map_fd[0], 8, &pb_opts); map_fd 111 samples/bpf/tracex2_user.c print_hist(map_fd[1]); map_fd 148 samples/bpf/tracex2_user.c while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) { map_fd 149 samples/bpf/tracex2_user.c bpf_map_lookup_elem(map_fd[0], &next_key, &value); map_fd 157 samples/bpf/tracex2_user.c print_hist(map_fd[1]); map_fd 156 samples/bpf/tracex3_user.c print_hist(map_fd[1]); map_fd 39 samples/bpf/tracex4_user.c while (bpf_map_get_next_key(map_fd[0], &key, &next_key) == 0) { map_fd 40 samples/bpf/tracex4_user.c bpf_map_lookup_elem(map_fd[0], &next_key, &v); map_fd 69 samples/bpf/tracex4_user.c print_old_objects(map_fd[1]); map_fd 42 samples/bpf/tracex6_user.c assert(bpf_map_update_elem(map_fd[0], &cpu, &pmu_fd, BPF_ANY) == 0); map_fd 45 samples/bpf/tracex6_user.c bpf_map_get_next_key(map_fd[1], &cpu, NULL); map_fd 47 samples/bpf/tracex6_user.c if (bpf_map_lookup_elem(map_fd[1], &cpu, &value)) { map_fd 55 samples/bpf/tracex6_user.c if (bpf_map_lookup_elem(map_fd[2], &cpu, &value2)) { map_fd 65 samples/bpf/tracex6_user.c assert(bpf_map_delete_elem(map_fd[0], &cpu) == 0 || error); map_fd 68 samples/bpf/tracex6_user.c assert(bpf_map_delete_elem(map_fd[1], &cpu) == 0 || error); map_fd 44 samples/bpf/xdp1_user.c static void poll_stats(int map_fd, int interval) map_fd 55 samples/bpf/xdp1_user.c while (bpf_map_get_next_key(map_fd, &key, &key) != -1) { map_fd 58 samples/bpf/xdp1_user.c assert(bpf_map_lookup_elem(map_fd, &key, values) == 0); map_fd 89 samples/bpf/xdp1_user.c int prog_fd, map_fd, opt; map_fd 139 samples/bpf/xdp1_user.c map_fd = bpf_map__fd(map); map_fd 161 samples/bpf/xdp1_user.c poll_stats(map_fd, 2); map_fd 52 samples/bpf/xdp_adjust_tail_user.c static void poll_stats(unsigned int map_fd, unsigned int kill_after_s) map_fd 62 samples/bpf/xdp_adjust_tail_user.c assert(bpf_map_lookup_elem(map_fd, &key, &value) == 0); map_fd 92 samples/bpf/xdp_adjust_tail_user.c int i, prog_fd, map_fd, opt; map_fd 158 samples/bpf/xdp_adjust_tail_user.c map_fd = bpf_map__fd(map); map_fd 180 samples/bpf/xdp_adjust_tail_user.c poll_stats(map_fd, kill_after_s); map_fd 30 samples/bpf/xdp_fwd_user.c static int do_attach(int idx, int prog_fd, int map_fd, const char *name) map_fd 41 samples/bpf/xdp_fwd_user.c err = bpf_map_update_elem(map_fd, &idx, &idx, 0); map_fd 79 samples/bpf/xdp_fwd_user.c int prog_fd, map_fd = -1; map_fd 130 samples/bpf/xdp_fwd_user.c map_fd = bpf_map__fd(bpf_object__find_map_by_name(obj, map_fd 132 samples/bpf/xdp_fwd_user.c if (map_fd < 0) { map_fd 133 samples/bpf/xdp_fwd_user.c printf("map not found: %s\n", strerror(map_fd)); map_fd 152 samples/bpf/xdp_fwd_user.c err = do_attach(idx, prog_fd, map_fd, argv[i]); map_fd 466 samples/bpf/xdp_rxq_info_user.c int prog_fd, map_fd, opt, err; map_fd 499 samples/bpf/xdp_rxq_info_user.c map_fd = bpf_map__fd(map); map_fd 584 samples/bpf/xdp_rxq_info_user.c err = bpf_map_update_elem(map_fd, &key, &cfg, 0); map_fd 119 samples/bpf/xdp_sample_pkts_user.c int prog_fd, map_fd, opt; map_fd 162 samples/bpf/xdp_sample_pkts_user.c map_fd = bpf_map__fd(map); map_fd 185 samples/bpf/xdp_sample_pkts_user.c pb = perf_buffer__new(map_fd, 8, &pb_opts); map_fd 136 tools/bpf/bpftool/map_perf_ring.c int err, map_fd; map_fd 139 tools/bpf/bpftool/map_perf_ring.c map_fd = map_parse_fd_and_info(&argc, &argv, &map_info, &map_info_len); map_fd 140 tools/bpf/bpftool/map_perf_ring.c if (map_fd < 0) map_fd 201 tools/bpf/bpftool/map_perf_ring.c pb = perf_buffer__new_raw(map_fd, MMAP_PAGE_CNT, &opts); map_fd 229 tools/bpf/bpftool/map_perf_ring.c close(map_fd); map_fd 236 tools/bpf/bpftool/map_perf_ring.c close(map_fd); map_fd 390 tools/include/uapi/linux/bpf.h __u32 map_fd; map_fd 363 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 376 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 388 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 401 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 413 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 424 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 436 tools/lib/bpf/bpf.c attr.map_fd = fd; map_fd 5335 tools/lib/bpf/libbpf.c int map_fd; /* BPF_MAP_TYPE_PERF_EVENT_ARRAY BPF map FD */ map_fd 5364 tools/lib/bpf/libbpf.c bpf_map_delete_elem(pb->map_fd, &cpu_buf->map_key); map_fd 5425 tools/lib/bpf/libbpf.c static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt, map_fd 5428 tools/lib/bpf/libbpf.c struct perf_buffer *perf_buffer__new(int map_fd, size_t page_cnt, map_fd 5445 tools/lib/bpf/libbpf.c return __perf_buffer__new(map_fd, page_cnt, &p); map_fd 5449 tools/lib/bpf/libbpf.c perf_buffer__new_raw(int map_fd, size_t page_cnt, map_fd 5461 tools/lib/bpf/libbpf.c return __perf_buffer__new(map_fd, page_cnt, &p); map_fd 5464 tools/lib/bpf/libbpf.c static struct perf_buffer *__perf_buffer__new(int map_fd, size_t page_cnt, map_fd 5480 tools/lib/bpf/libbpf.c err = bpf_obj_get_info_by_fd(map_fd, &map, &map_info_len); map_fd 5484 tools/lib/bpf/libbpf.c map_fd, libbpf_strerror_r(err, msg, sizeof(msg))); map_fd 5505 tools/lib/bpf/libbpf.c pb->map_fd = map_fd; map_fd 5555 tools/lib/bpf/libbpf.c err = bpf_map_update_elem(pb->map_fd, &map_key, map_fd 379 tools/lib/bpf/libbpf.h perf_buffer__new(int map_fd, size_t page_cnt, map_fd 3144 tools/perf/builtin-trace.c int map_fd = bpf_map__fd(map); map_fd 3148 tools/perf/builtin-trace.c err = bpf_map_update_elem(map_fd, &pids[i], &value, BPF_ANY); map_fd 1256 tools/perf/util/bpf-loader.c typedef int (*map_config_func_t)(const char *name, int map_fd, map_fd 1264 tools/perf/util/bpf-loader.c int map_fd, const struct bpf_map_def *pdef, map_fd 1271 tools/perf/util/bpf-loader.c err = func(name, map_fd, pdef, op, &i, arg); map_fd 1283 tools/perf/util/bpf-loader.c const char *name, int map_fd, map_fd 1297 tools/perf/util/bpf-loader.c err = func(name, map_fd, pdef, op, &idx, arg); map_fd 1313 tools/perf/util/bpf-loader.c int err, map_fd; map_fd 1333 tools/perf/util/bpf-loader.c map_fd = bpf_map__fd(map); map_fd 1334 tools/perf/util/bpf-loader.c if (map_fd < 0) { map_fd 1336 tools/perf/util/bpf-loader.c return map_fd; map_fd 1346 tools/perf/util/bpf-loader.c map_fd, def, op); map_fd 1350 tools/perf/util/bpf-loader.c map_fd, def, map_fd 1371 tools/perf/util/bpf-loader.c apply_config_value_for_key(int map_fd, void *pkey, map_fd 1379 tools/perf/util/bpf-loader.c err = bpf_map_update_elem(map_fd, pkey, &_val, BPF_ANY); map_fd 1384 tools/perf/util/bpf-loader.c err = bpf_map_update_elem(map_fd, pkey, &_val, BPF_ANY); map_fd 1389 tools/perf/util/bpf-loader.c err = bpf_map_update_elem(map_fd, pkey, &_val, BPF_ANY); map_fd 1393 tools/perf/util/bpf-loader.c err = bpf_map_update_elem(map_fd, pkey, &val, BPF_ANY); map_fd 1406 tools/perf/util/bpf-loader.c apply_config_evsel_for_key(const char *name, int map_fd, void *pkey, map_fd 1452 tools/perf/util/bpf-loader.c err = bpf_map_update_elem(map_fd, pkey, evt_fd, BPF_ANY); map_fd 1459 tools/perf/util/bpf-loader.c apply_obj_config_map_for_key(const char *name, int map_fd, map_fd 1468 tools/perf/util/bpf-loader.c err = apply_config_value_for_key(map_fd, pkey, map_fd 1473 tools/perf/util/bpf-loader.c err = apply_config_evsel_for_key(name, map_fd, pkey, map_fd 148 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int btf_fd, map_fd; map_fd 155 tools/testing/selftests/bpf/map_tests/sk_storage_map.c map_fd = bpf_create_map_xattr(&xattr); map_fd 158 tools/testing/selftests/bpf/map_tests/sk_storage_map.c CHECK(map_fd == -1, map_fd 161 tools/testing/selftests/bpf/map_tests/sk_storage_map.c return map_fd; map_fd 170 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int i, map_fd, err, *sk_fds; map_fd 185 tools/testing/selftests/bpf/map_tests/sk_storage_map.c map_fd = READ_ONCE(sk_storage_map); map_fd 193 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fds[i], &value, map_fd 229 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int i, map_fd = -1, err = 0, nr_threads_created = 0; map_fd 250 tools/testing/selftests/bpf/map_tests/sk_storage_map.c map_fd = create_sk_storage_map(); map_fd 251 tools/testing/selftests/bpf/map_tests/sk_storage_map.c WRITE_ONCE(sk_storage_map, map_fd); map_fd 257 tools/testing/selftests/bpf/map_tests/sk_storage_map.c close(map_fd); map_fd 258 tools/testing/selftests/bpf/map_tests/sk_storage_map.c map_fd = -1; map_fd 275 tools/testing/selftests/bpf/map_tests/sk_storage_map.c if (map_fd != -1) map_fd 276 tools/testing/selftests/bpf/map_tests/sk_storage_map.c close(map_fd); map_fd 287 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int map_fd = READ_ONCE(sk_storage_map); map_fd 292 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, 0); map_fd 311 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int map_fd = READ_ONCE(sk_storage_map); map_fd 316 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_delete_elem(map_fd, &sk_fd); map_fd 335 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int i, sk_fd, map_fd = -1, err = 0, nr_threads_created = 0; map_fd 351 tools/testing/selftests/bpf/map_tests/sk_storage_map.c map_fd = create_sk_storage_map(); map_fd 352 tools/testing/selftests/bpf/map_tests/sk_storage_map.c WRITE_ONCE(sk_storage_map, map_fd); map_fd 383 tools/testing/selftests/bpf/map_tests/sk_storage_map.c close(map_fd); map_fd 467 tools/testing/selftests/bpf/map_tests/sk_storage_map.c int btf_fd, map_fd, sk_fd, err; map_fd 478 tools/testing/selftests/bpf/map_tests/sk_storage_map.c map_fd = bpf_create_map_xattr(&xattr); map_fd 479 tools/testing/selftests/bpf/map_tests/sk_storage_map.c CHECK(map_fd == -1, "bpf_create_map_xattr(good_xattr)", map_fd 480 tools/testing/selftests/bpf/map_tests/sk_storage_map.c "map_fd:%d errno:%d\n", map_fd, errno); map_fd 484 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, map_fd 488 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_lookup_elem_flags(map_fd, &sk_fd, &lookup_value, map_fd 497 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, map_fd 501 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_lookup_elem_flags(map_fd, &sk_fd, &lookup_value, map_fd 510 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, BPF_EXIST); map_fd 513 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_lookup_elem_flags(map_fd, &sk_fd, &lookup_value, map_fd 522 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, map_fd 527 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, BPF_NOEXIST); map_fd 531 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_lookup_elem_flags(map_fd, &sk_fd, &lookup_value, map_fd 540 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_update_elem(map_fd, &sk_fd, &value, 0); map_fd 543 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_lookup_elem_flags(map_fd, &sk_fd, &lookup_value, map_fd 551 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_delete_elem(map_fd, &sk_fd); map_fd 554 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_lookup_elem_flags(map_fd, &sk_fd, &lookup_value, map_fd 559 tools/testing/selftests/bpf/map_tests/sk_storage_map.c err = bpf_map_delete_elem(map_fd, &sk_fd); map_fd 589 tools/testing/selftests/bpf/map_tests/sk_storage_map.c close(map_fd); map_fd 207 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c int map_fd; map_fd 211 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c map_fd = bpf_map_get_fd_by_id(next_id); map_fd 212 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c if (map_fd < 0 && errno == ENOENT) map_fd 215 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c if (CHECK(map_fd < 0, "get-map-fd(next_id)", map_fd 217 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c map_fd, next_id, errno)) map_fd 229 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c err = bpf_map_lookup_elem(map_fd, &array_key, &array_value); map_fd 233 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c err = bpf_obj_get_info_by_fd(map_fd, &map_info, &info_len); map_fd 243 tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c close(map_fd); map_fd 6 tools/testing/selftests/bpf/prog_tests/global_data.c int i, err, map_fd; map_fd 9 tools/testing/selftests/bpf/prog_tests/global_data.c map_fd = bpf_find_map(__func__, obj, "result_number"); map_fd 10 tools/testing/selftests/bpf/prog_tests/global_data.c if (CHECK_FAIL(map_fd < 0)) map_fd 32 tools/testing/selftests/bpf/prog_tests/global_data.c err = bpf_map_lookup_elem(map_fd, &tests[i].key, &num); map_fd 41 tools/testing/selftests/bpf/prog_tests/global_data.c int i, err, map_fd; map_fd 44 tools/testing/selftests/bpf/prog_tests/global_data.c map_fd = bpf_find_map(__func__, obj, "result_string"); map_fd 45 tools/testing/selftests/bpf/prog_tests/global_data.c if (CHECK_FAIL(map_fd < 0)) map_fd 61 tools/testing/selftests/bpf/prog_tests/global_data.c err = bpf_map_lookup_elem(map_fd, &tests[i].key, str); map_fd 76 tools/testing/selftests/bpf/prog_tests/global_data.c int i, err, map_fd; map_fd 79 tools/testing/selftests/bpf/prog_tests/global_data.c map_fd = bpf_find_map(__func__, obj, "result_struct"); map_fd 80 tools/testing/selftests/bpf/prog_tests/global_data.c if (CHECK_FAIL(map_fd < 0)) map_fd 95 tools/testing/selftests/bpf/prog_tests/global_data.c err = bpf_map_lookup_elem(map_fd, &tests[i].key, &val); map_fd 104 tools/testing/selftests/bpf/prog_tests/global_data.c int err = -ENOMEM, map_fd, zero = 0; map_fd 112 tools/testing/selftests/bpf/prog_tests/global_data.c map_fd = bpf_map__fd(map); map_fd 113 tools/testing/selftests/bpf/prog_tests/global_data.c if (CHECK_FAIL(map_fd < 0)) map_fd 118 tools/testing/selftests/bpf/prog_tests/global_data.c err = bpf_map_update_elem(map_fd, &zero, buff, 0); map_fd 26 tools/testing/selftests/bpf/prog_tests/l4lb_all.c int err, i, prog_fd, map_fd; map_fd 36 tools/testing/selftests/bpf/prog_tests/l4lb_all.c map_fd = bpf_find_map(__func__, obj, "vip_map"); map_fd 37 tools/testing/selftests/bpf/prog_tests/l4lb_all.c if (map_fd < 0) map_fd 39 tools/testing/selftests/bpf/prog_tests/l4lb_all.c bpf_map_update_elem(map_fd, &key, &value, 0); map_fd 41 tools/testing/selftests/bpf/prog_tests/l4lb_all.c map_fd = bpf_find_map(__func__, obj, "ch_rings"); map_fd 42 tools/testing/selftests/bpf/prog_tests/l4lb_all.c if (map_fd < 0) map_fd 44 tools/testing/selftests/bpf/prog_tests/l4lb_all.c bpf_map_update_elem(map_fd, &ch_key, &real_num, 0); map_fd 46 tools/testing/selftests/bpf/prog_tests/l4lb_all.c map_fd = bpf_find_map(__func__, obj, "reals"); map_fd 47 tools/testing/selftests/bpf/prog_tests/l4lb_all.c if (map_fd < 0) map_fd 49 tools/testing/selftests/bpf/prog_tests/l4lb_all.c bpf_map_update_elem(map_fd, &real_num, &real_def, 0); map_fd 65 tools/testing/selftests/bpf/prog_tests/l4lb_all.c map_fd = bpf_find_map(__func__, obj, "stats"); map_fd 66 tools/testing/selftests/bpf/prog_tests/l4lb_all.c if (map_fd < 0) map_fd 68 tools/testing/selftests/bpf/prog_tests/l4lb_all.c bpf_map_lookup_elem(map_fd, &stats_key, stats); map_fd 6 tools/testing/selftests/bpf/prog_tests/map_lock.c int err, map_fd = *(u32 *) arg; map_fd 10 tools/testing/selftests/bpf/prog_tests/map_lock.c err = bpf_map_lookup_elem_flags(map_fd, &key, vars, BPF_F_LOCK); map_fd 36 tools/testing/selftests/bpf/prog_tests/map_lock.c int prog_fd, map_fd[2], vars[17] = {}; map_fd 47 tools/testing/selftests/bpf/prog_tests/map_lock.c map_fd[0] = bpf_find_map(__func__, obj, "hash_map"); map_fd 48 tools/testing/selftests/bpf/prog_tests/map_lock.c if (CHECK_FAIL(map_fd[0] < 0)) map_fd 50 tools/testing/selftests/bpf/prog_tests/map_lock.c map_fd[1] = bpf_find_map(__func__, obj, "array_map"); map_fd 51 tools/testing/selftests/bpf/prog_tests/map_lock.c if (CHECK_FAIL(map_fd[1] < 0)) map_fd 54 tools/testing/selftests/bpf/prog_tests/map_lock.c bpf_map_update_elem(map_fd[0], &key, vars, BPF_F_LOCK); map_fd 63 tools/testing/selftests/bpf/prog_tests/map_lock.c &map_fd[i - 4]))) map_fd 71 tools/testing/selftests/bpf/prog_tests/map_lock.c ret != (void *)&map_fd[i - 4])) map_fd 45 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c static int verify_sk(int map_fd, int client_fd, const char *msg, __u32 invoked, map_fd 52 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c if (CHECK_FAIL(bpf_map_lookup_elem(map_fd, &client_fd, &val) < 0)) { map_fd 130 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c int map_fd; map_fd 140 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c map_fd = bpf_map__fd(map); map_fd 154 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c err += verify_sk(map_fd, client_fd, "syn-ack", map_fd 168 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c err += verify_sk(map_fd, client_fd, "first payload byte", map_fd 16 tools/testing/selftests/bpf/prog_tests/xdp.c int err, prog_fd, map_fd; map_fd 22 tools/testing/selftests/bpf/prog_tests/xdp.c map_fd = bpf_find_map(__func__, obj, "vip2tnl"); map_fd 23 tools/testing/selftests/bpf/prog_tests/xdp.c if (map_fd < 0) map_fd 25 tools/testing/selftests/bpf/prog_tests/xdp.c bpf_map_update_elem(map_fd, &key4, &value4, 0); map_fd 26 tools/testing/selftests/bpf/prog_tests/xdp.c bpf_map_update_elem(map_fd, &key6, &value6, 0); map_fd 27 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c int err, i, prog_fd, map_fd; map_fd 37 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c map_fd = bpf_find_map(__func__, obj, "vip_map"); map_fd 38 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c if (map_fd < 0) map_fd 40 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c bpf_map_update_elem(map_fd, &key, &value, 0); map_fd 42 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c map_fd = bpf_find_map(__func__, obj, "ch_rings"); map_fd 43 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c if (map_fd < 0) map_fd 45 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c bpf_map_update_elem(map_fd, &ch_key, &real_num, 0); map_fd 47 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c map_fd = bpf_find_map(__func__, obj, "reals"); map_fd 48 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c if (map_fd < 0) map_fd 50 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c bpf_map_update_elem(map_fd, &real_num, &real_def, 0); map_fd 66 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c map_fd = bpf_find_map(__func__, obj, "stats"); map_fd 67 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c if (map_fd < 0) map_fd 69 tools/testing/selftests/bpf/prog_tests/xdp_noinline.c bpf_map_lookup_elem(map_fd, &stats_key, stats); map_fd 3629 tools/testing/selftests/bpf/test_btf.c int map_fd = -1, btf_fd = -1; map_fd 3679 tools/testing/selftests/bpf/test_btf.c map_fd = bpf_create_map_xattr(&create_attr); map_fd 3681 tools/testing/selftests/bpf/test_btf.c err = ((map_fd == -1) != test->map_create_err); map_fd 3683 tools/testing/selftests/bpf/test_btf.c map_fd, test->map_create_err); map_fd 3694 tools/testing/selftests/bpf/test_btf.c if (map_fd != -1) map_fd 3695 tools/testing/selftests/bpf/test_btf.c close(map_fd); map_fd 3870 tools/testing/selftests/bpf/test_btf.c int btf_fd[2] = {-1, -1}, map_fd = -1; map_fd 3942 tools/testing/selftests/bpf/test_btf.c map_fd = bpf_create_map_xattr(&create_attr); map_fd 3943 tools/testing/selftests/bpf/test_btf.c if (CHECK(map_fd == -1, "errno:%d", errno)) { map_fd 3949 tools/testing/selftests/bpf/test_btf.c err = bpf_obj_get_info_by_fd(map_fd, &map_info, &info_len); map_fd 3974 tools/testing/selftests/bpf/test_btf.c close(map_fd); map_fd 3975 tools/testing/selftests/bpf/test_btf.c map_fd = -1; map_fd 3989 tools/testing/selftests/bpf/test_btf.c if (map_fd != -1) map_fd 3990 tools/testing/selftests/bpf/test_btf.c close(map_fd); map_fd 4763 tools/testing/selftests/bpf/test_btf.c int map_fd = -1, btf_fd = -1; map_fd 4802 tools/testing/selftests/bpf/test_btf.c map_fd = bpf_create_map_xattr(&create_attr); map_fd 4803 tools/testing/selftests/bpf/test_btf.c if (CHECK(map_fd == -1, "errno:%d", errno)) { map_fd 4817 tools/testing/selftests/bpf/test_btf.c err = bpf_obj_pin(map_fd, pin_path); map_fd 4832 tools/testing/selftests/bpf/test_btf.c bpf_map_update_elem(map_fd, &key, mapv, 0); map_fd 4940 tools/testing/selftests/bpf/test_btf.c if (map_fd != -1) map_fd 4941 tools/testing/selftests/bpf/test_btf.c close(map_fd); map_fd 217 tools/testing/selftests/bpf/test_cgroup_attach.c static int map_fd = -1; map_fd 223 tools/testing/selftests/bpf/test_cgroup_attach.c if (map_fd < 0) map_fd 224 tools/testing/selftests/bpf/test_cgroup_attach.c map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, 4, 8, 1, 0); map_fd 225 tools/testing/selftests/bpf/test_cgroup_attach.c if (map_fd < 0) { map_fd 250 tools/testing/selftests/bpf/test_cgroup_attach.c BPF_LD_MAP_FD(BPF_REG_1, map_fd), map_fd 363 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_lookup_elem(map_fd, &key, &value) == 0); map_fd 398 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_update_elem(map_fd, &key, &value, 0) == 0); map_fd 400 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_lookup_elem(map_fd, &key, &value) == 0); map_fd 414 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_update_elem(map_fd, &key, &value, 0) == 0); map_fd 416 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_lookup_elem(map_fd, &key, &value) == 0); map_fd 425 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_update_elem(map_fd, &key, &value, 0) == 0); map_fd 427 tools/testing/selftests/bpf/test_cgroup_attach.c assert(bpf_map_lookup_elem(map_fd, &key, &value) == 0); map_fd 40 tools/testing/selftests/bpf/test_cgroup_storage.c int map_fd, percpu_map_fd, prog_fd, cgroup_fd; map_fd 53 tools/testing/selftests/bpf/test_cgroup_storage.c map_fd = bpf_create_map(BPF_MAP_TYPE_CGROUP_STORAGE, sizeof(key), map_fd 55 tools/testing/selftests/bpf/test_cgroup_storage.c if (map_fd < 0) { map_fd 68 tools/testing/selftests/bpf/test_cgroup_storage.c prog[7].imm = map_fd; map_fd 100 tools/testing/selftests/bpf/test_cgroup_storage.c if (bpf_map_get_next_key(map_fd, NULL, &key)) { map_fd 105 tools/testing/selftests/bpf/test_cgroup_storage.c if (bpf_map_lookup_elem(map_fd, &key, &value)) { map_fd 124 tools/testing/selftests/bpf/test_cgroup_storage.c if (bpf_map_lookup_elem(map_fd, &key, &value)) { map_fd 136 tools/testing/selftests/bpf/test_cgroup_storage.c if (bpf_map_update_elem(map_fd, &key, &value, 0)) { map_fd 147 tools/testing/selftests/bpf/test_cgroup_storage.c if (bpf_map_lookup_elem(map_fd, &key, &value)) { map_fd 428 tools/testing/selftests/bpf/test_lpm_map.c int map_fd; map_fd 434 tools/testing/selftests/bpf/test_lpm_map.c map_fd = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE, map_fd 437 tools/testing/selftests/bpf/test_lpm_map.c assert(map_fd >= 0); map_fd 454 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); map_fd 459 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); map_fd 464 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); map_fd 469 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); map_fd 474 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_lookup_elem(map_fd, key, &value) == -1 && map_fd 479 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_delete_elem(map_fd, key) == -1 && map_fd 484 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_delete_elem(map_fd, key) == -1 && map_fd 490 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_lookup_elem(map_fd, key, &value) == 0); map_fd 496 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_delete_elem(map_fd, key) == 0); map_fd 500 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_lookup_elem(map_fd, key, &value) == 0); map_fd 506 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_delete_elem(map_fd, key) == 0); map_fd 510 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_lookup_elem(map_fd, key, &value) == 0); map_fd 516 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_delete_elem(map_fd, key) == 0); map_fd 520 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_lookup_elem(map_fd, key, &value) == 0); map_fd 526 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_delete_elem(map_fd, key) == 0); map_fd 530 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_lookup_elem(map_fd, key, &value) == -1 && map_fd 533 tools/testing/selftests/bpf/test_lpm_map.c close(map_fd); map_fd 541 tools/testing/selftests/bpf/test_lpm_map.c int map_fd; map_fd 547 tools/testing/selftests/bpf/test_lpm_map.c map_fd = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE, key_size, sizeof(value), map_fd 549 tools/testing/selftests/bpf/test_lpm_map.c assert(map_fd >= 0); map_fd 552 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == -1 && map_fd 558 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key_p, &value, 0) == 0); map_fd 561 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == 0); map_fd 565 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -1 && map_fd 570 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == 0); map_fd 577 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key_p, &value, 0) == 0); map_fd 580 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == 0); map_fd 585 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 590 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -1 && map_fd 596 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key_p, &value, 0) == 0); map_fd 599 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == 0); map_fd 604 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 609 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 614 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -1 && map_fd 620 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key_p, &value, 0) == 0); map_fd 623 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == 0); map_fd 628 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 633 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 638 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 643 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -1 && map_fd 649 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(map_fd, key_p, &value, 0) == 0); map_fd 652 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, NULL, key_p) == 0); map_fd 657 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 663 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 668 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 673 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 678 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == -1 && map_fd 684 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_get_next_key(map_fd, key_p, next_key_p) == 0); map_fd 688 tools/testing/selftests/bpf/test_lpm_map.c close(map_fd); map_fd 695 tools/testing/selftests/bpf/test_lpm_map.c int map_fd; map_fd 721 tools/testing/selftests/bpf/test_lpm_map.c assert(bpf_map_update_elem(info->map_fd, key_p, &value, 0) == 0); map_fd 723 tools/testing/selftests/bpf/test_lpm_map.c ret = bpf_map_delete_elem(info->map_fd, key_p); map_fd 727 tools/testing/selftests/bpf/test_lpm_map.c ret = bpf_map_lookup_elem(info->map_fd, key_p, &value); map_fd 731 tools/testing/selftests/bpf/test_lpm_map.c ret = bpf_map_get_next_key(info->map_fd, key_p, next_key_p); map_fd 740 tools/testing/selftests/bpf/test_lpm_map.c static void setup_lpm_mt_test_info(struct lpm_mt_test_info *info, int map_fd) map_fd 743 tools/testing/selftests/bpf/test_lpm_map.c info->map_fd = map_fd; map_fd 759 tools/testing/selftests/bpf/test_lpm_map.c int i, map_fd; map_fd 765 tools/testing/selftests/bpf/test_lpm_map.c map_fd = bpf_create_map(BPF_MAP_TYPE_LPM_TRIE, key_size, value_size, map_fd 769 tools/testing/selftests/bpf/test_lpm_map.c setup_lpm_mt_test_info(&info[0], map_fd); map_fd 780 tools/testing/selftests/bpf/test_lpm_map.c close(map_fd); map_fd 31 tools/testing/selftests/bpf/test_lru_map.c int map_fd; map_fd 33 tools/testing/selftests/bpf/test_lru_map.c map_fd = bpf_create_map(map_type, sizeof(unsigned long long), map_fd 36 tools/testing/selftests/bpf/test_lru_map.c if (map_fd == -1) map_fd 39 tools/testing/selftests/bpf/test_lru_map.c return map_fd; map_fd 555 tools/testing/selftests/bpf/test_lru_map.c static void do_test_lru_sanity5(unsigned long long last_key, int map_fd) map_fd 560 tools/testing/selftests/bpf/test_lru_map.c assert(!bpf_map_lookup_elem_with_ref_bit(map_fd, last_key, value)); map_fd 564 tools/testing/selftests/bpf/test_lru_map.c assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); map_fd 565 tools/testing/selftests/bpf/test_lru_map.c assert(!bpf_map_lookup_elem_with_ref_bit(map_fd, key, value)); map_fd 568 tools/testing/selftests/bpf/test_lru_map.c assert(bpf_map_lookup_elem(map_fd, &last_key, value) == -1 && map_fd 577 tools/testing/selftests/bpf/test_lru_map.c int map_fd; map_fd 585 tools/testing/selftests/bpf/test_lru_map.c map_fd = create_map(map_type, map_flags, 1); map_fd 586 tools/testing/selftests/bpf/test_lru_map.c assert(map_fd != -1); map_fd 590 tools/testing/selftests/bpf/test_lru_map.c assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); map_fd 597 tools/testing/selftests/bpf/test_lru_map.c do_test_lru_sanity5(key, map_fd); map_fd 612 tools/testing/selftests/bpf/test_lru_map.c close(map_fd); map_fd 1436 tools/testing/selftests/bpf/test_maps.c static void prepare_reuseport_grp(int type, int map_fd, size_t map_elem_size, map_fd 1476 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index0, value, BPF_ANY); map_fd 1504 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index0, value, map_fd 1530 tools/testing/selftests/bpf/test_maps.c int map_fd, err, t, f; map_fd 1534 tools/testing/selftests/bpf/test_maps.c map_fd = bpf_create_map(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, map_fd 1536 tools/testing/selftests/bpf/test_maps.c CHECK(map_fd == -1, "reuseport array create", map_fd 1537 tools/testing/selftests/bpf/test_maps.c "map_fd:%d, errno:%d\n", map_fd, errno); map_fd 1540 tools/testing/selftests/bpf/test_maps.c err = bpf_map_delete_elem(map_fd, &bad_index); map_fd 1544 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &bad_index, &fd64, BPF_ANY); map_fd 1549 tools/testing/selftests/bpf/test_maps.c err = bpf_map_lookup_elem(map_fd, &bad_index, &map_cookie); map_fd 1555 tools/testing/selftests/bpf/test_maps.c err = bpf_map_lookup_elem(map_fd, &index3, &map_cookie); map_fd 1559 tools/testing/selftests/bpf/test_maps.c err = bpf_map_delete_elem(map_fd, &index3); map_fd 1567 tools/testing/selftests/bpf/test_maps.c prepare_reuseport_grp(type, map_fd, sizeof(__u64), grpa_fds64, map_fd 1572 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &grpa_fds64[fds_idx], map_fd 1581 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &grpa_fds64[fds_idx], map_fd 1590 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &grpa_fds64[fds_idx], map_fd 1598 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &grpa_fds64[fds_idx], map_fd 1607 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &grpa_fds64[fds_idx], map_fd 1617 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &fd64, BPF_ANY); map_fd 1623 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index0, &fd64, BPF_ANY); map_fd 1630 tools/testing/selftests/bpf/test_maps.c err = bpf_map_delete_elem(map_fd, &index3); map_fd 1636 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &fd64, BPF_NOEXIST); map_fd 1642 tools/testing/selftests/bpf/test_maps.c err = bpf_map_lookup_elem(map_fd, &index3, &map_cookie); map_fd 1651 tools/testing/selftests/bpf/test_maps.c err = bpf_map_lookup_elem(map_fd, &index3, &map_cookie); map_fd 1662 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &fd64, BPF_NOEXIST); map_fd 1668 tools/testing/selftests/bpf/test_maps.c close(map_fd); map_fd 1671 tools/testing/selftests/bpf/test_maps.c map_fd = bpf_create_map(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, map_fd 1673 tools/testing/selftests/bpf/test_maps.c CHECK(map_fd == -1, "reuseport array create", map_fd 1674 tools/testing/selftests/bpf/test_maps.c "map_fd:%d, errno:%d\n", map_fd, errno); map_fd 1675 tools/testing/selftests/bpf/test_maps.c prepare_reuseport_grp(SOCK_STREAM, map_fd, sizeof(__u32), &fd64, map_fd 1678 tools/testing/selftests/bpf/test_maps.c err = bpf_map_update_elem(map_fd, &index3, &fd, BPF_NOEXIST); map_fd 1681 tools/testing/selftests/bpf/test_maps.c err = bpf_map_lookup_elem(map_fd, &index3, &map_cookie); map_fd 1686 tools/testing/selftests/bpf/test_maps.c close(map_fd); map_fd 38 tools/testing/selftests/bpf/test_netcnt.c int map_fd, percpu_map_fd; map_fd 95 tools/testing/selftests/bpf/test_netcnt.c map_fd = bpf_find_map(__func__, obj, "netcnt"); map_fd 96 tools/testing/selftests/bpf/test_netcnt.c if (map_fd < 0) { map_fd 107 tools/testing/selftests/bpf/test_netcnt.c if (bpf_map_get_next_key(map_fd, NULL, &key)) { map_fd 112 tools/testing/selftests/bpf/test_netcnt.c if (bpf_map_lookup_elem(map_fd, &key, &netcnt)) { map_fd 86 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c int map_fd = -1; map_fd 107 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c map_fd = bpf_map_get_fd_by_id(map_ids[0]); map_fd 108 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c if (map_fd < 0) map_fd 113 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c return map_fd; map_fd 121 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c int map_fd; map_fd 128 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c map_fd = get_map_fd_by_prog_id(prog_id); map_fd 129 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c if (map_fd < 0) map_fd 133 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c if (bpf_map_lookup_elem(map_fd, &level, &actual_ids[level])) { map_fd 148 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c if (map_fd >= 0) map_fd 149 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c close(map_fd); map_fd 99 tools/testing/selftests/bpf/test_socket_cookie.c int map_fd; map_fd 106 tools/testing/selftests/bpf/test_socket_cookie.c map_fd = bpf_map__fd(map); map_fd 108 tools/testing/selftests/bpf/test_socket_cookie.c err = bpf_map_lookup_elem(map_fd, &client_fd, &val); map_fd 66 tools/testing/selftests/bpf/test_sockmap.c int map_fd[8]; map_fd 802 tools/testing/selftests/bpf/test_sockmap.c err = bpf_prog_attach(prog_fd[0], map_fd[0], map_fd 807 tools/testing/selftests/bpf/test_sockmap.c prog_fd[0], map_fd[0], err, strerror(errno)); map_fd 811 tools/testing/selftests/bpf/test_sockmap.c err = bpf_prog_attach(prog_fd[1], map_fd[0], map_fd 857 tools/testing/selftests/bpf/test_sockmap.c map_fd[1], BPF_SK_MSG_VERDICT, 0); map_fd 865 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[1], &i, &c1, BPF_ANY); map_fd 878 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[2], &i, &redir_fd, BPF_ANY); map_fd 887 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[3], map_fd 898 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[4], map_fd 909 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[5], map_fd 921 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[5], map_fd 933 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[5], map_fd 945 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[5], map_fd 957 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[5], map_fd 967 tools/testing/selftests/bpf/test_sockmap.c bpf_map_update_elem(map_fd[5], map_fd 973 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[5], map_fd 983 tools/testing/selftests/bpf/test_sockmap.c bpf_map_update_elem(map_fd[5], map_fd 992 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[6], &i, &in, BPF_ANY); map_fd 999 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[1], &i, &p1, BPF_ANY); map_fd 1005 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[2], &i, &p1, BPF_ANY); map_fd 1013 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[2], &i, &p2, BPF_ANY); map_fd 1027 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[7], map_fd 1036 tools/testing/selftests/bpf/test_sockmap.c err = bpf_map_update_elem(map_fd[0], map_fd 1072 tools/testing/selftests/bpf/test_sockmap.c bpf_prog_detach2(prog_fd[0], map_fd[0], BPF_SK_SKB_STREAM_PARSER); map_fd 1073 tools/testing/selftests/bpf/test_sockmap.c bpf_prog_detach2(prog_fd[1], map_fd[0], BPF_SK_SKB_STREAM_VERDICT); map_fd 1075 tools/testing/selftests/bpf/test_sockmap.c bpf_prog_detach2(tx_prog_fd, map_fd[1], BPF_SK_MSG_VERDICT); map_fd 1079 tools/testing/selftests/bpf/test_sockmap.c bpf_map_update_elem(map_fd[i], &key, &zero, BPF_ANY); map_fd 1080 tools/testing/selftests/bpf/test_sockmap.c while (bpf_map_get_next_key(map_fd[i], &key, &next_key) == 0) { map_fd 1081 tools/testing/selftests/bpf/test_sockmap.c bpf_map_update_elem(map_fd[i], &key, &zero, BPF_ANY); map_fd 1652 tools/testing/selftests/bpf/test_sockmap.c for (i = 0; i < sizeof(map_fd)/sizeof(int); i++) { map_fd 1654 tools/testing/selftests/bpf/test_sockmap.c map_fd[i] = bpf_map__fd(maps[i]); map_fd 1655 tools/testing/selftests/bpf/test_sockmap.c if (map_fd[i] < 0) { map_fd 1657 tools/testing/selftests/bpf/test_sockmap.c map_fd[i], strerror(errno)); map_fd 87 tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c int map_fd = -1; map_fd 110 tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c map_fd = bpf_map_get_fd_by_id(map_ids[0]); map_fd 111 tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c if (map_fd < 0) map_fd 116 tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c return map_fd; map_fd 93 tools/testing/selftests/bpf/test_tcpbpf_user.c int prog_fd, map_fd, sock_map_fd; map_fd 129 tools/testing/selftests/bpf/test_tcpbpf_user.c map_fd = bpf_find_map(__func__, obj, "global_map"); map_fd 130 tools/testing/selftests/bpf/test_tcpbpf_user.c if (map_fd < 0) map_fd 137 tools/testing/selftests/bpf/test_tcpbpf_user.c rv = bpf_map_lookup_elem(map_fd, &key, &g); map_fd 96 tools/testing/selftests/bpf/xdping.c int prog_fd = -1, map_fd = -1; map_fd 193 tools/testing/selftests/bpf/xdping.c map_fd = bpf_map__fd(map); map_fd 194 tools/testing/selftests/bpf/xdping.c if (!map || map_fd < 0) { map_fd 213 tools/testing/selftests/bpf/xdping.c close(map_fd); map_fd 228 tools/testing/selftests/bpf/xdping.c if (bpf_map_update_elem(map_fd, &raddr, &pinginfo, BPF_ANY)) { map_fd 247 tools/testing/selftests/bpf/xdping.c ret = get_stats(map_fd, count, raddr); map_fd 254 tools/testing/selftests/bpf/xdping.c if (map_fd > 0) map_fd 255 tools/testing/selftests/bpf/xdping.c close(map_fd);