DPDK 20.11 meson build
DPDK 20.11 meson build
DPDK 20.11 已正式发布, 其中的编译机制做出了很大改动, 不再支持 make 方式, 只支持使用 meson 作为构建工具.
meson
http://mesonbuild.com/Getting-meson.html
https://github.com/mesonbuild/meson/releases
Fedora安装:
dnf install meson
python3 pip 安装:
pip3 install meson
pip3 install --user 安装到 $HOME/.local/bin 目录, 避免权限问题:
pip3 install --user meson
export PATH=$PATH:$HOME/.local/bin
ninja
https://ninja-build.org/
Fedora:
dnf install ninja-build
Download binary:
https://github.com/ninja-build/ninja/releases
build from source:
$ git clone git://github.com/ninja-build/ninja.git && cd ninja
$ git checkout release
$ cat README
configure & build
meson configure
查看当前工程可用配置项:
$ meson configure
Unable to find build file lib/librte_/meson.build --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
WARNING: The source directory instead of the build directory was specified.
WARNING: Only the default values for the project are printed, and all command line parameters are ignored.Core properties:Source dir /root/DPDK/dpdk-20.11Core options:Option Default Value Possible Values Description ------ ------------- --------------- ----------- auto_features auto [enabled, disabled, auto] Override value of all 'auto' features backend ninja [ninja, vs, vs2010, vs2015, vs2017, vs2019, xcode] Backend to use buildtype release [plain, debug, debugoptimized, release, minsize, custom] Build type to use debug false [true, false] Debug default_library static [shared, static, both] Default library type install_umask 0022 [preserve, 0000-0777] Default umask to apply on permissions of installed fileslayout mirror [mirror, flat] Build directory layout optimization 3 [0, g, 1, 2, 3, s] Optimization level strip false [true, false] Strip targets on install unity off [on, off, subprojects] Unity build warning_level 1 [0, 1, 2, 3] Compiler warning level to use werror false [true, false] Treat warnings as errors wrap_mode default [default, nofallback, nodownload, forcefallback] Wrap mode Core options (for host machine):Option Default Value Description ------ ------------- ----------- cmake_prefix_path [] List of additional prefixes for cmake to search pkg_config_path [] List of additional paths for pkg-config to searchCore options (for build machine):Option Default Value Description ------ ------------- ----------- build.cmake_prefix_path [] List of additional prefixes for cmake to search build.pkg_config_path [] List of additional paths for pkg-config to searchBackend options:Option Default Value Possible Values Description ------ ------------- --------------- ----------- backend_max_links 0 >=0 Maximum number of linker processes to run or 0 for no limitBase options:Option Default Value Possible Values Description ------ ------------- --------------- ----------- b_asneeded true [true, false] Use -Wl,--as-needed when linking b_colorout always [auto, always, never] Use colored output b_coverage false [true, false] Enable coverage tracking. b_lto false [true, false] Use link time optimization b_lundef true [true, false] Use -Wl,--no-undefined when linking b_ndebug false [true, false, if-release] Disable asserts b_pch true [true, false] Use precompiled headers b_pgo off [off, generate, use] Use profile guided optimization b_pie false [true, false] Build executables as position independent b_sanitize none [none, address, thread, undefined, memory, address,undefined] Code sanitizer to use b_staticpic true [true, false] Build static libraries as position independentCompiler options (for host machine):Option Default Value Possible Values Description ------ ------------- --------------- ----------- c_args [] Extra arguments passed to the C compilerc_link_args [] Extra arguments passed to the C linker c_std none [none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, C language standard to use gnu18] Compiler options (for build machine):Option Default Value Possible Values Description ------ ------------- --------------- ----------- build.c_args [] Extra arguments passed to the C compilerbuild.c_link_args [] Extra arguments passed to the C linker build.c_std none [none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, C language standard to use gnu18] Directories:Option Default Value Description ------ ------------- ----------- bindir bin Executable directory datadir share Data file directory includedir include Header file directory infodir share/info Info page directory libdir lib64 Library directory libexecdir libexec Library executable directory localedir share/locale Locale data directory localstatedir var Localstate data directory mandir share/man Manual page directory prefix /usr/local Installation prefix sbindir sbin System executable directory sharedstatedir com Architecture-independent data directorysysconfdir etc Sysconf data directory Project options:Option Default Value Possible Values Description ------ ------------- --------------- ----------- disable_drivers Comma-separated list of drivers to explicitly disable. drivers_install_subdir dpdk/pmds-<VERSION> Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory. enable_docs false [true, false] build documentation enable_kmods false [true, false] build kernel modules enable_trace_fp false [true, false] enable fast path trace points. examples Comma-separated list of examples to build by default flexran_sdk Path to FlexRAN SDK optional Libraries for BBDEV device ibverbs_link shared [static, shared, dlopen] Linkage method (static/shared/dlopen) for Mellanox PMDs with ibverbs dependencies. include_subdir_arch subdirectory where to install arch-dependent headers kernel_dir Path to the kernel for building kernel modules. Headers must be in $kernel_dir/build. Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.lib_musdk_dir path to the MUSDK library installation directory machine native set the target machine type max_ethports 32 maximum number of Ethernet devices max_lcores 128 maximum number of cores/threads supported by EAL max_numa_nodes 4 maximum number of NUMA nodes supported by EAL tests true [true, false] build unit tests use_hpet false [true, false] use HPET timer in EAL Testing options:Option Default Value Possible Values Description ------ ------------- --------------- ----------- errorlogs true [true, false] Whether to print the logs from failing testsstdsplit true [true, false] Split stdout and stderr in test logs WARNING: The source directory instead of the build directory was specified.
WARNING: Only the default values for the project are printed, and all command line parameters are ignored.
主要的配置参数:
参数 | 默认值 | 参数范围 | 描叙 |
---|---|---|---|
disable_drivers | 无 | drirver下目录名称, 多个参数使用逗号(-Ddisable_drivers=net/af_xdp,event/dpaa) | 禁用 dpdk driver |
examples | 无 | examples下目录名称, 多个参数使用逗号(-Dexamples=l2fwd,l3fwd) | 启用 dpdk examples |
machine | native | gcc/clang -march= -mtune= | |
max_ethports | 32 | RTE_MAX_ETHPORTS | |
max_lcores | 128 | RTE_MAX_LCORE | |
max_numa_nodes | 4 | RTE_MAX_NUMA_NODES |
示例1:
CC=clang meson -Dmax_lcores=128 -Dmachine=sandybridge -Ddisable_drivers=net/af_xdp,net/dpaa,net/dpaa2,net/bnx2x -Dexamples=l3fwd,l2fwd -Dwerror=false v2011-mlx5-snb
ninja -C v2011-mlx5-snb
示例2 reconfigure
:
CC=clang meson --reconfigure -Dmax_lcores=128 -Dmachine=sandybridge -Ddisable_drivers=net/af_xdp,net/dpaa,net/dpaa2,net/bnx2x -Dexamples=l3fwd,l2fwd -Dwerror=false v2011-mlx5-snb
ninja -C v2011-mlx5-snb
testpmd:
$ app/testpmd -c 0xffff -m 4096 -w 05:00.0 -n 2 -r 2 -- -i -a --forward-mode=icmpecho --rxd=4096 --txd=4096 --rxq=7 --txq=7 --nb-cores=12 --rss-ip
EAL: Detected 32 lcore(s)
EAL: Detected 1 NUMA nodes
Option -w, --pci-whitelist is deprecated, use -a, --allow option instead
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Invalid NUMA socket, default to 0
EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:05:00.0 (socket 0)
mlx5_pci: Size 0xFFFF is not power of 2, will be aligned to 0x10000.
EAL: No legacy callbacks, legacy socket not created
Interactive-mode selected
Auto-start selected
Set icmpecho packet forwarding mode
testpmd: create a new mbuf pool <mb_pool_0>: n=267456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
Port 0: 98:03:9B:97:50:76
Checking link statuses...
Done
Start automatic packet forwarding
icmpecho packet forwarding - ports=1 - cores=7 - streams=7 - NUMA support enabled, MP allocation mode: native
Logical Core 1 (socket 0) forwards packets on 1 streams:RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00
Logical Core 2 (socket 0) forwards packets on 1 streams:RX P=0/Q=1 (socket 0) -> TX P=0/Q=1 (socket 0) peer=02:00:00:00:00:00
Logical Core 3 (socket 0) forwards packets on 1 streams:RX P=0/Q=2 (socket 0) -> TX P=0/Q=2 (socket 0) peer=02:00:00:00:00:00
Logical Core 4 (socket 0) forwards packets on 1 streams:RX P=0/Q=3 (socket 0) -> TX P=0/Q=3 (socket 0) peer=02:00:00:00:00:00
Logical Core 5 (socket 0) forwards packets on 1 streams:RX P=0/Q=4 (socket 0) -> TX P=0/Q=4 (socket 0) peer=02:00:00:00:00:00
Logical Core 6 (socket 0) forwards packets on 1 streams:RX P=0/Q=5 (socket 0) -> TX P=0/Q=5 (socket 0) peer=02:00:00:00:00:00
Logical Core 7 (socket 0) forwards packets on 1 streams:RX P=0/Q=6 (socket 0) -> TX P=0/Q=6 (socket 0) peer=02:00:00:00:00:00icmpecho packet forwarding packets/burst=32nb forwarding cores=12 - nb forwarding ports=1port 0: RX queue number: 7 Tx queue number: 7Rx offloads=0x0 Tx offloads=0x0RX queue: 0RX desc=4096 - RX free threshold=64RX threshold registers: pthresh=0 hthresh=0 wthresh=0RX Offloads=0x0TX queue: 0TX desc=4096 - TX free threshold=0TX threshold registers: pthresh=0 hthresh=0 wthresh=0TX offloads=0x0 - TX RS bit threshold=0
testpmd>
Other
libelf
Fedora:
dnf install -y elfutils-libelf-devel elfutils-libelf-devel-static
CentOS-8:
dnf install -y gcc-toolset-9
DPDK 20.11 meson build相关推荐
- dpdk 20.11编译kni和igb_uio
第一步:需要修改meson_option.txt打开kmod编译开关 第二步:从20.11开始,igb_uio不再包含在dpdk源码中,需要下载源码 git clone http://dpdk.org ...
- DPDK 20.11 Dynamic mbuf
目录 背景 解决方法 申请外部结构 增大mbuf的空间 多种布局 Dynamic mbuf 原理 使用/API 更大的额外空间的需求怎么办? 参考 背景 需要metadata的场景 通用的metada ...
- 定积分证明题例题_第二十天(20,11,27):积分中值定理
之前我们讲述了一大堆的积分技巧: 槿灵兮:第十九天(20,11,26):无理代数分式的积分法zhuanlan.zhihu.com 今天我们过渡一下下,开始涉及一点积分的证明题~ 我首先想介绍两个基本 ...
- HALCON 20.11:学习笔记---一维测量(Measuring)
HALCON 20.11:学习笔记---一维测量(Measuring) 本章主要提供有关一维测量的信息. 一维测量的概念 通过一维测量可以沿着预定义的线或弧定位从亮到暗或从暗到亮的过渡边缘.这使您可以 ...
- HALCON 20.11:如何处理标定助手品质问题
HALCON 20.11:如何处理标定助手品质问题 在"品质问题"选项下,您可以得到每个图像的评估,其中包括缺陷图像特征描述以及问题严重程度的质量分数百分比.结果为0%表示图像特征 ...
- HALCON 20.11:标定助手使用注意事项
HALCON 20.11:标定助手使用注意事项 标定过程中需要保持相机(光圈.焦距.位姿)固定. 标定板有两种:六角形排列标定板(.cpd文件)和矩形排列标定板(.descr文件). 透明标定板可用于 ...
- HALCON 20.11:深度学习笔记(12)---语义分割
HALCON 20.11:深度学习笔记(12)--- 语义分割 HALCON 20.11.0.0中,实现了深度学习方法. 本章解释了如何使用基于深度学习的语义分割,包括训练和推理阶段. 通过语义分割, ...
- HALCON 20.11:深度学习笔记(11)---目标检测
HALCON 20.11:深度学习笔记(11)---目标检测 HALCON 20.11.0.0中,实现了深度学习方法. 本章讲解了如何使用基于深度学习的对象检测. 通过对象检测,我们希望在图像中找到不 ...
- HALCON 20.11:深度学习笔记(10)---分类
HALCON 20.11:深度学习笔记(10)---分类 HALCON 20.11.0.0中,实现了深度学习方法. 本章解释了如何在训练和推理阶段使用基于深度学习的分类. 基于深度学习的分类是一种对一 ...
- HALCON 20.11:深度学习笔记(9)---异常检测
HALCON 20.11:深度学习笔记(9)---异常检测 HALCON 20.11.0.0中,实现了深度学习方法. 本章解释了如何使用基于深度学习的异常检测. 通过异常检测,我们想要检测图像是否包含 ...
最新文章
- 为什么有TCP 的三次握手 和 四次挥手
- QTcreator 多线程(生产者消费者)
- 对比学习系列论文SDCLR(二)-Self-Damaging Contrastive Learning
- controller调用controller的方法_你想过 Controller 这些方法里的参数是如何工作的吗?...
- mysql性能调优精简版
- BugkuCTF-PWN题pwn5-overflow2超详细讲解
- 详解两种C#自动实现DLL(OCX)控件注册的方法
- MySQL 快速删除大量解决方案
- Kubernetes初识
- 微软私有云资源链接总结分享
- 酒店管理系统数据库SQl设计思路
- Windows找不到合适的打印机驱动程序
- html5怎么获取当前星期几,javascript如何获取今天是星期几?
- 2021保研夏令营—中科院计算所,自动化所,上海交大计算机
- 一图秒懂“天使投资、VC、PE” 与“A轮、B轮、C轮融资”的关系
- 微信App iOS客户端不同阶段的发展策略
- iOS 渲染原理解析
- 如何申请微信公众平台帐号
- xy轴坐标图数字表示_图纸上的坐标x,y轴上有好长的数字表示什么意思
- 医学统计分析:心电图智能诊病
热门文章
- 力扣刷题:求树的最大高度,树的最小高度,与判断平衡二叉树
- 引用 乐嘉写给所有女人的话,男人千万别错过!
- 解决re.search()时出现excepted string or buffer问题
- 解决/**/嵌套问题---条件编译:#if 0 statement #endif 帅帅哒洋办法
- sigar 监控服务器硬件信息
- mysql repaire_Repair MySQL Replication遇到的错误(一)
- crc原理及c代码实现
- 计算机图形学 之 直线裁剪算法
- Jenkins配置从节点问题:ssh slave known_hosts [SSH]与Slave JVM has terminated. Exit code=126
- qlv格式转mp4格式(简单、高效)