Doca Rdma
NVIDIAOfficialCreated by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides technical guidance for developers using the DOCA RDMA library to facilitate data movement between processes or hosts on NVIDIA BlueField DPU or ConnectX NIC hardware. It covers the lifecycle of RDMA contexts, connection methods, task types, and permission management, ensuring developers use the DOCA API rather than raw libibverbs or rdma_cm. The skill emphasizes the use of shipped DOCA samples as the starting point for development and provides structured workflows for configuring, building, and debugging RDMA-enabled applications.
What it does
- Guides the setup of RDMA contexts and connection methods like RDMA CM, bridge, or gRPC.
- Defines the taxonomy of eleven RDMA task types including Send, Receive, Read, Write, and Atomic operations.
- Provides a permission matrix for mmap and RDMA operations to prevent access errors.
- Outlines the capability discovery process using doca_rdma_cap_* functions.
- Maps DOCA_ERROR_* codes to specific RDMA lifecycle or configuration issues.
- Prescribes a workflow for modifying shipped DOCA RDMA samples to implement custom logic.
When to use it
- When implementing data movement between hosts or processes over NVIDIA NICs.
- When troubleshooting RDMA connection failures or permission errors.
- When determining the appropriate RDMA task type for a specific data pattern.
- When integrating RDMA functionality into non-C applications via FFI or bindings.
- When verifying if a specific RDMA capability is supported on a given device.
Advantages
- Ensures adherence to the DOCA programming model for portability and lifecycle management.
- Prevents common pitfalls associated with bypassing the DOCA abstraction layer.
- Provides a clear, verified path for building and running RDMA applications.
- Standardizes the approach to debugging RDMA-specific errors and connection states.
Usage examples
- “How do I set up a basic RDMA connection between two processes?”
- The agent provides the lifecycle workflow: create context, configure tasks and permissions, start the context, establish a connection, and handle completion events.
- “My one-sided read returns a permission denied error. What should I check?”
- The agent guides you to verify the mmap permissions and RDMA access flags against the task requirements defined in the capability companion.
- “Does my device support Atomic Compare-and-Swap over RoCE?”
- The agent instructs you to use doca_rdma_cap_task_atomic_cmp_swap_is_supported against your doca_devinfo to confirm hardware support.
- “How do I build a custom RDMA application using DOCA?”
- The agent directs you to build the shipped DOCA RDMA samples first, then apply modifications to the payload and logic while maintaining the required build structure.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/doca-rdma/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-rdma.zip -d .agents/skills
Documentation by NVIDIA
DOCA RDMA
Examples
"Completions never arrive after submit." — stay on the DOCA RDMA task and progress-engine path. Do not rewrite it as raw verbs.
"One-sided read returns permission denied." — check mmap + RDMA permissions and
doca_rdma_cap_*before changing the task type.
Instructions
Follow Loading order below. Open the tasks companion for configure / build / run. Open the capabilities companion for the task taxonomy and safety policy. Do not open every companion file.
Non-negotiable: the deliverable uses DOCA RDMA, not raw verbs
When this skill is in scope, the user is asking for DOCA RDMA. The
program you produce must link libdoca_rdma and call the
doca_rdma_* API (directly in C/C++, or through a thin FFI/cgo shim
from another language). Do NOT implement the request with raw
libibverbs / librdmacm / RDMA-CM and call it done. Those move bytes
but completely bypass DOCA — which defeats the entire purpose of using
this library, loses the DOCA programming model (progress engine, task/
event lifecycle, capability discovery, portability across BlueField/
ConnectX generations), and is the single most common failure mode.
"Raw verbs is fewer lines" / "it avoids building a DOCA binding layer"
is not an acceptable reason to bypass DOCA. The correct low-friction
path for a non-C language (Go, Rust, Python, …) is not to re-bind
the whole API — it is to start from a shipped DOCA RDMA sample under
$(pkg-config --variable=prefix doca)/samples/doca_rdma/ (substitute the
module resolved on the target) and wrap its entry functions in
a thin cgo/FFI shim built with #cgo pkg-config: doca (Go) or the
equivalent. That shim is a single small file, not "a large custom
binding layer". See ## build Step 0 and
modify.
If pkg-config doca or the DOCA build fails, fix the build (module
name, PKG_CONFIG_PATH, sample path) — do not silently fall back to
verbs. A binary whose ldd shows no libdoca_rdma is a failed
DOCA-RDMA task, regardless of whether bytes moved.
Concrete path (verified on DOCA 3.3, one RoCE port, two processes):
Record the installed version first: run
pkg-config --modversion doca-rdmaand show the result.Build the shipped pair in place, output outside. The samples'
meson.buildreads../../../VERSION, so a copied samples tree does not configure. Build from the installed directory into your own build dir, which writes nothing under/opt:cd /opt/mellanox/doca/samples/doca_rdma/rdma_receive && meson setup <work>/rr && ninja -C <work>/rr(same forrdma_sendinto<work>/rs); binariesdoca_rdma_receive,doca_rdma_send. Confirm flags with--help.Run both in one command. Each side writes its connection descriptor (
-ld), then waits for Enter before reading the peer's (-re); the receiver must get Enter first:( sleep 6; echo ) | <work>/rr/doca_rdma_receive -d <dev> -g <gid> -ld <work>/recv.desc -re <work>/send.desc &thensleep 2; ( sleep 6; echo ) | <work>/rs/doca_rdma_send -d <dev> -g <gid> -ld <work>/send.desc -re <work>/recv.desc; wait. Green: the receiver logsGot from sender: "..."and both printSample finished successfully.Failed to open the file ... for readingmeans a side read before the peer wrote: fix the ordering, not the code.Extend only after the stock run is green. For extra output (a checksum or proof line), copy the whole samples tree with
/opt/mellanox/doca/VERSIONkept three levels above the sample directory, change only the payload and the receiver's print, and keep the same run sequence and any program names or output format the user asked for. Never write a new RDMA program from scratch, never edit the installed samples, and never fall back to raw verbs,rdma_cmcode,ib_write_bw,rpingor a loopback.
Device and GID. Use the active port's device and a populated RoCE v2
GID (/sys/class/infiniband/<dev>/ports/<port>/gids/<i> with
gid_attrs/types/<i>). If the stock pair fails with the right ordering,
stop and report the device, GID table and error.
Where to start: This skill assumes DOCA is already installed and
the user is doing hands-on RDMA work on a BlueField / ConnectX /
host with DOCA. Open the tasks companion if the user wants to do
something (configure / build / modify / run / test / debug); open
the capabilities companion when the question is what can
RDMA express on this version. If the user has not installed DOCA
yet, route to doca-setup/SKILL.md first.
Example questions this skill answers well
The CLASSES of RDMA questions this skill is built to answer, each with one worked example. The agent should treat the class as the load-bearing piece — the worked example is a single instance.
"How do I bring up an RDMA context and connect two sides?" — worked example: "set up sender + receiver with RDMA CM on a single host for first-run testing". Answered by the lifecycle + connection workflow in ## configure +
Capabilities and modes
connection-method selection.
"Which RDMA task type fits this data-movement pattern?" — worked example: "one-sided write + completion via Send-with-Immediate for a small control message". Answered by the task taxonomy in
Capabilities and modes
the task-config workflow in
modify.
"What mmap permissions does this task need? Do I have to export the mmap?" — worked example: "my Read task fails with insufficient permissions". Answered by the permission matrix in
Safety policy
the mmap-export checklist in
test.
"Is this RDMA capability supported on my device + transport?" — worked example: "does this device support Atomic Compare-and-Swap over RoCE". Answered by the capability-query rule (
doca_rdma_cap_task_*_is_supportedagainst adoca_devinfo) inCapabilities and modes
the discovery step in
configure.
"Is this RDMA API available on my installed DOCA version?" — worked example: "is RDMA CM in DOCA 2.6.0". Answered by the version-compatibility section in
Version compatibility
the version-discovery rule (
pkg-config --modversion doca) pinned in ## configure.
"What does this
DOCA_ERROR_*from an RDMA call mean and which layer caused it?" — worked example: "DOCA_ERROR_BAD_STATEfromdoca_rdma_connection_disconnect". Answered by the RDMA overlay on the cross-library taxonomy inError taxonomy
the layered ladder in
debug that escalates to
doca-debug/SKILL.md.
Audience
This skill serves external developers building applications that
consume the DOCA RDMA library — i.e., users whose code calls
doca_rdma_* (directly in C/C++, or through FFI/bindings from
another language) to do RDMA data movement between two sides
(host↔host, host↔BlueField, DPU↔DPU, or SF↔SF on a BlueField). It
is not for NVIDIA developers contributing to DOCA RDMA itself.
Language scope. DOCA RDMA normally ships as a C library inside the
umbrella doca pkg-config module (public header doca_rdma.h, shared
object libdoca_rdma.so); split installs may expose a per-library module.
Always discover the module on the target (pkg-config --list-all | grep -i doca) rather than assuming either layout. The
shipped samples are written in C
(NVIDIA's choice). C and C++ consumers are the canonical case and
the worked examples in the tasks companion assume that path. Other-language
consumers (Rust, Go, Python, …) consume the same *.so through FFI
or language-specific bindings; the skill's contribution in that case
is to keep the lifecycle, capability-discovery, permission-matrix,
error-taxonomy, and connection-method guidance language-neutral, and
to route the agent to the public C ABI as the authoritative surface
that any wrapper will eventually call. The non-C deliverable is still
a DOCA program: a thin cgo/FFI shim over the shipped doca_rdma
sample that links libdoca_rdma (#cgo pkg-config: doca) — never a
raw-libibverbs reimplementation chosen to avoid wrapping DOCA (see the
mandate at the top of this file).
When to load this skill
Load this skill when the user is doing hands-on DOCA RDMA work, in any language. Concretely:
Initializing an RDMA context on a
doca_dev. The Core order is create → configure (taskset_conf+ mmap/RDMA permissions + optionalset_*) → start → connect → use → stop → destroy. Configuration MUST finish beforedoca_ctx_start().Establishing a connection — picking between RDMA CM (
doca_rdma_connect_to_addr()/doca_rdma_start_listen_to_port()/doca_rdma_connection_accept()), bridge / OOB (doca_rdma_bridge_*), or gRPC (out-of-band exchange ofdoca_rdma_export()output).Setting permissions on
doca_mmapcorrectly for the chosen task type (Read needs RDMA-read + local read-write; Write needs RDMA-write; Atomic needs RDMA-atomic; Send needs only local read-write).Reading / setting library properties via
doca_rdma_set_*anddoca_rdma_cap_get_*to size queues, list lengths, and transport-type selection.Checking which RDMA task types and transport types are supported on the active
doca_devinfo.Debugging a
DOCA_ERROR_*returned from an RDMA call (lifecycle vs. permission vs. capability vs. driver-below) and the connection state-machine transitions (doca_rdma_set_connection_state_callbacks).Designing or extending non-C bindings (Rust, Go, Python, …) that wrap the RDMA C ABI — for the lifecycle, permission, and capability rules the wrapper must honor.
Do not load this skill for general DOCA orientation, install of
DOCA itself, or non-RDMA library questions. For those, use
doca-public-knowledge-map/SKILL.md.
What this skill provides
This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive RDMA-specific material lives in two companion files:
the capabilities companion — what RDMA can express on this version: the eleven task types and their permission matrix, the three connection methods, transport types (RC baseline and alpha-level DC for the export/connect CPU-datapath flow — there is no UD) — note these are the per-QP service type controlled by
doca_rdma_set_transport_type(), NOT the link-layer (IB vs RoCE) which is inherited from the device port configuration, the capability-query surface (doca_rdma_cap_*), the RDMA error taxonomy (mapped onto the cross-libraryDOCA_ERROR_*set), the observability surface (per-task events, connection state callbacks), and the safety policy that gates permission and export decisions.the tasks companion — step-by-step workflows for the six in-scope RDMA verbs:
configure,build,modify,run,test,debug. Plus aDeferred task verbsblock that points out-of-scope questions at the right next skill.
The skill assumes a host or BlueField where DOCA is already
installed at the standard location and the user has the privileges
their public install profile expects. It does not cover installing
DOCA — that path goes through
doca-setup/SKILL.md.
What this skill deliberately does not ship
This skill is agent guidance, not a samples or templates bundle. To keep the boundary clean, it deliberately does not contain — and pull requests should not add:
Pre-written DOCA RDMA application source code, in any language. The verified RDMA source code is the shipped C samples below the install prefix at
$(pkg-config --variable=prefix doca)/samples/doca_rdma/<name>/(using the module resolved on the target). The agent's job is to route the user to those files and prescribe a minimum-diff modification on them via the universal modify-a-sample workflow indoca-programming-guide/SKILL.md, layered with the RDMA-specific overrides inmodify.
Standalone build manifests (
meson.build,CMakeLists.txt,Cargo.toml, …) parked inside the skill. The agent constructs the build manifest in the user's project directory against the user's installed DOCA, wherepkg-config --modversion docais the source of truth (resolve the module per ## build Step 0 — preferdoca-rdmawhen it resolves).A
samples/,bindings/, orreference/subtree of any kind. A mock or incomplete artifact in this skill's tree, even one labeled "reference", is misleading: users will read it as buildable.
Loading order
Read this skill first to confirm the user's question is in scope.
If the question is what RDMA can express—task taxonomy, link-layer vs transport-type selection, connection methods, permissions, errors, observability, or safety—read the capabilities companion.
If the question is how to do it—configure, build, modify, run, test, or debug—read the matching H2 in the tasks companion. Read both companions only when the workflow depends on a capability or safety decision; do not load both unconditionally.
Both companion files cross-link to each other and to
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public docs or the
installed package layout" rather than "RDMA-specific guidance".
Related skills
doca-public-knowledge-map/SKILL.md— the routing table for every public DOCA documentation source and the on-disk layout of an installed DOCA package. Always available alongside this skill.doca-setup/SKILL.md— env preparation, install verification, and the I have no install yet path with the public NGC DOCA container. This skill assumes its preconditions are satisfied.doca-programming-guide/SKILL.md— general DOCA programming patterns shared by every library: the canonicalpkg-config+ meson build pattern, the universal modify-a-shipped-sample first-app workflow, the universal lifecycle, the cross-libraryDOCA_ERROR_*taxonomy, and the program-side debug order. This skill layers RDMA specifics on top.doca-debug/SKILL.md— the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). RDMA-specific debug (state-machine transitions, permission failures, connection callbacks) overlays on top of that ladder.
Files
- ATTRIBUTION.mdAdded by AutoGineer885 B
- BENCHMARK.md10.5 KiB
- CAPABILITIES.md18.2 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md15.8 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md30.6 KiB
- evals/evals.json2.4 KiB
- skill-card.md5.4 KiB
- skill.oms.sig5.1 KiB
CAPABILITIES.md
DOCA RDMA capabilities, version compatibility, errors, observability, safety
Where to start: The pattern overview below names the recurring RDMA-class patterns. Pick the pattern first, then drill into the H2 that owns the substance. For the how of executing each pattern, jump to TASKS.md.
Read this file when the loader sent you here from
SKILL.md. For step-by-step workflows that use these
capabilities (configure, build, modify, run, test, debug) see
TASKS.md. For where the underlying public documentation
and installed package paths live, defer to
doca-public-knowledge-map/SKILL.md — do
not duplicate URLs or install paths in this file.
Pattern overview
Every RDMA-class question this skill teaches resolves into one of SIX patterns. The patterns are CLASSES — they apply across every RDMA data-movement use case, not just the worked example shown.
| RDMA pattern | Class shape | Where the substance lives |
|---|---|---|
| 1. Pick the connection method | RDMA CM (callback-driven) vs bridge / OOB vs gRPC; decide before quoting any connection-side code path | ## Capabilities and modes connection-method bullet |
| 2. Stand up the context | DOCA Core lifecycle: create → configure (tasks, permissions, properties) → start → connect → use → stop → destroy | TASKS.md ## configure |
| 3. Express the data-movement pattern as a task | Receive / Send / Send-Imm / Read / Write / Write-Imm / Atomic CmpSwp / Atomic FetchAdd / Get-Sync / Set-Sync / Add-Sync — pick by direction (one-sided vs two-sided) and semantics (data vs atomic vs sync-event) | ## Capabilities and modes task taxonomy + TASKS.md ## modify |
| 4. Set permissions correctly | mmap permissions + RDMA permissions paired per task type; export the mmap with doca_mmap_export_rdma() when the task requires the peer to access it | ## Safety policy permission matrix + TASKS.md ## test |
| 5. Observe what the HW actually did | Per-task completion events on the progress engine + connection state callbacks; doca_rdma_cap_* for what was discoverable up front | ## Observability + TASKS.md ## debug |
6. Interpret a DOCA_ERROR_* from an RDMA call | Map the error to a layer (env / build / link / runtime / program / driver), then route | ## Error taxonomy RDMA overlay + TASKS.md ## debug |
Two cross-cutting rules that apply to every pattern above:
Discover the version-installed surface, do not assume. Every pattern above gates on
pkg-config --modversion doca(the umbrella module that ships RDMA — there is normally no separatedoca-rdma.pc; verify withpkg-config --list-all | grep -i doca) and on thedoca_rdma_cap_*capability queries against the activedoca_devinfo. Quoting a task type, a transport type, or a property value without checking is the most common hallucination failure mode.Permissions before payload, every time. The mmap permission
RDMA permission pair must be set on both sides before the task is submitted, and the mmap exported when the peer needs to access it. Skipping the permission set returns
DOCA_ERROR_*that masquerades as a hardware bug.
Capabilities and modes
DOCA RDMA is a DOCA Core Context. Every RDMA instance follows
create → configure (tasks, permissions, properties) → start →
connect → use → stop → destroy. Configuration MUST finish before
doca_ctx_start(). The cfg-object phases underneath that
(cfg-create → cfg-set-* → init) are how configure is implemented;
they do not replace connect as a distinct step after start (see
doca-programming-guide CAPABILITIES.md ## Capabilities and modes (doca-programming-guide/CAPABILITIES.md#capabilities-and-modes)).
On top of that lifecycle, RDMA layers its own connection
state-machine and task model.
Two distinct, orthogonal axes — link-layer vs transport-type. RDMA consists of two connected sides passing data between one another, and the bundle MUST keep the following two axes separate:
Link-layer (network fabric): the wire/physical fabric the connection runs over — either InfiniBand (IB) or Ethernet using RoCE (v1 or v2). Link-layer is determined by the active
doca_dev's port configuration (e.g.mlxconfigLINK_TYPE_P*) and is not chosen via a DOCA RDMA API; the agent inherits whatever the device exposes.Transport-type (RDMA QP service type): the per-QP service type. The
enum doca_rdma_transport_typedefines exactly two values — RC (Reliable Connection) and DC (Dynamically Connected; alpha, supported only in the export/connect flow on the CPU datapath). There is NO UD (Unreliable Datagram) transport in DOCA RDMA. This IS the axis thatdoca_rdma_set_transport_type()controls. RC is the baseline; DC is alpha and restricted to the export/connect + CPU-datapath flow — gate task availability ondoca_rdma_cap_task_*_is_supported(devinfo).
The two axes are independent: RC over IB, RC over RoCE, DC (alpha)
over IB, DC (alpha) over RoCE are all valid combinations subject to
device + version caps. Treating "IB / RoCE" as the value the
agent passes to doca_rdma_set_transport_type() is a bug —
that setter takes a transport-type (RC or alpha-level DC), not a
link-layer.
Device support. BlueField-2 and higher devices are supported.
On the host any doca_dev works; on the BlueField platform,
applications must provide the library with SFs as a doca_dev
(see the public OpenvSwitch Acceleration — OVS in DOCA and
BlueField DPU Scalable Function guides, both reachable through
doca-public-knowledge-map/SKILL.md).
The exception is RDMA on the DPA datapath, which currently only
supports PFs.
The eleven task types. RDMA exposes the following tasks; each
has its own doca_rdma_task_*_set_conf (enable the task) and
doca_rdma_cap_task_*_is_supported (capability query) entry
points. The agent must call the capability query before assuming
the task type is available on the user's device.
| Task type | Direction | Notes |
|---|---|---|
| Receive | two-sided | Always paired with a Send on the peer; destination buffer must be pre-posted |
| Send | two-sided | Local read-write mmap; peer must have a Receive posted |
| Send with Immediate | two-sided | Same as Send + 4-byte immediate value that surfaces on the peer's Receive completion |
| Read | one-sided | Peer's mmap must be RDMA-readable + exported |
| Write | one-sided | Peer's mmap must be RDMA-writable + exported |
| Write with Immediate | one-sided | Same as Write + immediate value delivered as a peer-side Receive completion |
| Atomic Compare and Swap | one-sided | Peer's mmap must be RDMA-atomic + exported |
| Atomic Fetch and Add | one-sided | Peer's mmap must be RDMA-atomic + exported |
| Get Remote DOCA Sync Event | one-sided | Same permissions as Read |
| Set Remote DOCA Sync Event | one-sided | Same permissions as Write |
| Add Remote DOCA Sync Event | one-sided | Same permissions as Atomic Fetch-and-Add |
Connection methods. Three documented ways to connect two RDMA instances; pick one before writing any connection-side code:
| Method | Shape | When to pick |
|---|---|---|
RDMA CM (doca_rdma_connect_to_addr() on the client; doca_rdma_start_listen_to_port() + doca_rdma_connection_accept() / _reject() / _disconnect() on the server; plus doca_rdma_set_connection_state_callbacks()) | Server/client; non-blocking; event-driven via the progress engine | When the application can run the PE and wants the library to manage handshake retries / timeouts |
Bridge / OOB (doca_rdma_bridge_*) | The user app does the TCP/etc. listen + accept itself, then hands the RDMA CM id to the library | When the application already has its own out-of-band control plane and wants RDMA to consume a connection it produced |
| gRPC / arbitrary OOB | The user app exchanges the output of doca_rdma_export() over any out-of-band channel and feeds it to doca_rdma_connect() | When the application has no RDMA CM presence at all; the channel can be anything (gRPC, file, MPI, …) |
Multiple connections. A single RDMA instance can hold multiple
parallel connections. Sizing is via
doca_rdma_set_max_num_connections(); per-connection identity is
the connection object returned by the connect / accept call. All
established connections are terminated when the context is stopped.
Configuration shape. Mandatory configurations before
doca_ctx_start(): at least one task type enabled via
doca_rdma_task_*_set_conf, and the matching permissions set on
the RDMA instance and the mmap. Optional configurations
(queue sizes, max buf-list lengths, transport type, connection
timeouts) use the doca_rdma_set_* family with defaults coming
from the library; query the active value with
doca_rdma_cap_get_*.
Version compatibility
For the canonical DOCA version-detection chain, the four-way match rule, NGC container semantics, and the headers-win-over-docs rule, see doca-version/SKILL.md. The body lives there; this skill does not duplicate it.
The RDMA-specific overlay is:
DC transport is alpha. The public DOCA RDMA guide explicitly notes that dynamically-connected (DC) transport support is alpha-level. The agent must surface this when the user asks about DC, not present it as production-stable. Use
pkg-config --modversion docaas the build-time anchor (perdoca-version TASKS.md ## configure(doca-version/TASKS.md#configure)) when asked which RDMA features are on this install.Use the
doca_rdma_cap_*query family at runtime. Per the cross-cutting rule indoca-version CAPABILITIES.md ## Observability(doca-version/CAPABILITIES.md#observability), the cap-query is the runtime authority for "is this task / transport supported on this device + this DOCA version". The version-matrix is the promise; the cap query is the reality.The resolved DOCA pkg-config module must match
doca_caps --versionat the four-way-match check (perdoca-version CAPABILITIES.md ## Version compatibility(doca-version/CAPABILITIES.md#version-compatibility)). RDMA normally ships inside the umbrelladocamodule;pkg-config --modversion docamust agree withdoca_caps --version. On rarer split installs that expose per-library.pcfiles, every resolved component.pcmust agree; a mismatch (one component reporting release X, another release Y) is the classic partial-install pattern — route todoca-version TASKS.md ## debug(doca-version/TASKS.md#debug) ladder step 2 before any RDMA-layer diagnosis.
Error taxonomy
The cross-library DOCA_ERROR_* taxonomy (what each family means
and which debug layer it routes to) lives in
doca-programming-guide CAPABILITIES.md ## Error taxonomy (doca-programming-guide/CAPABILITIES.md#error-taxonomy).
The RDMA-specific overlay names the families the agent will see
most often from RDMA calls and what they specifically indicate:
| Family | Most common RDMA cause | First action |
|---|---|---|
DOCA_ERROR_BAD_STATE | Connection state-machine misuse (e.g. connection_disconnect on a connection that's already gone); lifecycle out of order | Walk the state machine; confirm the doca_ctx_state is what the call expects |
DOCA_ERROR_NOT_PERMITTED | mmap permissions / RDMA permissions don't cover the task type | Re-check the permission matrix in ## Safety policy; confirm the mmap was exported when required |
DOCA_ERROR_NOT_SUPPORTED | The task type / transport type is not supported on this device + DOCA version | Run the matching doca_rdma_cap_*_is_supported against the active doca_devinfo; if false, that is the answer |
DOCA_ERROR_FULL | Send queue full; bulk-submit exceeded max_send_buf_list_len * send_queue_size | Drain completions on the PE before re-submitting; or raise the queue size at configure time |
DOCA_ERROR_DRIVER | The layer below DOCA (driver / firmware) reported failure | Capture `dmesg |
DOCA_ERROR_TIME_OUT | RDMA CM connection_request_timeout exceeded | Confirm peer reachability; consider raising the timeout via doca_rdma_set_connection_request_timeout() |
Quote doca_error_get_descr() verbatim — do not paraphrase. The
cross-cutting debug ladder (doca-debug ## debug (doca-debug/TASKS.md#debug))
is the canonical layered diagnosis path that the agent escalates
to once the RDMA-specific cause has been narrowed.
Observability
The DOCA Core progress engine (PE) is the single source of observability for RDMA: every task completion (success or failure) and every connection state transition arrives as an event on the PE. RDMA does not maintain per-pipe counters the way Flow does; its observability surface is event-driven, not poll-driven.
Three primary signals the agent should reach for:
Task completion events on the PE. Every submitted task produces a completion event when it finishes (or errors). The completion carries the
doca_error_tif it failed; the agent must inspect the per-task completion, not thedoca_task_submit()return value alone.Connection state callbacks. Registered via
doca_rdma_set_connection_state_callbacks(). The four transitions the agent should expect callbacks for: connection request received (server side), connection established (both sides), connection failed, connection disconnected. A debugging session without these callbacks wired up is blind to half the lifecycle.Capability snapshot at configure time. The output of every
doca_rdma_cap_*query is a snapshot of what the library said was possible before any task was submitted. Save it as the baseline; if a task later returnsDOCA_ERROR_NOT_SUPPORTEDthe diff against this snapshot is the bug.
For cross-cutting observability primitives (--sdk-log-level, the
doca-<lib>-trace build flavor, the DOCA_LOG_LEVEL env var) see
doca-debug CAPABILITIES.md ## Observability (doca-debug/CAPABILITIES.md#observability).
For the install-tree observability (logger names, package layout)
defer to
doca-public-knowledge-map/SKILL.md.
Safety policy
Overlay on the bundle-wide hardware-safety meta-policy. The rules below are this skill's per-artifact overlay on the cross-cutting rules in
doca-hardware-safetyCAPABILITIES.md ## Safety policy (doca-hardware-safety/CAPABILITIES.md#safety-policy) (specifically ### Per-artifact overlay pattern (doca-hardware-safety/CAPABILITIES.md#per-artifact-overlay-pattern)). When the two layers disagree, the stricter wins; when either layer says STOP, the agent stops.
RDMA's safety surface is permission-driven. The library sits on top of memory exposed directly to a remote peer; an incorrect permission allows the peer to read or write memory the user did not intend to share, and an over-broad export persists until the mmap is destroyed.
Per the public RDMA guide:
In production environments, ensure RDMA operations are performed over a secure channel. The agent must surface this warning when the user asks about production deployment; do not paraphrase or omit. The full text lives on docs.nvidia.com/doca/sdk/doca-rdma/index.html.
Permission matrix is asymmetric and per-task. The agent must consult the matrix before recommending permission flags:
| Task | Local-side mmap | Local-side RDMA | Peer-side mmap | Peer-side RDMA | Export required |
|---|---|---|---|---|---|
| Read / Get Remote Sync | local read-write | RDMA read | local read-write and RDMA read | RDMA read | yes (peer exports) |
| Write / Write-Imm / Set Remote Sync | local read-write | RDMA write | local read-write and RDMA write | RDMA write | yes (peer exports) |
| Atomic CmpSwap / Atomic FetchAdd / Add Remote Sync | local read-write | RDMA atomic | local read-write and RDMA atomic | RDMA atomic | yes (peer exports) |
| Send / Send-Imm | local read-write | — | local read-write | — | no |
| Receive | local read-write | — | local read-write | — | not relevant |
The mmap must stay valid until the RDMA context is destroyed. Destroying the mmap before
doca_ctx_destroy()is a use-after-free on the library's bookkeeping; symptoms includeDOCA_ERROR_BAD_STATEfrom subsequent calls and undefined behavior on the peer's outstanding tasks.Validate permissions BEFORE submitting the first task. The cheapest way to validate the matrix is a Send/Receive smoke pair: if the bidirectional control path works, the two-sided permissions are correct; one-sided permission errors then isolate to the Read/Write/Atomic permission set.
Deferred topic boundaries
This skill scopes itself to the DOCA RDMA library. Adjacent topics the agent will get asked but should route elsewhere:
General RDMA networking concepts (RoCE vs IB; what a queue pair is; what a memory region is in the underlying ibverbs layer) — outside this skill. Route to the upstream RDMA / IB documentation; this skill assumes the user already understands the abstractions and is asking how to express them through the DOCA RDMA API.
DOCA Core context and progress engine internals — owned by
doca-programming-guide/SKILL.md. This skill uses the Core context lifecycle; it does not redefine it.Cross-cutting
DOCA_ERROR_*taxonomy — owned bydoca-programming-guide CAPABILITIES.md ## Error taxonomy(doca-programming-guide/CAPABILITIES.md#error-taxonomy). This skill adds the RDMA overlay, not the taxonomy itself.Cross-cutting debug ladder (install / version / build / link / runtime / program / driver) — owned by
doca-debug ## debug(doca-debug/TASKS.md#debug). This skill's## debugredirects there for layer 1-4 and layer 7; layers 5-6 carry the RDMA-specific overlay.Cross-library
doca_capsinvocation patterns — owned bydoca-caps/SKILL.md. This skill references the RDMA capability query family (doca_rdma_cap_*), which is per-library; the cross-library capability snapshot tool (doca_caps --list-devs) is a separate surface routed there.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
The author says: Requires DOCA SDK on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) with a BlueField DPU or ConnectX NIC. Resolves the local install and module via `pkg-config --list-all | grep -i doca` and `pkg-config --variable=prefix MODULE`, replacing `MODULE` with the exact name returned by the preceding query. The normal module is the umbrella `doca`, while split installs may expose a per-library module. The validation steps require a live DOCA install.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/doca-rdma · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-rdma.zip