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

Use the libbpf skeleton facility and other utilities provided by XDP
samples helper. Also adapt to change of type of mac address map, so that
no resizing is required.

Add a new flag for sample mask that skips priting the
from_device->to_device heading for each line, as xdp_redirect_map_multi
may have two devices but the flow of data may be bidirectional, so the
output would be confusing.

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-23-memxor@gmail.com
samples/bpf/Makefile
samples/bpf/xdp_redirect_map_multi_user.c
samples/bpf/xdp_sample_user.c
samples/bpf/xdp_sample_user.h