diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-05-10 13:24:43 -0400 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-10 19:44:17 -0400 |
| commit | be5bca44aa6b37b88e900d5f5f155911d6984d86 (patch) | |
| tree | 880940e6af0c8352acc8c5f2158ec1457a2dc08c /samples/bpf/Makefile | |
| parent | 17387dd5ac2c9c4e5f7d38b5affcd70e059f0a8c (diff) | |
samples: bpf: convert some XDP samples from bpf_load to libbpf
Now that we can use full powers of libbpf in BPF samples, we
should perhaps make the simplest XDP programs not depend on
bpf_load helpers. This way newcomers will be exposed to the
recommended library from the start.
Use of bpf_prog_load_xattr() will also make it trivial to later
on request offload of the programs by simply adding ifindex to
the xattr.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples/bpf/Makefile')
| -rw-r--r-- | samples/bpf/Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 8ce72d211c3e..9e255ca4059a 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile | |||
| @@ -79,9 +79,9 @@ test_cgrp2_attach-objs := test_cgrp2_attach.o $(LIBBPF) | |||
| 79 | test_cgrp2_attach2-objs := test_cgrp2_attach2.o $(LIBBPF) $(CGROUP_HELPERS) | 79 | test_cgrp2_attach2-objs := test_cgrp2_attach2.o $(LIBBPF) $(CGROUP_HELPERS) |
| 80 | test_cgrp2_sock-objs := test_cgrp2_sock.o $(LIBBPF) | 80 | test_cgrp2_sock-objs := test_cgrp2_sock.o $(LIBBPF) |
| 81 | test_cgrp2_sock2-objs := bpf_load.o $(LIBBPF) test_cgrp2_sock2.o | 81 | test_cgrp2_sock2-objs := bpf_load.o $(LIBBPF) test_cgrp2_sock2.o |
| 82 | xdp1-objs := bpf_load.o $(LIBBPF) xdp1_user.o | 82 | xdp1-objs := xdp1_user.o $(LIBBPF) |
| 83 | # reuse xdp1 source intentionally | 83 | # reuse xdp1 source intentionally |
| 84 | xdp2-objs := bpf_load.o $(LIBBPF) xdp1_user.o | 84 | xdp2-objs := xdp1_user.o $(LIBBPF) |
| 85 | xdp_router_ipv4-objs := bpf_load.o $(LIBBPF) xdp_router_ipv4_user.o | 85 | xdp_router_ipv4-objs := bpf_load.o $(LIBBPF) xdp_router_ipv4_user.o |
| 86 | test_current_task_under_cgroup-objs := bpf_load.o $(LIBBPF) $(CGROUP_HELPERS) \ | 86 | test_current_task_under_cgroup-objs := bpf_load.o $(LIBBPF) $(CGROUP_HELPERS) \ |
| 87 | test_current_task_under_cgroup_user.o | 87 | test_current_task_under_cgroup_user.o |
| @@ -96,10 +96,10 @@ xdp_redirect-objs := bpf_load.o $(LIBBPF) xdp_redirect_user.o | |||
| 96 | xdp_redirect_map-objs := bpf_load.o $(LIBBPF) xdp_redirect_map_user.o | 96 | xdp_redirect_map-objs := bpf_load.o $(LIBBPF) xdp_redirect_map_user.o |
| 97 | xdp_redirect_cpu-objs := bpf_load.o $(LIBBPF) xdp_redirect_cpu_user.o | 97 | xdp_redirect_cpu-objs := bpf_load.o $(LIBBPF) xdp_redirect_cpu_user.o |
| 98 | xdp_monitor-objs := bpf_load.o $(LIBBPF) xdp_monitor_user.o | 98 | xdp_monitor-objs := bpf_load.o $(LIBBPF) xdp_monitor_user.o |
| 99 | xdp_rxq_info-objs := bpf_load.o $(LIBBPF) xdp_rxq_info_user.o | 99 | xdp_rxq_info-objs := xdp_rxq_info_user.o $(LIBBPF) |
| 100 | syscall_tp-objs := bpf_load.o $(LIBBPF) syscall_tp_user.o | 100 | syscall_tp-objs := bpf_load.o $(LIBBPF) syscall_tp_user.o |
| 101 | cpustat-objs := bpf_load.o $(LIBBPF) cpustat_user.o | 101 | cpustat-objs := bpf_load.o $(LIBBPF) cpustat_user.o |
| 102 | xdp_adjust_tail-objs := bpf_load.o $(LIBBPF) xdp_adjust_tail_user.o | 102 | xdp_adjust_tail-objs := xdp_adjust_tail_user.o $(LIBBPF) |
| 103 | xdpsock-objs := bpf_load.o $(LIBBPF) xdpsock_user.o | 103 | xdpsock-objs := bpf_load.o $(LIBBPF) xdpsock_user.o |
| 104 | xdp_fwd-objs := bpf_load.o $(LIBBPF) xdp_fwd_user.o | 104 | xdp_fwd-objs := bpf_load.o $(LIBBPF) xdp_fwd_user.o |
| 105 | 105 | ||
