3. Compiling DAO from sources

Developers can refer to the following guide, which provides various options for manually compiling DAO sources, allowing them to tailor the process according to their specific needs.

3.1. Getting the sources

Data accelerator offload (DAO) sources can be downloaded from:

# git clone https://github.com/MarvellEmbeddedProcessors/dao.git
# cd dao
# git checkout dao-devel

3.2. Compiling and Installing

When compiling for the Octeon platform, DAO has a mandatory dependency on DPDK.

Note

Steps to build DPDK are as follows: (Steps are for natively compiling DPDK on ARM based rootfs)

3.2.1. Native Compilation

Compiling on ARM server for CN10k platform

# cd <Path to DAO repo>/dao
# meson build -Dplatform=cn10k --prefix="${PWD}/install" -Denable_kmods=false --prefer-static
# ninja -C build install

Compiling on x86 machine

# cd <Path to DAO repo>/dao
# meson build --prefix="${PWD}/install" -Denable_kmods=false --prefer-static
# ninja -C build install

Note

To link dpdk library statically, meson option --prefer-static shall be used.

3.2.2. Cross compilation

Setup the toolchain and follow the below steps.

# cd <Path to DAO repo>/dao
# PKG_CONFIG_LIBDIR=/path/to/dpdk/build/prefix/lib/pkgconfig/ meson setup --cross config/arm64_cn10k_linux_gcc build --prefer-static
# ninja -C build

3.3. Compiling the documentation

Install sphinx-build package. If this utility is found in PATH then documentation will be built by default.

3.4. Meson Options

  • kernel_dir: Path to the kernel for building kernel modules (octep_vdpa). Headers must be in $kernel_dir.

  • dma_stats: Enable DMA statistics for DAO library

  • virtio_debug: Enable virtio debug that perform descriptor validation, etc.