Home
last modified time | relevance | path

Searched refs:bpf_map_update_elem (Results 1 – 25 of 180) sorted by relevance

12345678

/linux-6.1.9/tools/testing/selftests/bpf/
Dtest_lru_map.c173 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
174 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
178 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -EEXIST); in test_lru_sanity0()
181 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -EINVAL); in test_lru_sanity0()
190 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -ENOENT); in test_lru_sanity0()
193 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
209 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
210 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
271 assert(!bpf_map_update_elem(lru_map_fd, &key, value, in test_lru_sanity1()
278 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity1()
[all …]
Dtest_maps.c51 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
55 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap()
60 assert(bpf_map_update_elem(fd, &key, &value, -1) < 0 && in test_hashmap()
69 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
78 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) < 0 && in test_hashmap()
83 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == 0); in test_hashmap()
89 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap()
94 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == 0); in test_hashmap()
96 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
98 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap()
[all …]
Dtest_lpm_map.c253 r = bpf_map_update_elem(map, key, value, 0); in test_lpm_map()
361 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
366 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
371 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
376 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
381 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
386 assert(bpf_map_update_elem(map_fd_ipv6, key_ipv6, &value, 0) == 0); in test_lpm_ipaddr()
454 assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); in test_lpm_delete()
459 assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); in test_lpm_delete()
464 assert(bpf_map_update_elem(map_fd, key, &value, 0) == 0); in test_lpm_delete()
[all …]
Dtest_sockmap.c1044 err = bpf_map_update_elem(map_fd[1], &i, &c1, BPF_ANY); in run_options()
1057 err = bpf_map_update_elem(map_fd[2], &i, &redir_fd, BPF_ANY); in run_options()
1066 err = bpf_map_update_elem(map_fd[3], in run_options()
1077 err = bpf_map_update_elem(map_fd[4], in run_options()
1088 err = bpf_map_update_elem(map_fd[5], in run_options()
1100 err = bpf_map_update_elem(map_fd[5], in run_options()
1112 err = bpf_map_update_elem(map_fd[5], in run_options()
1124 err = bpf_map_update_elem(map_fd[5], in run_options()
1136 err = bpf_map_update_elem(map_fd[5], in run_options()
1146 bpf_map_update_elem(map_fd[5], in run_options()
[all …]
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dbtf_map_in_map.c48 bpf_map_update_elem(outer_arr_fd, &key, &map1_fd, 0); in test_lookup_update()
49 bpf_map_update_elem(outer_hash_fd, &key, &map2_fd, 0); in test_lookup_update()
50 bpf_map_update_elem(outer_arr_dyn_fd, &key, &map3_fd, 0); in test_lookup_update()
61 bpf_map_update_elem(outer_arr_fd, &key, &map2_fd, 0); in test_lookup_update()
62 bpf_map_update_elem(outer_hash_fd, &key, &map1_fd, 0); in test_lookup_update()
63 bpf_map_update_elem(outer_arr_dyn_fd, &key, &map4_fd, 0); in test_lookup_update()
74 bpf_map_update_elem(outer_arr_dyn_fd, &key, &map5_fd, 0); in test_lookup_update()
82 err = bpf_map_update_elem(outer_hash_fd, &key, &val, 0); in test_lookup_update()
87 err = bpf_map_update_elem(outer_arr_fd, &key, &val, 0); in test_lookup_update()
93 err = bpf_map_update_elem(outer_arr_dyn_fd, &key, &val, 0); in test_lookup_update()
[all …]
Dbloom_filter_map.c40 err = bpf_map_update_elem(fd, NULL, &value, -1); in test_fail_cases()
43 err = bpf_map_update_elem(fd, NULL, &value, BPF_EXIST); in test_fail_cases()
46 err = bpf_map_update_elem(fd, NULL, &value, BPF_F_LOCK); in test_fail_cases()
49 err = bpf_map_update_elem(fd, NULL, &value, BPF_NOEXIST); in test_fail_cases()
52 err = bpf_map_update_elem(fd, NULL, &value, 10000); in test_fail_cases()
71 err = bpf_map_update_elem(fd, NULL, &value, 0); in test_success_cases()
111 err = bpf_map_update_elem(inner_map_fd, NULL, rand_vals + i, BPF_ANY); in test_inner_map()
118 err = bpf_map_update_elem(outer_map_fd, &key, &inner_map_fd, BPF_ANY); in test_inner_map()
170 err = bpf_map_update_elem(random_data_fd, &i, &val, BPF_ANY); in setup_progs()
174 err = bpf_map_update_elem(bloom_fd, NULL, &val, BPF_ANY); in setup_progs()
Dverify_pkcs7_sig.c308 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, BPF_ANY); in test_verify_pkcs7_sig()
317 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, BPF_ANY); in test_verify_pkcs7_sig()
326 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, BPF_ANY); in test_verify_pkcs7_sig()
337 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, BPF_ANY); in test_verify_pkcs7_sig()
351 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, BPF_ANY); in test_verify_pkcs7_sig()
359 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, BPF_ANY); in test_verify_pkcs7_sig()
372 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, in test_verify_pkcs7_sig()
379 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, in test_verify_pkcs7_sig()
386 ret = bpf_map_update_elem(bpf_map__fd(map), &zero, &data, in test_verify_pkcs7_sig()
Dxdp_cpumap_attach.c41 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_helpers()
55 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_helpers()
64 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_helpers()
93 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_frags_helpers()
107 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_frags_helpers()
Dxdp_devmap_attach.c43 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_helpers()
57 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_helpers()
66 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_helpers()
106 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_frags_helpers()
120 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_frags_helpers()
Dtailcalls.c55 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
85 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
106 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
191 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_2()
264 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_count()
372 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_4()
378 err = bpf_map_update_elem(data_fd, &zero, &i, BPF_ANY); in test_tailcall_4()
388 err = bpf_map_update_elem(data_fd, &zero, &i, BPF_ANY); in test_tailcall_4()
462 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_5()
468 err = bpf_map_update_elem(data_fd, &zero, &key[i], BPF_ANY); in test_tailcall_5()
[all …]
Dmap_lookup_percpu_elem.c37 ret = bpf_map_update_elem(bpf_map__fd(skel->maps.percpu_array_map), &key, buf, 0); in test_map_lookup_percpu_elem()
40 ret = bpf_map_update_elem(bpf_map__fd(skel->maps.percpu_hash_map), &key, buf, 0); in test_map_lookup_percpu_elem()
43 ret = bpf_map_update_elem(bpf_map__fd(skel->maps.percpu_lru_hash_map), &key, buf, 0); in test_map_lookup_percpu_elem()
Dxdp_noinline.c44 bpf_map_update_elem(bpf_map__fd(skel->maps.vip_map), &key, &value, 0); in test_xdp_noinline()
45 bpf_map_update_elem(bpf_map__fd(skel->maps.ch_rings), &ch_key, &real_num, 0); in test_xdp_noinline()
46 bpf_map_update_elem(bpf_map__fd(skel->maps.reals), &real_num, &real_def, 0); in test_xdp_noinline()
Dl4lb_all.c44 bpf_map_update_elem(map_fd, &key, &value, 0); in test_l4lb()
49 bpf_map_update_elem(map_fd, &ch_key, &real_num, 0); in test_l4lb()
54 bpf_map_update_elem(map_fd, &real_num, &real_def, 0); in test_l4lb()
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dtimer.c103 bpf_map_update_elem(map, &lru_key, &init, 0); in timer_cb1()
135 bpf_map_update_elem(&lru, &lru_key, &init, 0); in BPF_PROG2()
245 bpf_map_update_elem(&hmap, &key, &init, 0); in BPF_PROG2()
250 bpf_map_update_elem(&hmap, &key, &init, 0); in BPF_PROG2()
252 bpf_map_update_elem(&hmap_malloc, &key_malloc, &init, 0); in BPF_PROG2()
257 bpf_map_update_elem(&hmap_malloc, &key_malloc, &init, 0); in BPF_PROG2()
263 bpf_map_update_elem(&hmap, &key, &init, 0); in BPF_PROG2()
268 bpf_map_update_elem(&hmap, &key, &init, 0); in BPF_PROG2()
275 bpf_map_update_elem(&hmap_malloc, &key_malloc, &init, 0); in BPF_PROG2()
280 bpf_map_update_elem(&hmap_malloc, &key_malloc, &init, 0); in BPF_PROG2()
Dtest_mmap.c36 bpf_map_update_elem(&data_map, &two, (const void *)&in_val, 0); in test_mmap()
42 bpf_map_update_elem(&data_map, &one, &val, 0); in test_mmap()
47 bpf_map_update_elem(&data_map, &far, &val, 0); in test_mmap()
Dlinked_maps1.c52 bpf_map_update_elem(&map1, &key_struct, &val_struct, 0); in BPF_PROG()
53 bpf_map_update_elem(&map2, &key, &val, 0); in BPF_PROG()
54 bpf_map_update_elem(&map_weak, &key, &val, 0); in BPF_PROG()
Dlinked_maps2.c46 bpf_map_update_elem(&map1, &key_struct, &val_struct, 0); in BPF_PROG()
47 bpf_map_update_elem(&map2, &key, &val, 0); in BPF_PROG()
48 bpf_map_update_elem(&map_weak, &key, &val, 0); in BPF_PROG()
Dtest_btf_map_in_map.c133 bpf_map_update_elem(inner_map, &key, &val, 0); in handle__sys_enter()
139 bpf_map_update_elem(inner_map, &key, &val, 0); in handle__sys_enter()
145 bpf_map_update_elem(inner_map, &key, &val, 0); in handle__sys_enter()
Dlru_bug.c26 bpf_map_update_elem(&lru_map, &(int){0}, &v, 0); in printk()
36 bpf_map_update_elem(&lru_map, &(int){0}, &val, 0); in nanosleep()
/linux-6.1.9/samples/bpf/
Dtest_map_in_map_user.c53 ret = bpf_map_update_elem(PORT_A, &port_key, &magic_result, BPF_ANY); in populate_map()
56 ret = bpf_map_update_elem(PORT_H, &port_key, &magic_result, in populate_map()
60 ret = bpf_map_update_elem(A_OF_PORT_A, &port_key, &PORT_A, BPF_ANY); in populate_map()
64 ret = bpf_map_update_elem(H_OF_PORT_A, &port_key, &PORT_A, BPF_NOEXIST); in populate_map()
68 ret = bpf_map_update_elem(H_OF_PORT_H, &port_key, &PORT_H, BPF_NOEXIST); in populate_map()
Dmap_perf_test_kern.c114 bpf_map_update_elem(&hash_map, &key, &init_val, BPF_ANY); in SYSCALL()
132 bpf_map_update_elem(&percpu_hash_map, &key, &init_val, BPF_ANY); in SYSCALL()
149 bpf_map_update_elem(&hash_map_alloc, &key, &init_val, BPF_ANY); in SYSCALL()
166 bpf_map_update_elem(&percpu_hash_map_alloc, &key, &init_val, BPF_ANY); in SYSCALL()
216 ret = bpf_map_update_elem(&lru_hash_map, &key, &val, BPF_ANY); in SYSCALL()
218 ret = bpf_map_update_elem(&nocommon_lru_hash_map, &key, &val, in SYSCALL()
231 ret = bpf_map_update_elem(nolocal_lru_map, &key, &val, in SYSCALL()
Dtest_lru_dist.c152 bpf_map_update_elem(lru->map_fd, &node->key, &null_node, BPF_EXIST); in pfect_lru_lookup_or_insert()
160 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_EXIST)); in pfect_lru_lookup_or_insert()
163 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_NOEXIST)); in pfect_lru_lookup_or_insert()
292 if (bpf_map_update_elem(lru_map_fd, &key, &value, BPF_NOEXIST)) { in do_test_lru_dist()
362 assert(bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST) == 0); in test_lru_loss0()
412 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in test_lru_loss1()
440 assert(bpf_map_update_elem(map_fd, &next_ins_key, value, in do_test_parallel_lru_loss()
454 bpf_map_update_elem(map_fd, &next_ins_key, value, in do_test_parallel_lru_loss()
Dibumad_kern.c87 bpf_map_update_elem(&read_count, &class, &zero, BPF_NOEXIST); in on_ib_umad_read_recv()
107 bpf_map_update_elem(&read_count, &class, &zero, BPF_NOEXIST); in on_ib_umad_read_send()
127 bpf_map_update_elem(&write_count, &class, &zero, BPF_NOEXIST); in on_ib_umad_write()
/linux-6.1.9/tools/perf/tests/
Dbpf-script-test-relocation.c17 static void *(*bpf_map_update_elem)(void *map, void *key, void *value, int flags) = variable
47 bpf_map_update_elem(&this_is_a_global_val, &key, &value, 0); in bpf_func__sys_write()
/linux-6.1.9/tools/testing/selftests/bpf/map_tests/
Dsk_storage_map.c189 err = bpf_map_update_elem(map_fd, &sk_fds[i], &value, in insert_close_thread()
288 err = bpf_map_update_elem(map_fd, &sk_fd, &value, 0); in update_thread()
480 err = bpf_map_update_elem(map_fd, &sk_fd, &value, in test_sk_storage_map_basic()
494 err = bpf_map_update_elem(map_fd, &sk_fd, &value, in test_sk_storage_map_basic()
508 err = bpf_map_update_elem(map_fd, &sk_fd, &value, BPF_EXIST); in test_sk_storage_map_basic()
521 err = bpf_map_update_elem(map_fd, &sk_fd, &value, in test_sk_storage_map_basic()
526 err = bpf_map_update_elem(map_fd, &sk_fd, &value, BPF_NOEXIST); in test_sk_storage_map_basic()
540 err = bpf_map_update_elem(map_fd, &sk_fd, &value, 0); in test_sk_storage_map_basic()

12345678