Lines Matching full:array
12 ``BPF_MAP_TYPE_ARRAY`` and ``BPF_MAP_TYPE_PERCPU_ARRAY`` provide generic array
14 of constant size. The size of the array is defined in ``max_entries`` at
15 creation time. All array elements are pre-allocated and zero initialized when
20 array elements are aligned to 8 bytes.
25 memory are allocated to store all array values, starting on the second page,
43 Array elements can be retrieved using the ``bpf_map_lookup_elem()`` helper.
44 This helper returns a pointer into the array element, so to avoid data races
55 Array elements can be updated using the ``bpf_map_update_elem()`` helper.
60 Since the array is of constant size, ``bpf_map_delete_elem()`` is not supported.
61 To clear an array element, you may use ``bpf_map_update_elem()`` to insert a
64 Per CPU Array
82 The ``bpf_map_lookup_percpu_elem()`` helper can be used to lookup the array
107 This snippet shows how to declare an array in a BPF program.
119 This example BPF program shows how to access an array element.
146 This snippet shows how to create an array, using ``bpf_map_create_opts`` to
168 This snippet shows how to initialize the elements of an array.
188 This snippet shows how to retrieve an element value from an array.
211 This snippet shows how to initialize the elements of a per CPU array.
233 This snippet shows how to access the per CPU elements of an array value.
260 in userspace, each value is an array with ``ncpus`` elements.