Usage
NIC Configuration
shell
# Change the MTU of the NIC.
ifconfig ens33 mtu 4200
# Add an RXE interface to ens33 for the IB function.
rdma link add rxe_0 type rxe netdev ens33
Application Development
Use relevant APIs to develop a scenario-specific application. Build the application as a binary ELF file based on the eBPF instruction set. Take vm_migrate of the provided ebpf_example for example. vm_migrate calls the CTinspector framework and can migrate package VMs between nodes in a resumable manner.
text
# Compose the Makefile and set the eBPF instruction set.
CFLAGS=-O2 -fno-inline -emit-llvm -I/usr/include/ctinspector/
LINKFLAGS=-march=bpf -filetype=obj
all: vm_migrate.o
vm_migrate.o:
clang $(CFLAGS) -c migrate.c -o - | llc $(LINKFLAGS) -o vm_migrate.o
clean:
rm -f vm_migrate.o
shell
# Run make to build the application.
make
clang -O2 -fno-inline -emit-llvm -I/usr/include/ctinspector/ -c migrate.c -o - | llc -march=bpf -filetype=obj -o vm_migrate.o
Application Running
Running vm_migrate on node 1.
Running the CTinspector main program on node 2.
Bug