VPP编译调试环境安装步骤

首先安装Centos 7, 用grub引导安装,不能用UEFI。否则在安装好VPP后报错

IOPL call failed - cannot use virtio PMD

然后DPDK就无法加载网卡了。

参考源码如下:

static void
rte_virtio_pmd_init(void)
{
	if (rte_eal_iopl_init() != 0) {
		PMD_INIT_LOG(ERR, "IOPL call failed - cannot use virtio PMD");
		return;
	}

	rte_pci_register(&rte_virtio_pmd);
}

在GRUB引导启动的Centos7下 执行以下步骤

首先Centos7 做一次更新

yum update

获取源码

git clone http://github.com/fdio/vpp

cd vpp

选择版本,这里切换至1810版

git checkout -b 1810 remotes/origin/stable/1810

安装依赖

make install-dep

安装cmake3

yum install epel-release

yum install cmake3

编译主程序&再次安装依赖. 此时会自动下载dpdk并一同编译

make build
make install-dep

加载网卡驱动

modprobe uio_pci_generic

再次编译

make build

shutdown 要加载的网卡,然后跑起来

make run

猜你喜欢

转载自blog.csdn.net/jacicson1987/article/details/84575027
今日推荐