Searched refs:map_fds (Results 1 – 3 of 3) sorted by relevance
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
D | test_verifier.c | 622 struct bpf_insn *prog, int *map_fds) in do_test_fixup() argument 656 map_fds[0] = create_map(BPF_MAP_TYPE_HASH, sizeof(long long), in do_test_fixup() 659 prog[*fixup_map_hash_8b].imm = map_fds[0]; in do_test_fixup() 665 map_fds[1] = create_map(BPF_MAP_TYPE_HASH, sizeof(long long), in do_test_fixup() 668 prog[*fixup_map_hash_48b].imm = map_fds[1]; in do_test_fixup() 674 map_fds[2] = create_map(BPF_MAP_TYPE_HASH, sizeof(long long), in do_test_fixup() 677 prog[*fixup_map_hash_16b].imm = map_fds[2]; in do_test_fixup() 683 map_fds[3] = create_map(BPF_MAP_TYPE_ARRAY, sizeof(int), in do_test_fixup() 685 update_map(map_fds[3], 0); in do_test_fixup() 687 prog[*fixup_map_array_48b].imm = map_fds[3]; in do_test_fixup() [all …]
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | xdp_redirect_cpu_user.c | 68 static int map_fds[NUM_MAP]; variable 547 fd = map_fds[RX_CNT]; in stats_collect() 550 fd = map_fds[REDIRECT_ERR_CNT]; in stats_collect() 553 fd = map_fds[CPUMAP_ENQUEUE_CNT]; in stats_collect() 557 fd = map_fds[CPUMAP_KTHREAD_CNT]; in stats_collect() 560 fd = map_fds[EXCEPTION_CNT]; in stats_collect() 585 ret = bpf_map_update_elem(map_fds[CPU_MAP], &cpu, value, 0); in create_cpu_entry() 594 ret = bpf_map_update_elem(map_fds[CPUS_AVAILABLE], &avail_idx, &cpu, 0); in create_cpu_entry() 601 ret = bpf_map_lookup_elem(map_fds[CPUS_COUNT], &key, &curr_cpus_count); in create_cpu_entry() 608 ret = bpf_map_update_elem(map_fds[CPUS_COUNT], &key, in create_cpu_entry() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
D | bpf_obj_id.c | 18 int prog_fds[nr_iters], map_fds[nr_iters]; in test_bpf_obj_id() local 60 map_fds[i] = bpf_find_map(__func__, objs[i], "test_map_id"); in test_bpf_obj_id() 61 if (CHECK_FAIL(map_fds[i] < 0)) in test_bpf_obj_id() 63 err = bpf_map_update_elem(map_fds[i], &array_key, in test_bpf_obj_id() 82 err = bpf_obj_get_info_by_fd(map_fds[i], &map_infos[i], in test_bpf_obj_id()
|