mirror of
https://github.com/qemu/qemu.git
synced 2024-12-05 01:33:41 +08:00
197a137290
The current implementation fails to load on a system with libbpf 1.0 and reports that legacy map definitions in 'maps' section are not supported by libbpf v1.0+. This commit updates the Makefile to add BTF (-g flag) and appropriately updates the maps in rss.bpf.c and update the skeleton file in repo. Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
24 lines
511 B
Makefile
Executable File
24 lines
511 B
Makefile
Executable File
OBJS = rss.bpf.o
|
|
|
|
LLVM_STRIP ?= llvm-strip
|
|
CLANG ?= clang
|
|
INC_FLAGS = `$(CLANG) -print-file-name=include`
|
|
EXTRA_CFLAGS ?= -O2 -g -target bpf
|
|
|
|
all: $(OBJS)
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -f $(OBJS)
|
|
rm -f rss.bpf.skeleton.h
|
|
|
|
$(OBJS): %.o:%.c
|
|
$(CLANG) $(INC_FLAGS) \
|
|
-D__KERNEL__ -D__ASM_SYSREG_H \
|
|
-I../include $(LINUXINCLUDE) \
|
|
$(EXTRA_CFLAGS) -c $< -o $@
|
|
$(LLVM_STRIP) -g $@
|
|
bpftool gen skeleton rss.bpf.o > rss.bpf.skeleton.h
|
|
cp rss.bpf.skeleton.h ../../ebpf/
|