Networking DOCA SDK Documentation

DOCA Memos Reference Application

Introduction

The NVIDIA DOCA™ Memos reference applications demonstrate an end-to-end Key/Value (KV) storage path across a host, NVIDIA® BlueField®, and a remote target node. The host fio plugin issues KV commands to a namespace emulated by the BlueField Initiator reference application. That application serves the namespace through a Memos Initiator volume backed by the Simple Target sample.

This page shows how to run the three components together. Use their individual guides for installation, firmware configuration, compilation, application arguments, and component-specific troubleshooting.

Host                                BlueField                              Target node
+--------------------------+        +----------------------------+        +-------------------------+
| fio + Memos fio plugin   | PCIe   | Memos Initiator ref app    | RDMA   | Memos Simple Target     |
| DOCA Key-Value           |<------>| DevEmu NVMe + DOCA DMA     |<------>| Memos Target library    |
| /dev/ngXnY (KV namespace)|        | Memos Initiator volume     |        | File-backed namespace   |
+--------------------------+        +----------------------------+        +-------------------------+

The reference applications are not production-ready; use them as reference only. The pairing described here uses Memos Initiator and Memos Target; it does not establish compatibility with an arbitrary KV target.

Components and Guides

Location

Component and Role

Instructions

Host

libdoca_memos_fio_plugin.so converts fio reads and writes to DOCA Key-Value Retrieve and Store tasks. Each job thread owns a progress engine and one KV I/O context per namespace. The same sources also provide the standalone doca_memos_fio verification sample.

DOCA Memos fio Plugin

BlueField

doca_memos_initiator_ref_app exposes one host-visible NVMe KV namespace. It handles controller and queue management, transfers payloads with DOCA DMA, and submits operations through the Memos Initiator library.

DOCA Memos Initiator Application

Target node

doca_memos_simple_target creates a Memos Target subsystem with one file-backed namespace and a listening RDMA port.

See DOCA Memos Simple Target in the DOCA Memos Target guide.

Preparation

  • On the target node, build and prepare the Simple Target sample and its backing file using the Simple Target sample instructions. Ensure that its listening address is reachable from BlueField.

  • On BlueField, install or build the Initiator reference application and complete its Firmware Configuration. This example uses native NVMe hotplug, which requires a host power cycle. Power cycle the host before you continue.

  • On the host, prepare fio, the matching plugin, and the DOCA libraries using the fio plugin build instructions. Before you run the following example, complete the plugin's kernel, permissions, and huge-page prerequisites.

Keep the following values consistent across the procedure:

Value

Where It Is Used

<target-ip> and <target-port>

Target listening address and port, and the Initiator -a and -s arguments. Use an IPv4 address for this Initiator example.

Target subsystem NVMe Qualified Name (NQN)

The Simple Target sample exposes nqn.2026-06.com.nvidia:memos0. Pass that same NQN to Initiator -n.

<host-nqn>

Identity that the Initiator presents through -N. Use the identity permitted by the target configuration.

<emulation-manager-pci> and <vuid>

Select the BlueField emulation manager and the native NVMe function created under it. Reuse the returned VUID when running or removing that function.

Namespace Globally Unique Identifier (NGUID) and /dev/ngXnY

The Initiator preserves the backing namespace's NGUID in the host-visible namespace. Identify the intended namespace by NGUID, not by a device-node number that can change.

<plugin-path>

Absolute path of the fio plugin built for the fio binary and DOCA installation in use.

Use Case: Key/Value Store and Retrieve

The example has the following steps:

  1. Start the Simple Target sample.

  2. Create and start the native NVMe Initiator function.

  3. Identify the host namespace.

  4. Store and verify values.

  5. Stop and clean up the components in reverse order.

Start the Simple Target Sample

After you prepare the sample's backing file according to the Simple Target sample instructions, start the sample on the target node:

Bash
doca_memos_simple_target -a <target-ip> -p <target-port> -f <backing-file>

Leave it running. The sample exposes one namespace under the subsystem NQN nqn.2026-06.com.nvidia:memos0.

Create and Start the Initiator Function

On BlueField, create a native NVMe dynamic function. Record the VUID that the application reports:

Bash
doca_memos_initiator_ref_app -p <emulation-manager-pci> -H -T nvme

Start the Initiator reference application with that VUID. For <rdma-dev>, choose an RDMA device that has a route to the target. This device is not the emulation-manager PCI address.

Bash
doca_memos_initiator_ref_app -p <emulation-manager-pci> -u <vuid> -T nvme \
    -R <rdma-dev> -a <target-ip> -s <target-port> \
    -n nqn.2026-06.com.nvidia:memos0 -N <host-nqn> -m 0x1

