VPP编译运行
由于版本要求,需要在v22.10版本运行
_______ _ _ _____ ___
__/ __/ _ \ (_)__ | | / / _ \/ _ \
_/ _// // / / / _ \ | |/ / ___/ ___/
/_/ /____(_)_/\___/ |___/_/ /_/
vpp# show dpdk version
DPDK Version: DPDK 22.07.0
DPDK EAL init args: --in-memory --no-telemetry --file-prefix vpp -a 0000:02:00.0 -a 0000:03:00.0
vpp# show version
vpp v22.10-release built by ubuntu on ubuntu-XXXXXX at 2023-09-0X
vpp#
1.down vpp source
# commit 07e0c05e698cf5ffd1e2d2de0296d1907519dc3d (HEAD, tag: v22.10)
git clone https://github.com/FDio/vpp.git -b v22.10
2.build vpp
准备编译环境
make install-dep
准备依赖文件,可从此处下载
make install-ext-deps
编译
# debug
make build
# release
make build-release
查看网卡bind
lshw -class network -businfo
配置文件
cat /etc/vpp/startup.conf
unix {
nodaemon
log /var/log/vpp/vpp.log
full-coredump
cli-listen /run/vpp/cli.sock
gid vpp
}
api-trace {
on
}
api-segment {
gid vpp
}
socksvr {
default
}
cpu {
}
dpdk {
dev 0000:0b:00.0 {
name eth0
}
dev 0000:13:00.0 {
name eth1
}
}
3.run vpp
加载驱动
sudo modprobe vfio-pci
sudo ifconfig enp2s0 down
sudo ifconfig enp3s0 down
运行
./build-root/build-vpp-native/vpp/bin/vpp -c /etc/vpp/startup.conf
./build-root/build-vpp-native/vpp/bin/vppctl
error
# api_segment_config: group vpp does not exist
1. 修改配置文件, 注释掉gid vpp
2. 添加用户组,groupadd -f -r vpp