Networking DOCA SDK Documentation

DOCA Reference Applications

This page provides an overview of the DOCA reference applications implemented on top of NVIDIA® BlueField®.

All the DOCA reference applications described in this section are governed under the BSD-3 software license agreement.

Introduction

DOCA reference applications are an educational resource provided as a guide on how to program on the NVIDIA BlueField networking platform using DOCA API. 

The reference applications are not production-ready and should be used as reference only.

For instructions regarding the development environment and installation, refer to the DOCA Developer Guide and the DOCA Installation Guide for Linux respectively.

For questions, comments, and feedback, please contact us at doca-feedback@nvidia.com.


Installation

DOCA applications are installed under /opt/mellanox/doca/applications with each application having its own dedicated folder. Each directory contains the source code and compilation files for the matching application.

Prerequisites

The DOCA SDK references (samples and applications) require the use of meson, with a minimal version requirement of 0.61.2. This version is already included as part of the packages provided by most Linux distributions, hence it is recommended to simply install it from packages:

  • Ubuntu/Debian:

    Bash
    $ sudo apt install meson
    
  • RHEL:

    Bash
    $ sudo yum install meson
    

In the rare case in which the version provided by the distribution is lower than the minimal required version of 0.61.2, one can install meson directly through pip instead of through packages:

Bash
$ sudo pip3 install meson==0.61.2

Unlike the package installation, in the case of installation through pip, users should also remember to install their compiler of choice as it won't be installed automatically.

Compilation

As applications are shipped alongside their sources, developers may want to modify some of the code during their development process and then recompile the applications. The files required for the compilation are the following:

  • /opt/mellanox/doca/applications/meson.build – main compilation file for a project that contains all the applications

  • /opt/mellanox/doca/applications/meson_options.txt – configuration file for the compilation process

  • /opt/mellanox/doca/applications/<application_name>/meson.build – application-specific compilation definitions

To recompile all the reference applications:

  1. Move to the applications directory: 

    cd /opt/mellanox/doca/applications
    
  2. Prepare the compilation definitions: 

    meson /tmp/build
    
  3. Compile all the applications:

    Bash
    ninja -C /tmp/build
    

    The generated applications are located under the /tmp/build/ directory, using the following path /tmp/build/<application_name>/doca_<application_name>.

Compilation against DOCA's SDK relies on environment variables which are automatically defined per user session upon login. For more information, please refer to section "Meson Complains About Missing Dependencies" in the NVIDIA DOCA Troubleshooting Guide.

Developer Configurations

When recompiling the applications, meson compiles them by default in "debug" mode. Therefore, the binaries would not be optimized for performance as they would include the debug symbol. For comparison, the application binaries shipped as part of DOCA's installation are compiled in "release" mode. To compile the applications in something other than debug, please consult Meson's configuration guide.

The applications also offer developers the ability to use the DOCA log's TRACE level (DOCA_LOG_TRC) on top of the existing DOCA log levels. Enabling the TRACE log level during compilation activates various developer log messages left out of the release compilation. Activating the TRACE log level may be done through enable_trace_log in the meson_options.txt file, or directly from the command line:

  1. Prepare the compilation definitions to use the trace log level:

    Bash
    meson /tmp/build -Denable_trace_log=true
    
  2. Compile the applications:

    Bash
    ninja -C /tmp/build
    

Application Use of DOCA Libs

The following table maps DOCA reference applications to the libraries they make use of.

Application Category

Application

Library Category

BareMetal/Virtualized Cloud

Secure Cloud Gateway

Cloud Storage

Monitoring

Streaming

HPC

Flow

DPA

DMA

FlexIO SDK

PCC

App Shield

SHA

Compress

Telemetry

GPUNetIO

Comch

UCX

Network

Ethernet L2 Forwarding













GPU Packet Processing












Simple Forward VNF












Switch












IP Fragmentation












Accelerated UPF












Bifurcated Driver Model












DPU GPU Remote Offload











Security

App Shield Agent











East-west Overlay Encryption













IPsec Security Gateway












PSP Gateway












Secure Channel












YARA Inspection











Data Path Acceleration

DPA All-to-all












PCC












Storage

DMA Copy











File Compression











File Integrity











NVMe Emulation








Storage Zero Copy












HPC

UROM RDMO












Telemetry

Time Sync











Telemetry OpenTelemetry












Telemetry Traceback












Last updated: