summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xsk.h
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2023-01-11 10:35:22 +0100
committerAlexei Starovoitov <ast@kernel.org>2023-01-11 18:16:52 -0800
commitf0a249df1b071d6f7177cc615d688a3a5d48423a (patch)
treeadf3dbb2056627e34483fe2cf808288a4fdb6e6a /tools/testing/selftests/bpf/xsk.h
parent6b3c0821caa49538c49262b041bae59bad523c7c (diff)
selftests/xsk: get rid of built-in XDP program
Get rid of the built-in XDP program that was part of the old libbpf code in xsk.c and replace it with an eBPF program build using the framework by all the other bpf selftests. This will form the base for adding more programs in later commits. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/r/20230111093526.11682-12-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xsk.h')
-rw-r--r--tools/testing/selftests/bpf/xsk.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/xsk.h b/tools/testing/selftests/bpf/xsk.h
index bd5b55ad9f8a..5624d31b8db7 100644
--- a/tools/testing/selftests/bpf/xsk.h
+++ b/tools/testing/selftests/bpf/xsk.h
@@ -197,8 +197,10 @@ struct xsk_umem_config {
__u32 flags;
};
-int xsk_load_xdp_program(int *xsk_map_fd, int *prog_fd);
-int xsk_attach_xdp_program(int ifindex, int prog_fd, u32 xdp_flags);
+int xsk_attach_xdp_program(struct bpf_program *prog, int ifindex, u32 xdp_flags);
+void xsk_detach_xdp_program(int ifindex, u32 xdp_flags);
+int xsk_update_xskmap(struct bpf_map *map, struct xsk_socket *xsk);
+void xsk_clear_xskmap(struct bpf_map *map);
struct xsk_socket_config {
__u32 rx_size;