Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 650) sorted by relevance

12345678910>>...26

/tools/testing/selftests/bpf/progs/
A Dtest_tunnel_kern.c63 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel()
85 __builtin_memset(&key, 0x0, sizeof(key)); in gre_set_tunnel_no_key()
122 __builtin_memset(&key, 0x0, sizeof(key)); in ip6gretap_set_tunnel()
154 key.tunnel_id, key.remote_ipv6[3], key.tunnel_label); in ip6gretap_get_tunnel()
166 __builtin_memset(&key, 0x0, sizeof(key)); in erspan_set_tunnel()
245 __builtin_memset(&key, 0x0, sizeof(key)); in ip4ip6erspan_set_tunnel()
334 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_dst()
373 __builtin_memset(&key, 0x0, sizeof(key)); in vxlan_set_tunnel_src()
421 key.tunnel_id, key.local_ipv4, in vxlan_get_tunnel_src()
498 __builtin_memset(&key, 0x0, sizeof(key)); in ip6vxlan_set_tunnel_dst()
[all …]
A Dwq.c22 __type(key, int);
30 __type(key, int);
42 __type(key, int);
49 __type(key, int);
123 ok |= (1 << *key); in wq_callback()
133 if (*key != offset) in wq_cb_sleepable()
146 int key = 0; in test_call_array_sleepable() local
156 int key = 1; in test_syscall_array_sleepable() local
166 int key = 2; in test_call_hash_sleepable() local
176 int key = 3; in test_call_hash_malloc_sleepable() local
[all …]
A Dmap_kptr_fail.c18 __type(key, int);
28 int key = 0; in size_not_bpf_dw() local
81 int key = 0; in misaligned_access_write() local
97 int key = 0; in misaligned_access_read() local
136 int key = 0; in reject_bad_type_match() local
156 int key = 0; in marked_as_untrusted_or_null() local
172 int key = 0; in correct_btf_id_check_size() local
190 int key = 0; in inherit_untrusted_on_walk() local
209 int key = 0; in reject_kptr_xchg_on_unref() local
224 int key = 0; in mark_ref_as_untrusted_or_null() local
[all …]
A Dtest_btf_map_in_map.c9 __type(key, int);
17 __type(key, int);
24 __type(key, int);
32 __type(key, int);
48 __type(key, int);
57 __type(key, int);
64 __type(key, int);
84 __type(key, int);
100 __type(key, int);
107 __type(key, int);
[all …]
A Dbpf_iter_bpf_hash_map.c17 __type(key, struct key_t);
24 __type(key, __u64);
31 __type(key, struct key_t);
48 struct key_t *key = ctx->key; in dump_bpf_hash_map() local
63 if (key == (void *)0 || val == (void *)0) in dump_bpf_hash_map()
70 __builtin_memcpy(&tmp_key, key, sizeof(struct key_t)); in dump_bpf_hash_map()
78 key_sum_a += key->a; in dump_bpf_hash_map()
79 key_sum_b += key->b; in dump_bpf_hash_map()
80 key_sum_c += key->c; in dump_bpf_hash_map()
105 if (key == (void *)0 || val == (void *)0) { in dump_bpf_hash_map()
[all …]
A Dwq_failures.c19 __type(key, int);
26 __type(key, int);
56 int key = 0; in __flag() local
58 val = bpf_map_lookup_elem(&array, &key); in __flag()
63 if (bpf_wq_init(wq, &key, 0) != 0) in __flag()
81 int key = 0; in __flag() local
83 val = bpf_map_lookup_elem(&array, &key); in __flag()
104 int key = 0; in test_wrong_wq_pointer() local
107 wq = bpf_map_lookup_elem(&array, &key); in test_wrong_wq_pointer()
130 int key = 0; in test_wrong_wq_pointer_offset() local
[all …]
A Dtest_map_in_map.c12 __type(key, __u32);
20 __type(key, int);
30 __type(key, __u32);
37 __type(key, __u32);
45 __type(key, __u32);
55 int key = 0; in xdp_mimtest0() local
58 map = bpf_map_lookup_elem(&mim_array, &key); in xdp_mimtest0()
62 bpf_map_update_elem(map, &key, &value, 0); in xdp_mimtest0()
63 value_p = bpf_map_lookup_elem(map, &key); in xdp_mimtest0()
67 map = bpf_map_lookup_elem(&mim_hash, &key); in xdp_mimtest0()
[all …]
/tools/testing/selftests/bpf/
A Dtest_lru_map.c283 for (key = 1; key < end_key; key++) in test_lru_sanity1()
289 for (key = 1; key < end_key; key++) { in test_lru_sanity1()
302 for (; key < end_key; key++) { in test_lru_sanity1()
352 for (key = 1; key < end_key; key++) in test_lru_sanity2()
380 for (key = 1; key < end_key; key++) { in test_lru_sanity2()
395 for (; key < end_key; key++) in test_lru_sanity2()
456 for (key = 1; key < end_key; key++) in test_lru_sanity3()
462 for (key = 1; key < end_key; key++) { in test_lru_sanity3()
513 for (key = 1; key <= 2 * tgt_free; key++) in test_lru_sanity4()
520 for (key = 1; key <= tgt_free; key++) { in test_lru_sanity4()
[all …]
A Dtest_bpftool_map.sh103 for key in 0 1 2; do
104 "$bpftool_path" map update name "$map_name" key $key 0 0 0 value 0 0 0 $key
118 local key="$4"
121 if ! "$bpftool_path" map lookup "$name_cmd" "$map_name" key $key 1>/dev/null; then
144 local key="$4"
148 if "$bpftool_path" map update "$name_cmd" "$map_name" key $key value \
173 local key="$4"
179 if ! "$bpftool_path" map lookup "$name_cmd" "$map_name" key $key 1>/dev/null; then
185 if "$bpftool_path" map delete "$name_cmd" "$map_name" key $key 2>/dev/null; then
198 if "$bpftool_path" map lookup "$name_cmd" "$map_name" key $key 1>/dev/null; then
[all …]
A Dbpf_arena_htab.h34 int key; member
45 if (l->hash == hash && l->key == key) in lookup_elem_raw()
51 static int htab_hash(int key) in htab_hash() argument
53 return key; in htab_hash()
56 __weak int htab_lookup_elem(htab_t *htab __arg_arena, int key) in htab_lookup_elem() argument
62 head = select_bucket(htab, key); in htab_lookup_elem()
63 l_old = lookup_elem_raw(head, htab_hash(key), key); in htab_lookup_elem()
75 head = select_bucket(htab, key); in htab_update_elem()
76 l_old = lookup_elem_raw(head, htab_hash(key), key); in htab_update_elem()
81 l_new->key = key; in htab_update_elem()
[all …]
A Dtest_maps.c44 key = 1; in test_hashmap()
62 key = 2; in test_hashmap()
84 key = 0; in test_hashmap()
89 key = 1; in test_hashmap()
91 key = 2; in test_hashmap()
93 key = 3; in test_hashmap()
98 key = 0; in test_hashmap()
113 key = 1; in test_hashmap()
276 key = i; value[0] = key; in helper_fill_hashmap()
491 for (key = 0; key < nr_keys; key++) in test_arraymap_percpu_many_keys()
[all …]
/tools/perf/arch/x86/util/
A Dkvm-stat.c33 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
59 struct event_key *key) in mmio_event_end() argument
76 struct event_key *key, in mmio_event_decode_key() argument
80 (unsigned long)key->key, in mmio_event_decode_key()
94 struct event_key *key) in ioport_event_get_key() argument
96 key->key = evsel__intval(evsel, sample, "port"); in ioport_event_get_key()
124 (unsigned long long)key->key, in ioport_event_decode_key()
138 struct event_key *key) in msr_event_get_key() argument
140 key->key = evsel__intval(evsel, sample, "ecx"); in msr_event_get_key()
168 (unsigned long long)key->key, in msr_event_decode_key()
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dlookup_and_delete.c18 for (key = 1; key < MAX_ENTRIES + 1; key++) { in fill_values()
35 for (key = 1; key < MAX_ENTRIES + 1; key++) { in fill_values_percpu()
114 key = 1; in test_lookup_and_delete_hash()
116 &key, sizeof(key), &value, sizeof(value), 0); in test_lookup_and_delete_hash()
150 key = 1; in test_lookup_and_delete_percpu_hash()
152 &key, sizeof(key), value, sizeof(value), 0); in test_lookup_and_delete_percpu_hash()
190 key = 3; in test_lookup_and_delete_lru_hash()
211 key = 1; in test_lookup_and_delete_lru_hash()
236 key = 3; in test_lookup_and_delete_lru_percpu_hash()
247 &key, sizeof(key), value, sizeof(value), 0); in test_lookup_and_delete_lru_percpu_hash()
[all …]
A Dcg_storage_multi.c92 struct bpf_cgroup_storage_key key; in test_egress_only() local
120 &key, &expected_cgroup_value)) in test_egress_only()
143 &key, &expected_cgroup_value)) in test_egress_only()
148 &key, &expected_cgroup_value)) in test_egress_only()
162 struct bpf_cgroup_storage_key key; in test_isolated() local
199 &key, &expected_cgroup_value)) in test_isolated()
204 &key, &expected_cgroup_value)) in test_isolated()
241 &key, &expected_cgroup_value)) in test_isolated()
275 __u64 key; in test_shared() local
316 key = get_cgroup_id(CHILD_CGROUP); in test_shared()
[all …]
/tools/testing/selftests/bpf/map_tests/
A Dlpm_trie_map_basic_ops.c35 uint8_t key[]; member
70 memcpy(node->key, key, n); in tlpm_add()
81 memcpy(node->key, key, n); in tlpm_add()
252 key = alloca(sizeof(*key) + keysize); in test_lpm_map()
253 memset(key, 0, sizeof(*key) + keysize); in test_lpm_map()
306 memcpy(key->data, list->key, keysize); in test_lpm_map()
814 key.data = 0; in test_lpm_trie_update_flags()
1022 memset(key.data, 0, sizeof(key.data)); in test_lpm_trie_iterate_strs()
1046 memset(key.data, 0, sizeof(key.data)); in test_lpm_trie_iterate_strs()
1056 key.prefixlen = sizeof(key.data) * 8; in test_lpm_trie_iterate_strs()
[all …]
/tools/perf/util/bpf_skel/
A Dkwork_trace.bpf.c208 struct work_key *key, in update_timeend_and_name() argument
224 struct work_key key = { in report_irq_handler_entry() local
240 struct work_key key = { in report_irq_handler_exit() local
266 struct work_key key = { in report_softirq_entry() local
284 struct work_key key = { in report_softirq_exit() local
297 struct work_key key = { in latency_softirq_raise() local
315 struct work_key key = { in latency_softirq_entry() local
327 struct work_key key = { in report_workqueue_execute_start() local
340 struct work_key key = { in report_workqueue_execute_end() local
357 struct work_key key = { in latency_workqueue_activate_work() local
[all …]
/tools/perf/arch/s390/util/
A Dkvm-stat.c28 struct event_key *key) in event_icpt_insn_get_key() argument
33 key->key = icpt_insn_decoder(insn); in event_icpt_insn_get_key()
34 key->exit_reasons = sie_icpt_insn_codes; in event_icpt_insn_get_key()
39 struct event_key *key) in event_sigp_get_key() argument
41 key->key = evsel__intval(evsel, sample, "order_code"); in event_sigp_get_key()
47 struct event_key *key) in event_diag_get_key() argument
49 key->key = evsel__intval(evsel, sample, "code"); in event_diag_get_key()
50 key->exit_reasons = sie_diagnose_codes; in event_diag_get_key()
55 struct event_key *key) in event_icpt_prog_get_key() argument
57 key->key = evsel__intval(evsel, sample, "code"); in event_icpt_prog_get_key()
[all …]
/tools/perf/arch/arm64/util/
A Dkvm-stat.c26 struct event_key *key) in event_get_key() argument
28 key->info = 0; in event_get_key()
29 key->key = evsel__intval(evsel, sample, kvm_exit_reason); in event_get_key()
30 key->exit_reasons = arm64_exit_reasons; in event_get_key()
37 if (key->key == ARM_EXCEPTION_TRAP) { in event_get_key()
38 key->key = evsel__intval(evsel, sample, kvm_trap_exit_reason); in event_get_key()
39 key->exit_reasons = arm64_trap_exit_reasons; in event_get_key()
45 struct event_key *key __maybe_unused) in event_begin()
52 struct event_key *key) in event_end() argument
55 event_get_key(evsel, sample, key); in event_end()
/tools/perf/arch/loongarch/util/
A Dkvm-stat.c60 struct perf_sample *sample, struct event_key *key) in event_begin() argument
62 return exit_event_begin(evsel, sample, key); in event_begin()
67 struct event_key *key __maybe_unused) in event_end()
81 struct perf_sample *sample, struct event_key *key) in event_gspr_get_key() argument
85 key->key = LOONGARCH_EXCEPTION_OTHERS; in event_gspr_get_key()
92 key->key = LOONGARCH_EXCEPTION_CPUCFG; in event_gspr_get_key()
96 key->key = LOONGARCH_EXCEPTION_CSR; in event_gspr_get_key()
101 key->key = LOONGARCH_EXCEPTION_IOCSR; in event_gspr_get_key()
104 key->key = LOONGARCH_EXCEPTION_IDLE; in event_gspr_get_key()
107 key->key = LOONGARCH_EXCEPTION_OTHERS; in event_gspr_get_key()
/tools/perf/ui/
A Dkeysyms.c7 const char *key_name(int key, char *bf, size_t size) in key_name() argument
9 if (isprint(key)) { in key_name()
10 scnprintf(bf, size, "%c", key); in key_name()
11 } else if (key < 32) { in key_name()
12 scnprintf(bf, size, "Ctrl+%c", key + '@'); in key_name()
16 switch (key) { in key_name()
33 if (key >= SL_KEY_F(1) && key <= SL_KEY_F(63)) in key_name()
34 scnprintf(bf, size, "F%d", key - SL_KEY_F(0)); in key_name()
36 scnprintf(bf, size, "Unknown (%d)", key); in key_name()
/tools/testing/selftests/vDSO/
A Dvdso_test_chacha.c37 static void reference_chacha20_blocks(uint8_t *dst_bytes, const uint32_t *key, uint32_t *counter, s… in reference_chacha20_blocks() argument
41 key[0], key[1], key[2], key[3], key[4], key[5], key[6], key[7], in reference_chacha20_blocks()
86 uint32_t key[8], counter1[2], counter2[2]; in main() local
95 if (getrandom(key, sizeof(key), 0) != sizeof(key)) in main()
98 reference_chacha20_blocks(output1, key, counter1, BLOCKS); in main()
103 __arch_chacha20_blocks_nostack(output2, key, counter2, split); in main()
104 __arch_chacha20_blocks_nostack(output2 + split * BLOCK_SIZE, key, counter2, BLOCKS - split); in main()
116 reference_chacha20_blocks(output1, key, counter1, BLOCKS); in main()
117 __arch_chacha20_blocks_nostack(output2, key, counter2, BLOCKS); in main()
123 reference_chacha20_blocks(output1, key, counter1, BLOCKS); in main()
[all …]
/tools/perf/util/
A Dkvm-stat.c15 struct event_key *key) in exit_event_get_key() argument
17 key->info = 0; in exit_event_get_key()
18 key->key = evsel__intval(evsel, sample, kvm_exit_reason); in exit_event_get_key()
23 struct perf_sample *sample, struct event_key *key) in exit_event_begin() argument
26 exit_event_get_key(evsel, sample, key); in exit_event_begin()
40 struct event_key *key __maybe_unused) in exit_event_end()
61 struct event_key *key, in exit_event_decode_key() argument
64 const char *exit_reason = get_exit_reason(kvm, key->exit_reasons, in exit_event_decode_key()
65 key->key); in exit_event_decode_key()
A Dhashmap.h43 typedef size_t (*hashmap_hash_fn)(long key, void *ctx);
62 long key; member
129 int hashmap_insert(struct hashmap *map, long key, long value,
138 #define hashmap__add(map, key, value) \ argument
141 #define hashmap__set(map, key, value, old_key, old_value) \ argument
147 #define hashmap__append(map, key, value) \ argument
153 hashmap_delete((map), (long)(key), \
159 #define hashmap__find(map, key, value) \ argument
160 hashmap_find((map), (long)(key), hashmap_cast_ptr(value))
198 if ((map)->equal_fn(cur->key, (_key), (map)->ctx))
[all …]
/tools/lib/bpf/
A Dhashmap.h43 typedef size_t (*hashmap_hash_fn)(long key, void *ctx);
62 long key; member
129 int hashmap_insert(struct hashmap *map, long key, long value,
138 #define hashmap__add(map, key, value) \ argument
141 #define hashmap__set(map, key, value, old_key, old_value) \ argument
147 #define hashmap__append(map, key, value) \ argument
153 hashmap_delete((map), (long)(key), \
159 #define hashmap__find(map, key, value) \ argument
160 hashmap_find((map), (long)(key), hashmap_cast_ptr(value))
198 if ((map)->equal_fn(cur->key, (_key), (map)->ctx))
[all …]
/tools/testing/selftests/riscv/hwprobe/
A Dhwprobe.c22 pairs[i].key = i; in main()
30 if ((i < 4) && (pairs[i].key != i)) in main()
32 "key=%lld, i=%ld\n", pairs[i].key, i); in main()
34 if (pairs[i].key != RISCV_HWPROBE_KEY_BASE_BEHAVIOR) in main()
40 ksft_exit_fail_msg("Unexpected pair: (%lld, %llu)\n", pairs[i].key, pairs[i].value); in main()
52 pairs[0].key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR; in main()
54 ksft_test_result(out == 0 && pairs[0].key == RISCV_HWPROBE_KEY_BASE_BEHAVIOR, in main()
57 pairs[0].key = 0x5555; in main()
58 pairs[1].key = 1; in main()
61 ksft_test_result(out == 0 && pairs[0].key == -1 && in main()
[all …]

Completed in 63 milliseconds

12345678910>>...26