Lines Matching +full:group +full:- +full:index +full:- +full:bits
1 .. SPDX-License-Identifier: GPL-2.0-only
9 - ``BPF_MAP_TYPE_DEVMAP`` was introduced in kernel version 4.14
10 - ``BPF_MAP_TYPE_DEVMAP_HASH`` was introduced in kernel version 5.4
15 the index to lookup a reference to a net device. While ``BPF_MAP_TYPE_DEVMAP_HASH``
21 - The key to a hash map doesn't have to be an ``ifindex``.
22 - While ``BPF_MAP_TYPE_DEVMAP_HASH`` allows for densely packing the net devices
31 ----------
34 .. code-block:: c
38 Redirect the packet to the endpoint referenced by ``map`` at index ``key``.
42 The lower two bits of *flags* are used as the return code if the map lookup
44 codes up to ``XDP_TX``, as chosen by the caller. The higher bits of ``flags``
53 - The key is ignored if BPF_F_BROADCAST is set.
54 - The broadcast feature can also be used to implement multicast forwarding:
55 simply create multiple DEVMAPs, each one corresponding to a single multicast group.
58 lower bits of the ``flags`` argument if the map lookup fails.
64 .. code-block:: c
72 ----------
80 .. code-block:: c
89 .. code-block:: c
92 __u32 ifindex; /* device index */
100 - ``BPF_ANY``: Create a new element or update an existing element.
101 - ``BPF_NOEXIST``: Create a new element only if it did not exist.
102 - ``BPF_EXIST``: Update an existing element.
108 When a program is associated with a device index, the program is run on an
109 ``XDP_REDIRECT`` and before the buffer is added to the per-cpu queue. Examples
112 - ``tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c``
113 - ``tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c``
117 .. code-block:: c
127 .. code-block:: c
140 ----------
145 .. code-block:: c
157 .. code-block:: c
175 .. code-block:: c
180 int index = ctx->ingress_ifindex;
182 return bpf_redirect_map(&forward_map, index, 0);
188 .. code-block:: c
197 ----------
201 .. code-block:: c
218 .. code-block:: c
236 - https://lwn.net/Articles/728146/
237 - https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=6f9d451ab1a33728adb72…
238 - https://elixir.bootlin.com/linux/latest/source/net/core/filter.c#L4106