Lines Matching refs:value
17 CPU whereas ``BPF_MAP_TYPE_ARRAY`` uses the same memory region. The value
44 with userspace reading the value, the user must use primitives like
45 ``__sync_fetch_and_add()`` when updating the value in-place.
52 long bpf_map_update_elem(struct bpf_map *map, const void *key, const void *value, u64 flags)
61 zero value to that index.
82 value for a specific CPU. Returns value on success , or ``NULL`` if no entry was
113 __type(value, long);
126 long *value;
132 value = bpf_map_lookup_elem(&my_map, &index);
133 if (value)
134 __sync_fetch_and_add(value, skb->len);
161 sizeof(long), /* value size */
174 long value;
178 value = i;
179 ret = bpf_map_update_elem(fd, &i, &value, BPF_ANY);
187 This snippet shows how to retrieve an element value from an array.
194 long value;
197 ret = bpf_map_lookup_elem(fd, &index, &value);
201 /* use value here */
202 assert(value == 42);
232 This snippet shows how to access the per CPU elements of an array value.
248 /* Use per CPU value here */
259 in userspace, each value is an array with ``ncpus`` elements.