Commit f3660063 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov
Browse files

libbpf: move xsk.{c,h} into selftests/bpf



Remove deprecated xsk APIs from libbpf. But given we have selftests
relying on this, move those files (with minimal adjustments to make them
compilable) under selftests/bpf.

We also remove all the removed APIs from libbpf.map, while overall
keeping version inheritance chain, as most APIs are backwards
compatible so there is no need to reassign them as LIBBPF_1.0.0 versions.

Cc: Magnus Karlsson <magnus.karlsson@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220627211527.2245459-2-andrii@kernel.org


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 697fb80a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
libbpf-y := libbpf.o bpf.o nlattr.o btf.o libbpf_errno.o str_error.o \
	    netlink.o bpf_prog_linfo.o libbpf_probes.o xsk.o hashmap.o \
	    netlink.o bpf_prog_linfo.o libbpf_probes.o hashmap.o \
	    btf_dump.o ringbuf.o strset.o linker.o gen_loader.o relo_core.o \
	    usdt.o
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ install_lib: all_cmd
		$(call do_install_mkdir,$(libdir_SQ)); \
		cp -fpR $(LIB_FILE) $(DESTDIR)$(libdir_SQ)

SRC_HDRS := bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h xsk.h	     \
SRC_HDRS := bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h	     \
	    bpf_helpers.h bpf_tracing.h bpf_endian.h bpf_core_read.h	     \
	    skel_internal.h libbpf_version.h usdt.bpf.h
GEN_HDRS := $(BPF_GENERATED)
+0 −12
Original line number Diff line number Diff line
@@ -147,12 +147,6 @@ LIBBPF_0.0.2 {
		btf_ext__new;
		btf_ext__reloc_func_info;
		btf_ext__reloc_line_info;
		xsk_umem__create;
		xsk_socket__create;
		xsk_umem__delete;
		xsk_socket__delete;
		xsk_umem__fd;
		xsk_socket__fd;
		bpf_program__get_prog_info_linear;
		bpf_program__bpil_addr_to_offs;
		bpf_program__bpil_offs_to_addr;
@@ -183,7 +177,6 @@ LIBBPF_0.0.4 {
		perf_buffer__new;
		perf_buffer__new_raw;
		perf_buffer__poll;
		xsk_umem__create;
} LIBBPF_0.0.3;

LIBBPF_0.0.5 {
@@ -336,7 +329,6 @@ LIBBPF_0.2.0 {
		perf_buffer__buffer_fd;
		perf_buffer__epoll_fd;
		perf_buffer__consume_buffer;
		xsk_socket__create_shared;
} LIBBPF_0.1.0;

LIBBPF_0.3.0 {
@@ -348,8 +340,6 @@ LIBBPF_0.3.0 {
		btf__new_empty_split;
		btf__new_split;
		ring_buffer__epoll_fd;
		xsk_setup_xdp_prog;
		xsk_socket__update_xskmap;
} LIBBPF_0.2.0;

LIBBPF_0.4.0 {
@@ -468,6 +458,4 @@ LIBBPF_1.0.0 {
		libbpf_bpf_link_type_str;
		libbpf_bpf_map_type_str;
		libbpf_bpf_prog_type_str;

	local: *;
};
+2 −0
Original line number Diff line number Diff line
@@ -230,6 +230,8 @@ $(OUTPUT)/xdping: $(TESTING_HELPERS)
$(OUTPUT)/flow_dissector_load: $(TESTING_HELPERS)
$(OUTPUT)/test_maps: $(TESTING_HELPERS)
$(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS)
$(OUTPUT)/xsk.o: $(BPFOBJ)
$(OUTPUT)/xdpxceiver: $(OUTPUT)/xsk.o

BPFTOOL ?= $(DEFAULT_BPFTOOL)
$(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile)    \
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@
#include <time.h>
#include <unistd.h>
#include <stdatomic.h>
#include <bpf/xsk.h>
#include "xsk.h"
#include "xdpxceiver.h"
#include "../kselftest.h"

Loading