Skip to content

Commit eaca21d

Browse files
tohojoAlexei Starovoitov
authored andcommitted
samples/bpf: Remove the xdp1 and xdp2 utilities
The functionality of these utilities have been incorporated into the xdp-bench utility in xdp-tools. Equivalent functionality is: xdp1 eth0 --> xdp-bench drop -p parse-ip -l load-bytes eth0 xdp2 eth0 --> xdp-bench drop -p swap-macs eth0 Note that there's a slight difference in behaviour of those examples: the swap-macs operation of xdp-bench doesn't use the bpf_xdp_load_bytes() helper to load the packet data, whereas the xdp2 utility did so unconditionally. For the parse-ip action the use of bpf_xdp_load_bytes() can be selected by the '-l load-bytes' switch, with the difference that the xdp-bench utility will perform two separate calls to the helper, one to load the ethernet header and another to load the IP header; where the xdp1 utility only performed one call always loading 60 bytes of data. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/r/20230824102255.1561885-5-toke@redhat.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 0e445e1 commit eaca21d

File tree

4 files changed

+0
-398
lines changed

4 files changed

+0
-398
lines changed

samples/bpf/Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ tprogs-y += test_cgrp2_array_pin
3030
tprogs-y += test_cgrp2_attach
3131
tprogs-y += test_cgrp2_sock
3232
tprogs-y += test_cgrp2_sock2
33-
tprogs-y += xdp1
34-
tprogs-y += xdp2
3533
tprogs-y += xdp_router_ipv4
3634
tprogs-y += test_current_task_under_cgroup
3735
tprogs-y += trace_event
@@ -83,9 +81,6 @@ test_cgrp2_array_pin-objs := test_cgrp2_array_pin.o
8381
test_cgrp2_attach-objs := test_cgrp2_attach.o
8482
test_cgrp2_sock-objs := test_cgrp2_sock.o
8583
test_cgrp2_sock2-objs := test_cgrp2_sock2.o
86-
xdp1-objs := xdp1_user.o
87-
# reuse xdp1 source intentionally
88-
xdp2-objs := xdp1_user.o
8984
test_current_task_under_cgroup-objs := $(CGROUP_HELPERS) \
9085
test_current_task_under_cgroup_user.o
9186
trace_event-objs := trace_event_user.o $(TRACE_HELPERS)
@@ -132,8 +127,6 @@ always-y += test_overhead_raw_tp.bpf.o
132127
always-y += test_overhead_kprobe.bpf.o
133128
always-y += parse_varlen.o parse_simple.o parse_ldabs.o
134129
always-y += test_cgrp2_tc.bpf.o
135-
always-y += xdp1_kern.o
136-
always-y += xdp2_kern.o
137130
always-y += test_current_task_under_cgroup.bpf.o
138131
always-y += trace_event_kern.o
139132
always-y += sampleip_kern.o

samples/bpf/xdp1_kern.c

Lines changed: 0 additions & 100 deletions
This file was deleted.

samples/bpf/xdp1_user.c

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)