Bootstrap

WSL(Ubuntu20.04)编译和安装DPDK

编译和安装DPDK

DPDK可以使用工具meson和ninja在您的系统上进行配置、构建和安装。

DPDK配置

要配置DPDK构建,请使用:

meson setup build --prefix=/home/xx/dpdk19.11
xxxx:~/dpdk-stable-19.11.14/$ meson setup build
Message:
=================
Content Skipped
=================

libs:
        telemetry:      missing dependency "jansson"

drivers:
        common/mvep:    missing dependency, "libmusdk"
        net/af_xdp:     missing dependency, "libbpf"
        net/ipn3ke:     missing dependency, "libfdt"
        net/mlx4:       missing dependency, "ibverbs"
        net/mlx5:       missing dependency, "ibverbs"
        net/mvneta:     missing dependency, "libmusdk"
        net/mvpp2:      missing dependency, "libmusdk"
        net/nfb:        missing dependency, "libnfb"
        net/pcap:       missing dependency, "libpcap"
        net/szedata2:   missing dependency, "libsze2"
        raw/ifpga:      missing dependency, "libfdt"
        crypto/aesni_gcm:       missing dependency, "libIPSec_MB"
        crypto/aesni_mb:        missing dependency, "libIPSec_MB"
        crypto/kasumi:  missing dependency, "libsso_kasumi"
        crypto/mvsam:   missing dependency, "libmusdk"
        crypto/snow3g:  missing dependency, "libsso_snow3g"
        crypto/zuc:     missing dependency, "libsso_zuc"
        compress/isal:  missing dependency, "libisal"


Build targets in project: 759

Found ninja-1.10.1 at /usr/bin/ninja

其中“build”是所需的输出构建目录。

构建

配置后,构建并安装DPDK系统范围使用:

xxxx:~/dpdk-stable-19.11.14/$ cd build
xxxx:~/dpdk-stable-19.11.14/build$ ninja
[1972/1972] Linking target app/dpdk-test-pipeline
xxxx:~/dpdk-stable-19.11.14/build$ sudo meson install
Installing symlink pointing to librte_eal.so.20.0 to /usr/local/lib/x86_64-linux-gnu/librte_eal.so
...
Installing symlink pointing to librte_ipsec.so.0.200 to /usr/local/lib/x86_64-linux-gnu/librte_ipsec.so
...
Installing ~/dpdk-stable-19.11.14/lib/librte_eal/common/include/rte_eal.h to /usr/local/include
...
Installing ~/dpdk-stable-19.11.14/usertools/dpdk-pmdinfo.py to /usr/local/bin
...
xxxx:~/dpdk-stable-19.11.14/build$ sudo ldconfig

上述最后两个命令通常需要以root身份运行,介子安装步骤将构建的对象复制到其最终的系统范围位置,最后一步使动态加载器ld.so更新其缓存以考虑新对象。

;