Wait until the application logs Target connected, Volume ready: nsid=1 attached, and MEMOS initiator reference application is up; waiting for host BAR0 writes. The application serves the first namespace reported by the target and presents it to the host as namespace ID (NSID) 1. For other application options, see the Initiator running instructions.

Identify the Host Namespace

On the host, make sure that the NVMe driver is loaded. Then identify the intended KV namespace by its NGUID:

Bash
modprobe nvme
nvme id-ns /dev/ngXnY | grep -i nguid

Replace /dev/ngXnY with the discovered generic character device. Match its NGUID to the backing target namespace. The KV namespace is not exposed as an ordinary block device. The host enables the controller and creates its Admin and I/O queues; the Initiator application handles these events.

Store and Verify Values

This example performs a functional Store followed by Retrieve verification over 128 keys, using 4 KiB values. Run the following fio command. Replace <plugin-path> and /dev/ngXnY with the paths for your installation:

Bash
fio --name=kv --ioengine=<plugin-path> \
    --filename=/dev/ngXnY --rw=write --bs=4k --size=512k --iodepth=8 --numjobs=1 \
    --thread=1 --mem=mmaphuge --verify=crc32c --do_verify=1

Run fio with the same DOCA library environment and permissions that you set up by following the fio plugin instructions. Successful completion without I/O or verification errors confirms that values traversed the combined path and were retrieved correctly. This is a functional example, not a performance measurement procedure.

Stop and Clean Up

  1. Wait for fio to finish, or stop it and quiesce host I/O.

  2. If the NVMe driver serves other active storage on the host, do not unload it. For this isolated example, unload the host NVMe driver before you stop the Initiator application:

    Bash
    modprobe -r nvme
    
  3. Stop the Initiator application with Control+C. Allow draining and teardown to finish.

  4. Remove the dynamic function using its VUID:

    Bash
    doca_memos_initiator_ref_app -p <emulation-manager-pci> -U <vuid> -T nvme
    
  5. Stop the Simple Target sample with Control+C. Unless you want to reset the example's data, keep its backing file.

Data Path

The following flows show how a value moves between the components.

Store Flow

  1. fio writes bs bytes at an offset. The plugin hashes the offset into an 8-byte key and submits a DOCA Key-Value Store task.

  2. DOCA Key-Value sends an NVMe KV Store command through io_uring NVMe passthrough.

  3. The Initiator reference-application worker that owns the I/O queue receives the command and copies the value from host memory with DOCA DMA.

  4. The worker runs a DOCA Memos Initiator store task on the volume, which writes the value to the Simple Target sample over RDMA.

  5. The worker completes the NVMe command with the target's status, and fio receives the completion.

Retrieve Flow

  1. fio reads bs bytes at an offset. The plugin derives the same key and submits a DOCA Key-Value Retrieve task.

  2. The Initiator reference-application worker runs a DOCA Memos Initiator retrieve task, which reads the value from the Simple Target sample over RDMA.

  3. The worker copies the value to the host buffer with DOCA DMA and completes the command. A key that was never stored completes as not found, which fio reports as ENOENT.

Example Constraints

  • This combined example supports values up to 4 KiB because the Initiator reference application limits its DMA scratch slots and advertised maximum to that size. The backing namespace can impose a lower limit. This is not a general limit of the fio plugin, DOCA Key-Value, or the Memos Initiator library. See the Initiator application limitations.

  • Always specify size=, because KV namespace capacity does not provide a reliable fio workload range. For fixed bs, the example covers size / bs keys: 512 KiB / 4 KiB = 128. Select a range suitable for the backend, and do not treat it as a validated free-capacity reservation.

  • For this verification example, use numjobs=1. The plugin derives keys from offsets, so concurrent jobs sharing offsets can overwrite each other's values. For separate Store and Retrieve runs, keep size, bs, and hash_type consistent.

  • In read-only or mixed workloads, keys that have not been stored might return not found (ENOENT). Configure such workloads according to the fio plugin guide; the earlier Store-then-verify example does not intentionally ignore data errors.

Before you extend this example, consult each component's limitations, known issues, and troubleshooting.

DOCA Libraries

Component

Libraries Used

Host fio plugin

DOCA Key-Value

BlueField Initiator reference application

DOCA DevEmu NVMe, DOCA DMA, DOCA Memos Initiator, and DOCA Arg Parser

Simple Target sample

DOCA Memos Target and DOCA Core

Last updated: