2023-08-16 Linux网络之DPDK环境搭建 相关网站 官网 下载 DPDK repositories dts 编译dpdk-19.11123456789$ ./mk/rte.cpuflags.mk SSE4_1$ export RTE_SDK=`pwd`$ ./usertools/dpdk-setup.sh 38$ export RTE_SDK=/mnt/dtt/dpdk/dpdk-19.11$ export RTE_TARGET=x86_64-native-linuxapp-gcc$ export EXTRA_CFLAGS="-O0 -g"$ make config T=x86_64-native-linuxapp-gcc$ make install T=x86_64-native-linuxapp-gcc 编译dpdk-23.03123456$ apt-get update$ apt-get install meson$ cd dpdk-23.03$ meson build$ ninja -C build 使用自己编写Makefile编译dpdk: 12345678910111213#include <stdio.h>#include <rte_version.h>#include <rte_eal.h>int main(int argc, char **argv) { printf("Hello, DPDK! Version: %s\n", rte_version()); int ret = rte_eal_init(argc, argv); if (ret < 0) { rte_exit(EXIT_FAILURE, "Cannot init EAL\n"); } return 0;} 12345678910111213141516171819RTE_SDK = /home/dpdk/RTE_DPDK_OUPUT = /home/dpdk/dpdk-output/CC=gccCFLAGS=-O3 -g -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-format-truncationLDFLAGS=-L$(RTE_DPDK_OUPUT)/lib -Wl,--no-whole-archive -ldpdk -Wl,--no-whole-archive -lpthread -lm -ldl -lnumaINCLUDES=-I$(RTE_DPDK_OUPUT)/includeall: hellodpdkhellodpdk: main.o $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)main.o: main.c $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<clean: rm -f hellodpdk main.o 其他 Data Plane Development Kit dpdk-dts DPDK Samples 前一篇 Linux内核网络之收包 后一篇 Linux网络之并发压力测试工具分析