mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
95b9afd398
Add test to exercise the bpf_prog/map id generation, bpf_(prog|map)_get_next_id(), bpf_(prog|map)_get_fd_by_id() and bpf_get_obj_info_by_fd(). Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
42 lines
953 B
Makefile
42 lines
953 B
Makefile
LIBDIR := ../../../lib
|
|
BPFDIR := $(LIBDIR)/bpf
|
|
APIDIR := ../../../include/uapi
|
|
GENDIR := ../../../../include/generated
|
|
GENHDR := $(GENDIR)/autoconf.h
|
|
|
|
ifneq ($(wildcard $(GENHDR)),)
|
|
GENFLAGS := -DHAVE_GENHDR
|
|
endif
|
|
|
|
CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include
|
|
LDLIBS += -lcap -lelf
|
|
|
|
TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \
|
|
test_align
|
|
|
|
TEST_GEN_FILES = test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o test_obj_id.o
|
|
|
|
TEST_PROGS := test_kmod.sh
|
|
|
|
include ../lib.mk
|
|
|
|
BPFOBJ := $(OUTPUT)/libbpf.a
|
|
|
|
$(TEST_GEN_PROGS): $(BPFOBJ)
|
|
|
|
.PHONY: force
|
|
|
|
# force a rebuild of BPFOBJ when its dependencies are updated
|
|
force:
|
|
|
|
$(BPFOBJ): force
|
|
$(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/
|
|
|
|
CLANG ?= clang
|
|
|
|
%.o: %.c
|
|
$(CLANG) -I. -I./include/uapi -I../../../include/uapi \
|
|
-I../../../../samples/bpf/ \
|
|
-Wno-compare-distinct-pointer-types \
|
|
-O2 -target bpf -c $< -o $@
|