aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/samples/bpf/Makefile
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2021-08-21 05:50:03 +0530
committerAlexei Starovoitov <ast@kernel.org>2021-08-24 14:48:42 -0700
commit66fc4ca85d910bdeecf019c3999bc2df7c80b726 (patch)
tree876f438ed6c8027ff9dee479f886e3d89ebeecec /samples/bpf/Makefile
parentsamples: bpf: Convert xdp_monitor to XDP samples helper (diff)
downloadwireguard-linux-66fc4ca85d910bdeecf019c3999bc2df7c80b726.tar.xz
wireguard-linux-66fc4ca85d910bdeecf019c3999bc2df7c80b726.zip
samples: bpf: Convert xdp_redirect_kern.o to XDP samples helper
We moved swap_src_dst_mac to xdp_sample.bpf.h to be shared with other potential users, so drop it while moving code to the new file. Also, consistently use SEC("xdp") naming instead. 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-16-memxor@gmail.com
Diffstat (limited to 'samples/bpf/Makefile')
-rw-r--r--samples/bpf/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 479778439f5e..0b94a6acb348 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -163,7 +163,6 @@ always-y += tcp_clamp_kern.o
always-y += tcp_basertt_kern.o
always-y += tcp_tos_reflect_kern.o
always-y += tcp_dumpstats_kern.o
-always-y += xdp_redirect_kern.o
always-y += xdp_redirect_map_kern.o
always-y += xdp_redirect_map_multi_kern.o
always-y += xdp_redirect_cpu_kern.o
@@ -356,6 +355,7 @@ endef
CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG))
+$(obj)/xdp_redirect.bpf.o: $(obj)/xdp_sample.bpf.o
$(obj)/xdp_monitor.bpf.o: $(obj)/xdp_sample.bpf.o
$(obj)/%.bpf.o: $(src)/%.bpf.c $(obj)/vmlinux.h $(src)/xdp_sample.bpf.h $(src)/xdp_sample_shared.h
@@ -366,9 +366,10 @@ $(obj)/%.bpf.o: $(src)/%.bpf.c $(obj)/vmlinux.h $(src)/xdp_sample.bpf.h $(src)/x
-I$(srctree)/tools/lib $(CLANG_SYS_INCLUDES) \
-c $(filter %.bpf.c,$^) -o $@
-LINKED_SKELS := xdp_monitor.skel.h
+LINKED_SKELS := xdp_redirect.skel.h xdp_monitor.skel.h
clean-files += $(LINKED_SKELS)
+xdp_redirect.skel.h-deps := xdp_redirect.bpf.o xdp_sample.bpf.o
xdp_monitor.skel.h-deps := xdp_monitor.bpf.o xdp_sample.bpf.o
LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.bpf.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps)))