summaryrefslogtreecommitdiffstats
path: root/samples/bpf/Makefile
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2020-10-10 20:17:33 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-10-11 21:14:36 +0200
commit151936bf51afcdd6db52b3b73e339d021064b0ea (patch)
tree18efa2d681bf805b1a564eda4be8bc070fad4321 /samples/bpf/Makefile
parentsamples: bpf: Refactor xdp_monitor with libbpf (diff)
downloadlinux-151936bf51afcdd6db52b3b73e339d021064b0ea.tar.xz
linux-151936bf51afcdd6db52b3b73e339d021064b0ea.zip
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/Makefile')
-rw-r--r--samples/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 50ad7e8b05bc..aeebf5d12f32 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -98,7 +98,7 @@ test_map_in_map-objs := test_map_in_map_user.o
per_socket_stats_example-objs := cookie_uid_helper_example.o
xdp_redirect-objs := xdp_redirect_user.o
xdp_redirect_map-objs := xdp_redirect_map_user.o
-xdp_redirect_cpu-objs := bpf_load.o xdp_redirect_cpu_user.o
+xdp_redirect_cpu-objs := xdp_redirect_cpu_user.o
xdp_monitor-objs := xdp_monitor_user.o
xdp_rxq_info-objs := xdp_rxq_info_user.o
syscall_tp-objs := syscall_tp_user.o