DPDK - gsg文档(介绍与编译)
&& Hugepage
提前分配hugepage内存,可以减少虚拟页地址转换到物理地址所需的时间。
相关命令:
在虚拟机上运行时,在没有NUMA的机器上,执行“echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages”,有NUMA的机器上执行“echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages和echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages”
&& 编译
cd dpdk-[version]
make install T=x86_64-native-linuxapp-gcc
make config T=x86_64-linuxapp-gcc
&& 编译helloworld
cd examples/helloworld/
export RTE_SDK=$HOME/DPDK
export RTE_TARGET=x86_64-native-linuxapp-gcc
*RTE_SDK - Points to the DPDK installation directory.
*RTE_TARGET - Points to the DPDK target environment directory.
make
CC main.o
LD helloworld
INSTALL-APP helloworld
INSTALL-MAP helloworld.map
ls build/app
helloworld helloworld.map
&& 运行helloworld