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)
commit594a116b2aa1985dbb5318c2be39b64b74ebff84
tree1c2a0c5a39e6f0e4cdc3685e3f98027f580ca48a
parenta29b3ca17ee69e3e5182f1ed29be6b6ec306c149
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