]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: Convert xdp_redirect_map_multi_kern.o to XDP samples helper
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sat, 21 Aug 2021 00:20:09 +0000 (05:50 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Aug 2021 21:48:42 +0000 (14:48 -0700)
commit4c1c64ed850b2456bfbc5165720a65160fa58a5c
tree9734e87e37aa762df01337b46065b44f44e4a8d7
parent29bbfbc3a94a9e2311d8bbc8c2957a0cd24b4f70
samples: bpf: Convert xdp_redirect_map_multi_kern.o to XDP samples helper

One of the notable changes is using a BPF_MAP_TYPE_HASH instead of array
map to store mac addresses of devices, as the resizing behavior was
based on max_ifindex, which unecessarily maximized the capacity of map
beyond what was needed.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210821002010.845777-22-memxor@gmail.com
samples/bpf/Makefile
samples/bpf/xdp_redirect_map_multi.bpf.c [new file with mode: 0644]
samples/bpf/xdp_redirect_map_multi_kern.c [deleted file]