测试环境:
VMWare ESX,网卡使用vmxnet3.
安装:
1. Install CentOS 7.5 minimal.
2. Download dpdk-18.05.1.tar.xz
3. yum install gcc numactl-devel numactl-libs hwloc hwloc-libs hwloc-gui kernel-headers kernel-devel libpcap-devel
4. unxz dpdk-18.05.1.tar.xz
5. tar xvf dpdk-18.05.1.tar
6. make config T=x86_64-native-linuxapp-gcc
7. make install T=x86_64-native-linuxapp-gcc DESTDIR=/dpdk
(Quick start doc: http://core.dpdk.org/doc/quick-start/)
运行示例:
# dpdk-devbind.py --bind=uio_pci_generic eth4
# dpdk-devbind.py --bind=uio_pci_generic eth5
将eth4和eth5用一根网线相连,即可运行。
# ./build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth4 --vdev=net_pcap1,iface=eth5 -- -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048
运行helloworld:
# make -C examples RTE_SDK=$(pwd) RTE_TARGET=x86_64-native-linuxapp-gcc O=$(pwd)/x86_64-native-linuxapp-gcc/examples
./x86_64-native-linuxapp-gcc/examples/helloworld/x86_64-native-linuxapp-gcc/helloworld -cf