Home
last modified time | relevance | path

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

123456

/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dtest_lru_map.c184 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
185 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
189 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST) == -1 in test_lru_sanity0()
193 assert(bpf_map_update_elem(lru_map_fd, &key, value, -1) == -1 && in test_lru_sanity0()
204 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -1 && in test_lru_sanity0()
208 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
225 assert(!bpf_map_update_elem(lru_map_fd, &key, value, BPF_NOEXIST)); in test_lru_sanity0()
226 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity0()
280 assert(!bpf_map_update_elem(lru_map_fd, &key, value, in test_lru_sanity1()
287 assert(!bpf_map_update_elem(expected_map_fd, &key, value, in test_lru_sanity1()
[all …]
Dtest_maps.c52 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
56 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap()
61 assert(bpf_map_update_elem(fd, &key, &value, -1) == -1 && in test_hashmap()
72 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == -1 && in test_hashmap()
77 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == 0); in test_hashmap()
83 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap()
88 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == 0); in test_hashmap()
90 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
92 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) == -1 && in test_hashmap()
168 assert(bpf_map_update_elem(fd, &key, value, BPF_ANY) == 0); in test_hashmap_percpu()
[all …]
Dtest_lpm_map.c252 r = bpf_map_update_elem(map, key, value, 0); in test_lpm_map()
359 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
364 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
369 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
374 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
379 assert(bpf_map_update_elem(map_fd_ipv4, key_ipv4, &value, 0) == 0); in test_lpm_ipaddr()
384 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.c1000 err = bpf_map_update_elem(map_fd[1], &i, &c1, BPF_ANY); in run_options()
1013 err = bpf_map_update_elem(map_fd[2], &i, &redir_fd, BPF_ANY); in run_options()
1022 err = bpf_map_update_elem(map_fd[3], in run_options()
1033 err = bpf_map_update_elem(map_fd[4], in run_options()
1044 err = bpf_map_update_elem(map_fd[5], in run_options()
1056 err = bpf_map_update_elem(map_fd[5], in run_options()
1068 err = bpf_map_update_elem(map_fd[5], in run_options()
1080 err = bpf_map_update_elem(map_fd[5], in run_options()
1092 err = bpf_map_update_elem(map_fd[5], in run_options()
1102 bpf_map_update_elem(map_fd[5], in run_options()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
Dbtf_map_in_map.c47 err = bpf_map_update_elem(outer_map_fd, &zero, &inner_map_fd, 0); in kern_sync_rcu()
81 bpf_map_update_elem(outer_arr_fd, &key, &map1_fd, 0); in test_lookup_update()
82 bpf_map_update_elem(outer_hash_fd, &key, &map2_fd, 0); in test_lookup_update()
83 bpf_map_update_elem(outer_arr_dyn_fd, &key, &map3_fd, 0); in test_lookup_update()
94 bpf_map_update_elem(outer_arr_fd, &key, &map2_fd, 0); in test_lookup_update()
95 bpf_map_update_elem(outer_hash_fd, &key, &map1_fd, 0); in test_lookup_update()
96 bpf_map_update_elem(outer_arr_dyn_fd, &key, &map4_fd, 0); in test_lookup_update()
107 bpf_map_update_elem(outer_arr_dyn_fd, &key, &map5_fd, 0); in test_lookup_update()
115 err = bpf_map_update_elem(outer_hash_fd, &key, &val, 0); in test_lookup_update()
120 err = bpf_map_update_elem(outer_arr_fd, &key, &val, 0); in test_lookup_update()
[all …]
Dtailcalls.c51 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
83 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
105 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_1()
189 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_3()
354 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_4()
360 err = bpf_map_update_elem(data_fd, &zero, &i, BPF_ANY); in test_tailcall_4()
371 err = bpf_map_update_elem(data_fd, &zero, &i, BPF_ANY); in test_tailcall_4()
442 err = bpf_map_update_elem(map_fd, &i, &prog_fd, BPF_ANY); in test_tailcall_5()
448 err = bpf_map_update_elem(data_fd, &zero, &key[i], BPF_ANY); in test_tailcall_5()
[all …]
Dxdp_noinline.c38 bpf_map_update_elem(bpf_map__fd(skel->maps.vip_map), &key, &value, 0); in test_xdp_noinline()
39 bpf_map_update_elem(bpf_map__fd(skel->maps.ch_rings), &ch_key, &real_num, 0); in test_xdp_noinline()
40 bpf_map_update_elem(bpf_map__fd(skel->maps.reals), &real_num, &real_def, 0); in test_xdp_noinline()
Dl4lb_all.c40 bpf_map_update_elem(map_fd, &key, &value, 0); in test_l4lb()
45 bpf_map_update_elem(map_fd, &ch_key, &real_num, 0); in test_l4lb()
50 bpf_map_update_elem(map_fd, &real_num, &real_def, 0); in test_l4lb()
Dxdp.c26 bpf_map_update_elem(map_fd, &key4, &value4, 0); in test_xdp()
27 bpf_map_update_elem(map_fd, &key6, &value6, 0); in test_xdp()
Dxdp_cpumap_attach.c42 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_helpers()
58 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_cpumap_helpers()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dtest_tcpbpf_kern.c41 bpf_map_update_elem(&global_map, &key, &g, in update_event_map()
46 bpf_map_update_elem(&global_map, &key, &g, in update_event_map()
128 bpf_map_update_elem(&global_map, &key, &g, in bpf_testcb()
148 bpf_map_update_elem(&sockopt_results, &key, &v, in bpf_testcb()
176 bpf_map_update_elem(&global_map, &key, &g, in bpf_testcb()
187 bpf_map_update_elem(&sockopt_results, &key, &v, BPF_ANY); in bpf_testcb()
Dtest_mmap.c38 bpf_map_update_elem(&data_map, &two, (const void *)&in_val, 0); in test_mmap()
44 bpf_map_update_elem(&data_map, &one, &val, 0); in test_mmap()
49 bpf_map_update_elem(&data_map, &far, &val, 0); in test_mmap()
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()
Dtest_sockmap_update.c38 if (bpf_map_update_elem(&dst_sock_map, &key, sk, 0)) in copy_sock_map()
41 if (bpf_map_update_elem(&dst_sock_hash, &key, sk, 0)) in copy_sock_map()
Dtest_map_in_map.c38 bpf_map_update_elem(map, &key, &value, 0); in xdp_mimtest0()
47 bpf_map_update_elem(map, &key, &value, 0); in xdp_mimtest0()
Dtest_tcp_check_syncookie_kern.c137 bpf_map_update_elem(&results, &key_gen, &cookie, 0); in check_syncookie()
138 bpf_map_update_elem(&results, &key_mss, &mss, 0); in check_syncookie()
144 bpf_map_update_elem(&results, &key, &cookie, 0); in check_syncookie()
/kernel/linux/linux-5.10/samples/bpf/
Dmap_perf_test_kern.c112 bpf_map_update_elem(&hash_map, &key, &init_val, BPF_ANY); in SYSCALL()
127 bpf_map_update_elem(&percpu_hash_map, &key, &init_val, BPF_ANY); in SYSCALL()
141 bpf_map_update_elem(&hash_map_alloc, &key, &init_val, BPF_ANY); in SYSCALL()
155 bpf_map_update_elem(&percpu_hash_map_alloc, &key, &init_val, BPF_ANY); in SYSCALL()
204 ret = bpf_map_update_elem(&lru_hash_map, &key, &val, BPF_ANY); in SYSCALL()
206 ret = bpf_map_update_elem(&nocommon_lru_hash_map, &key, &val, in SYSCALL()
219 ret = bpf_map_update_elem(nolocal_lru_map, &key, &val, in SYSCALL()
Dtest_map_in_map_user.c52 ret = bpf_map_update_elem(PORT_A, &port_key, &magic_result, BPF_ANY); in populate_map()
55 ret = bpf_map_update_elem(PORT_H, &port_key, &magic_result, in populate_map()
59 ret = bpf_map_update_elem(A_OF_PORT_A, &port_key, &PORT_A, BPF_ANY); in populate_map()
63 ret = bpf_map_update_elem(H_OF_PORT_A, &port_key, &PORT_A, BPF_NOEXIST); in populate_map()
67 ret = bpf_map_update_elem(H_OF_PORT_H, &port_key, &PORT_H, BPF_NOEXIST); in populate_map()
Dtest_lru_dist.c153 bpf_map_update_elem(lru->map_fd, &node->key, &null_node, BPF_EXIST); in pfect_lru_lookup_or_insert()
161 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_EXIST)); in pfect_lru_lookup_or_insert()
164 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_NOEXIST)); in pfect_lru_lookup_or_insert()
290 if (bpf_map_update_elem(lru_map_fd, &key, &value, BPF_NOEXIST)) { in do_test_lru_dist()
360 assert(bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST) == 0); in test_lru_loss0()
410 assert(!bpf_map_update_elem(map_fd, &key, value, BPF_NOEXIST)); in test_lru_loss1()
438 assert(bpf_map_update_elem(map_fd, &next_ins_key, value, in do_test_parallel_lru_loss()
452 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()
Doffwaketime_kern.c78 bpf_map_update_elem(&wokeby, &pid, &woke, BPF_ANY); in waker()
102 bpf_map_update_elem(&counts, &key, &zero, BPF_NOEXIST); in update_counts()
139 bpf_map_update_elem(&start, &pid, &ts, BPF_ANY);
Dtracex6_kern.c43 bpf_map_update_elem(&values, &key, &count, BPF_NOEXIST); in bpf_prog1()
63 bpf_map_update_elem(&values2, &key, &buf, BPF_NOEXIST); in bpf_prog2()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/map_tests/
Dsk_storage_map.c193 err = bpf_map_update_elem(map_fd, &sk_fds[i], &value, in insert_close_thread()
292 err = bpf_map_update_elem(map_fd, &sk_fd, &value, 0); in update_thread()
484 err = bpf_map_update_elem(map_fd, &sk_fd, &value, in test_sk_storage_map_basic()
497 err = bpf_map_update_elem(map_fd, &sk_fd, &value, in test_sk_storage_map_basic()
510 err = bpf_map_update_elem(map_fd, &sk_fd, &value, BPF_EXIST); in test_sk_storage_map_basic()
522 err = bpf_map_update_elem(map_fd, &sk_fd, &value, in test_sk_storage_map_basic()
527 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()
/kernel/linux/linux-5.10/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()
Dbpf-script-example.c17 static void *(*bpf_map_update_elem)(void *map, void *key, void *value, int flags) = variable
45 bpf_map_update_elem(&flip_table, &ind, &new_flag, BPF_ANY); in bpf_func__SyS_epoll_pwait()

123456