OSDN Git Service

samples: bpf: Convert xdp_redirect_map to XDP samples helper
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sat, 21 Aug 2021 00:20:08 +0000 (05:50 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Aug 2021 21:48:42 +0000 (14:48 -0700)
commitbbe65865aa05fdbd20e37bbd3b2c95a0e9e24416
treeacc8a86748d737aa09b76538525ae265c6793832
parent54af769db92a47be8a9d23a4434dbd343b36f216
samples: bpf: Convert xdp_redirect_map to XDP samples helper

Use the libbpf skeleton facility and other utilities provided by XDP
samples helper.

Since get_mac_addr is already provided by XDP samples helper, we drop
it. Also convert to XDP samples helper similar to prior samples to
minimize duplication of code.

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-21-memxor@gmail.com
samples/bpf/Makefile
samples/bpf/xdp_redirect_map_user.c