Home
last modified time | relevance | path

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

1234

/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 …]
Dtest_tcp_check_syncookie_user.c130 if (bpf_map_update_elem(results_fd, &key, &value, 0) < 0) { in run_test()
135 if (bpf_map_update_elem(results_fd, &key_gen, &value_gen, 0) < 0) { in run_test()
140 if (bpf_map_update_elem(results_fd, &key_mss, &value_mss, 0) < 0) { in run_test()
/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 …]
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()
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.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()
Dxdp_devmap_attach.c44 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_helpers()
60 err = bpf_map_update_elem(map_fd, &idx, &val, 0); in test_xdp_with_devmap_helpers()
/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_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_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_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_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()
Dtest_tc_edt.c45 if (bpf_map_update_elem(&flow_map, &key, &tstamp, BPF_ANY)) in throttle_flow()
58 if (bpf_map_update_elem(&flow_map, &key, &next_tstamp, BPF_EXIST)) in throttle_flow()
Dtest_sockmap_invalid_update.c19 bpf_map_update_elem(&map, &key, skops->sk, 0); in bpf_sockmap()
Dtest_map_init.c28 bpf_map_update_elem(&hashmap1, &inKey, &inValue, BPF_NOEXIST); in sysenter_getpgid()
/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()
/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()
/tools/perf/include/bpf/
Dpid_filter.h13 return bpf_map_update_elem(pids, &pid, &value, BPF_NOEXIST); in pid_filter__add()

1234