mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
ebpf: Added eBPF RSS program.
RSS program and Makefile to build it. The bpftool used to generate '.h' file. The data in that file may be loaded by libbpf. EBPF compilation is not required for building qemu. You can use Makefile if you need to regenerate rss.bpf.skeleton.h. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Signed-off-by: Andrew Melnychenko <andrew@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
committed by
Jason Wang
parent
8f364e344c
commit
f3fa412de2
Executable
+21
@@ -0,0 +1,21 @@
|
||||
OBJS = rss.bpf.o
|
||||
|
||||
LLC ?= llc
|
||||
CLANG ?= clang
|
||||
INC_FLAGS = `$(CLANG) -print-file-name=include`
|
||||
EXTRA_CFLAGS ?= -O2 -emit-llvm -fno-stack-protector
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
|
||||
$(OBJS): %.o:%.c
|
||||
$(CLANG) $(INC_FLAGS) \
|
||||
-D__KERNEL__ -D__ASM_SYSREG_H \
|
||||
-I../include $(LINUXINCLUDE) \
|
||||
$(EXTRA_CFLAGS) -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
|
||||
bpftool gen skeleton rss.bpf.o > rss.bpf.skeleton.h
|
||||
cp rss.bpf.skeleton.h ../../ebpf/
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user