代码目录
The DPDK is composed of several directories, including: (代码目录结果说明)
doc: DPDK Documentation (文档)
license: DPDK license information (许可证信息)
lib: Source code of DPDK libraries (DPDK库的源代码)
drivers: Source code of DPDK poll-mode drivers (DPDK poll 模型驱动代码)
app: Source code of DPDK applications (automatic tests) (DPDK 应用程序的源代码(自动测试))
examples: Source code of DPDK application examples (DPDK应用代码示例)
config, buildtools: Framework-related scripts and configuration (配置脚本)
usertools: Utility scripts for end-users of DPDK applications (用户工具集)
devtools: Scripts for use by DPDK developers (开发工具集)
kernel: Kernel modules needed for some operating systems (系统相关的内核模块)
介绍一下配置命令的使用:
上一篇文章我们简单介绍了编译的过程,在这里不出一点关于配置的内容。
meson build 的结果是在当前目录创建一个 build 目录,后续的编译过程,在build 目录里面进行,编译结果安装到 /usr/local/ 目录下面。在你执行 install后,就会在 /usr/local/includ/ 下面找到 以 rte_ 开头的头文件, /usr/local/lib/x86_64-linux-gnu/ 目录下就是 DPDK 编译安装的库文件。其实,如果你仔细看了编译安装的提示信息,你早就发现了。
那问题来了,很多情况下,我们都希望修改这个安装路径,那么我们该如何执行编译配置命令呢?
官方文档告诉我们了,命令的格式是这样的:
meson setup <options> build
其中, optins 是 meson 支持的参数 或者 DPDK 支持的参数的组合,我是这么理解的,下面是原文,如有误还请指正。where “build” is the desired output build directory, and “<options>” can be empty or one of a number of meson or DPDK-specific build options, described later in this section. The configuration process will finish with a summary of what DPDK libraries and drivers are to be built and installed, and for each item disabled, a reason why that is the case. This information can be used, for example, to identify any missing required packages for a driver.
可以在dpdk的源代码目录下执行 meson configure 查看支持哪些参数,在这些参数中你就可以找到这些内容:
Directories Default Value Possible Values Description ----------- ------------- --------------- ----------- bindir bin Executable directory datadir share Data file directory includedir include Header file directory infodir