OSDN Git Service

samples/bpf: Remove the xdp1 and xdp2 utilities
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 24 Aug 2023 10:22:47 +0000 (12:22 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 24 Aug 2023 15:43:50 +0000 (08:43 -0700)
commiteaca21d6eee9bb9b9f53c1c187d488ff1cbb6168
treea3960c2954b9c0f6fa2251cb06f65a034b71d136
parent0e445e115f8f4f3d3de5b9199dc2da83d75b1f3c
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>
samples/bpf/Makefile
samples/bpf/xdp1_kern.c [deleted file]
samples/bpf/xdp1_user.c [deleted file]
samples/bpf/xdp2_kern.c [deleted file]