summaryrefslogtreecommitdiff
path: root/samples/bpf/xdp_sample_pkts_kern.c
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2020-10-11 03:17:33 +0900
committerAlexei Starovoitov <ast@kernel.org>2020-10-11 12:14:36 -0700
commit151936bf51afcdd6db52b3b73e339d021064b0ea (patch)
tree18efa2d681bf805b1a564eda4be8bc070fad4321 /samples/bpf/xdp_sample_pkts_kern.c
parent8ac91df6de164923c1025e340ea81d085fb4ab85 (diff)
samples: bpf: Replace attach_tracepoint() to attach() in xdp_redirect_cpu
>From commit d7a18ea7e8b6 ("libbpf: Add generic bpf_program__attach()"), for some BPF programs, it is now possible to attach BPF programs with __attach() instead of explicitly calling __attach_<type>(). This commit refactors the __attach_tracepoint() with libbpf's generic __attach() method. In addition, this refactors the logic of setting the map FD to simplify the code. Also, the missing removal of bpf_load.o in Makefile has been fixed. Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20201010181734.1109-3-danieltimlee@gmail.com
Diffstat (limited to 'samples/bpf/xdp_sample_pkts_kern.c')
0 files changed, 0 insertions, 0 deletions