Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 51) sorted by relevance

123

/samples/bpf/
A Dsockex1_kern.c11 __type(value, long);
19 long *value; in bpf_prog1() local
24 value = bpf_map_lookup_elem(&my_map, &index); in bpf_prog1()
25 if (value) in bpf_prog1()
26 __sync_fetch_and_add(value, skb->len); in bpf_prog1()
A Dsampleip_kern.c18 __type(value, u32);
26 u32 *value, init_val = 1; in do_sample() local
29 value = bpf_map_lookup_elem(&ip_map, &ip); in do_sample()
30 if (value) in do_sample()
31 *value += 1; in do_sample()
A Dmap_perf_test.bpf.c20 __type(value, long);
108 long *value; in BPF_KSYSCALL() local
114 if (value) in BPF_KSYSCALL()
126 long *value; in BPF_KSYSCALL() local
132 if (value) in BPF_KSYSCALL()
143 long *value; in BPF_KSYSCALL() local
149 if (value) in BPF_KSYSCALL()
160 long *value; in BPF_KSYSCALL() local
166 if (value) in BPF_KSYSCALL()
274 long *value; in BPF_KSYSCALL() local
[all …]
A Dtracex3.bpf.c21 __type(value, u64);
66 u64 *value, l, base; in bpf_prog2() local
69 value = bpf_map_lookup_elem(&my_map, &key); in bpf_prog2()
70 if (!value) in bpf_prog2()
74 u64 delta = cur_time - *value; in bpf_prog2()
93 value = bpf_map_lookup_elem(&lat_map, &index); in bpf_prog2()
94 if (value) in bpf_prog2()
95 *value += 1; in bpf_prog2()
A Dsyscall_tp_kern.c35 __type(value, u32);
42 __type(value, u32);
49 u32 *value, init_val = 1; in count() local
51 value = bpf_map_lookup_elem(map, &key); in count()
52 if (value) in count()
53 *value += 1; in count()
A Dlwt_len_hist.bpf.c19 __type(value, u64);
49 __u64 *value, key, init_val = 1; in do_len_hist() local
53 value = bpf_map_lookup_elem(&lwt_len_hist_map, &key); in do_len_hist()
54 if (value) in do_len_hist()
55 __sync_fetch_and_add(value, 1); in do_len_hist()
A Dsockex2_user.c50 struct pair value; in main() local
53 bpf_map_lookup_elem(map_fd, &next_key, &value); in main()
56 value.bytes, value.packets); in main()
A Dtracex3_user.c81 __u64 value; in print_hist() local
87 value = 0; in print_hist()
89 value += values[i]; in print_hist()
90 cnt[key] = value; in print_hist()
91 total_events += value; in print_hist()
92 if (value > max_cnt) in print_hist()
93 max_cnt = value; in print_hist()
A Dfds_example.c78 uint32_t value) in bpf_do_map() argument
98 ret = bpf_map_update_elem(fd, &key, &value, 0); in bpf_do_map()
99 printf("bpf: fd:%d u->(%u:%u) ret:(%d,%s)\n", fd, key, value, in bpf_do_map()
103 ret = bpf_map_lookup_elem(fd, &key, &value); in bpf_do_map()
104 printf("bpf: fd:%d l->(%u):%u ret:(%d,%s)\n", fd, key, value, in bpf_do_map()
144 uint32_t key = 0, value = 0, flags = 0; in main() local
168 value = strtoul(optarg, NULL, 0); in main()
188 return bpf_do_map(file, flags, key, value); in main()
A Dspintest_user.c14 long key, next_key, value; in main() local
59 bpf_map_lookup_elem(map_fd, &next_key, &value); in main()
60 assert(next_key == value); in main()
61 sym = ksym_search(value); in main()
A Dlathist_user.c63 long key, value; in get_data() local
72 bpf_map_lookup_elem(fd, &key, &value); in get_data()
74 cpu_hist[c].data[i] = value; in get_data()
75 if (value > cpu_hist[c].max) in get_data()
76 cpu_hist[c].max = value; in get_data()
A Dtest_lru_dist.c270 unsigned long long key, value = 1234; in do_test_lru_dist() local
334 unsigned long long key, value[nr_cpus]; in test_lru_loss0() local
352 value[0] = 1234; in test_lru_loss0()
369 if (bpf_map_lookup_elem(map_fd, &key, value)) { in test_lru_loss0()
388 unsigned long long key, value[nr_cpus]; in test_lru_loss1() local
404 value[0] = 1234; in test_lru_loss1()
410 if (bpf_map_lookup_elem(map_fd, &key, value)) in test_lru_loss1()
426 unsigned long long key, value[nr_cpus]; in do_test_parallel_lru_loss() local
433 value[0] = 1234; in do_test_parallel_lru_loss()
447 bpf_map_lookup_elem(map_fd, &key, value); in do_test_parallel_lru_loss()
[all …]
A Dsockex3_user.c81 struct pair value; in main() local
86 bpf_map_lookup_elem(hash_map_fd, &next_key, &value); in main()
92 value.bytes, value.packets); in main()
A Dibumad_user.c37 __u64 value; in dump_counts() local
40 if (bpf_map_lookup_elem(fd, &key, &value)) { in dump_counts()
44 if (value) in dump_counts()
45 printf("0x%02x : %llu\n", key, value); in dump_counts()
A Dcpustat_user.c80 unsigned long key, value; in cpu_stat_update() local
86 bpf_map_lookup_elem(cstate_fd, &key, &value); in cpu_stat_update()
87 stat_data[c].cstate[i] = value; in cpu_stat_update()
92 bpf_map_lookup_elem(pstate_fd, &key, &value); in cpu_stat_update()
93 stat_data[c].pstate[i] = value; in cpu_stat_update()
A Dsockex2_kern.c195 __type(value, struct pair);
203 struct pair *value; in bpf_prog2() local
210 value = bpf_map_lookup_elem(&hash_map, &key); in bpf_prog2()
211 if (value) { in bpf_prog2()
212 __sync_fetch_and_add(&value->packets, 1); in bpf_prog2()
213 __sync_fetch_and_add(&value->bytes, skb->len); in bpf_prog2()
A Dsockex3_kern.c65 __type(value, struct globals);
86 __type(value, struct pair);
93 struct pair *value; in update_stats() local
95 value = bpf_map_lookup_elem(&hash_map, &key); in update_stats()
96 if (value) { in update_stats()
97 __sync_fetch_and_add(&value->packets, 1); in update_stats()
98 __sync_fetch_and_add(&value->bytes, skb->len); in update_stats()
A Dtest_map_in_map.bpf.c24 __type(value, int);
32 __type(value, int);
40 __type(value, int);
48 __type(value, int);
A Dxdp_router_ipv4.bpf.c18 __be64 value; member
54 __type(value, __be64);
62 __type(value, struct direct_map);
142 src_mac = &prefix_value->value; in xdp_router_ipv4_prog()
A Doffwaketime_user.c80 __u64 value; in print_stacks() local
83 bpf_map_lookup_elem(fd, &next_key, &value); in print_stacks()
84 print_stack(&next_key, value); in print_stacks()
A Dtracex6.bpf.c17 __type(value, u64);
24 __type(value, struct bpf_perf_event_value);
A Dlathist_kern.c24 __type(value, u64);
67 __type(value, long);
/samples/rust/
A Drust_dma.rs69 for (i, value) in TEST_VALUES.into_iter().enumerate() { in probe()
70 kernel::dma_write!(ca[i] = MyStruct::new(value.0, value.1))?; in probe()
89 for (i, value) in TEST_VALUES.into_iter().enumerate() { in drop()
96 assert_eq!(val0, value.0); in drop()
99 assert_eq!(val1, value.1); in drop()
A Drust_misc_device.rs146 value: i32, field
168 inner <- new_mutex!( Inner{ value: 0_i32 } ), in open()
215 guard.value = new_value; in set_value()
221 let value = guard.value; in get_value()
229 &value in get_value()
232 writer.write::<i32>(&value)?; in get_value()
/samples/seccomp/
A Dbpf-helper.h135 #error __BITS_PER_LONG value unusable.
149 #define JEQ32(value, jt) \ argument
150 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (value), 0, 1), \
153 #define JNE32(value, jt) \ argument
154 BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, (value), 1, 0), \
157 #define JA32(value, jt) \ argument
161 #define JGE32(value, jt) \ argument
162 BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, (value), 0, 1), \
165 #define JGT32(value, jt) \ argument
169 #define JLE32(value, jt) \ argument
[all …]

Completed in 55 milliseconds

123