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
18 stored can be of any size, however, all array elements are aligned to 8
24 memory are allocated to store all array values, starting on the second page,
42 Array elements can be retrieved using the ``bpf_map_lookup_elem()`` helper.
43 This helper returns a pointer into the array element, so to avoid data races
54 Array elements can be updated using the ``bpf_map_update_elem()`` helper.
59 Since the array is of constant size, ``bpf_map_delete_elem()`` is not supported.
60 To clear an array element, you may use ``bpf_map_update_elem()`` to insert a
63 Per CPU Array
81 The ``bpf_map_lookup_percpu_elem()`` helper can be used to lookup the array
106 This snippet shows how to declare an array in a BPF program.
118 This example BPF program shows how to access an array element.
145 This snippet shows how to create an array, using ``bpf_map_create_opts`` to
167 This snippet shows how to initialize the elements of an array.
187 This snippet shows how to retrieve an element value from an array.
210 This snippet shows how to initialize the elements of a per CPU array.
232 This snippet shows how to access the per CPU elements of an array value.
259 in userspace, each value is an array with ``ncpus`` elements.