Doca Sta
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
DOCA STA (Storage Target Acceleration) is a library for offloading NVMe-over-Fabrics (NVMe-oF) target-side data paths to NVIDIA BlueField DPUs. This skill provides the necessary context for developers to configure, manage, and debug NVMe-oF targets using the DOCA STA C ABI. It covers the lifecycle of target subsystems, namespace management, backend NVMe-PCI disk integration, and queue-sizing capabilities. The skill is designed to work alongside other DOCA libraries like DOCA Flow and DOCA RDMA, ensuring developers can correctly steer traffic and manage the underlying transport layers.
What it does
- Instantiates and configures doca_sta subsystems and namespaces.
- Maps local NVMe-PCI disks to target backends via doca_sta_be.
- Validates platform support and hardware capabilities for STA.
- Provides guidance on sizing I/O queues and managing queue depth.
- Decodes DOCA_ERROR_* status codes related to STA operations.
- Integrates with DOCA Flow for steering NVMe-oF traffic.
When to use it
- When building an NVMe-oF storage target on BlueField hardware.
- When configuring target-side subsystems and namespaces.
- When troubleshooting connection timeouts or I/O failures in an NVMe-oF target.
- When querying device capabilities for queue limits and supported features.
- When integrating STA with RDMA transport and flow steering rules.
Advantages
- Provides a clear boundary between STA target logic and initiator-side stacks.
- Offers structured guidance on error taxonomy and debugging.
- Ensures correct usage of DOCA capability-query functions.
- Clarifies the relationship between STA and supporting libraries like DOCA Flow.
- Focuses on the authoritative C ABI for cross-language binding development.
Usage examples
- “How do I define a doca_sta_subsystem with a local NVMe disk?”
- The agent will guide you through the target-model-and-lifecycle workflow, explaining how to instantiate the STA context, define the NQN, and attach a local NVMe-PCI disk backend.
- “My NVMe-oF target connections are timing out over RoCE, what should I check?”
- The agent will direct you to verify the RDMA substrate, check DOCA Flow steering rules, and validate that the device supports the requested queue configuration.
- “Does my BlueField DPU support 16 I/O queues at depth 1024?”
- The agent will instruct you to use doca_sta_get_max_io_queue_size and related queries to check the hardware limits against your specific DOCA version.
- “What does DOCA_ERROR_IO_FAILED mean during an NVMe read?”
- The agent will explain that this is typically a transport-level error and guide you to inspect the RDMA connection and link status rather than the STA application code.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/doca-sta/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-sta.zip -d .agents/skills
Documentation by NVIDIA
DOCA STA (Storage Target Acceleration)
Examples
"Offload the nvmf target onto the DPU." — this is in scope. Stand up
doca_sta+ subsystem/namespaces; do not rewrite the initiator stack here."Identify Controller times out over RoCE." — check
doca_sta_cap_is_supportedand queue sizing before changing backend disks.
Instructions
Follow Loading order below. Open the tasks companion for configure / target / debug. Open the capabilities companion for queue limits and NVMe-oF caps. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed and
the user is doing hands-on NVMe-over-Fabrics storage-target work on
a BlueField-class device with DOCA. Open the tasks companion if
the user wants to do something (configure / modify / build / run
/ test / debug); open the capabilities companion when the
question is what can DOCA STA express on this version. If the
user has not installed DOCA yet, route to
doca-setup/SKILL.md first. If the user is
asking "is this an NVMe-oF initiator/host transport?", the
answer is no — doca-sta accelerates the target side: it presents
NVMe-oF doca_sta_subsystem targets backed by local NVMe-PCI
disks; the model lives in
the capabilities companion.
Example questions this skill answers well
The CLASSES of DOCA STA 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 NVMe-oF target that uses the BlueField to accelerate the storage data path?" — worked example: "define a
doca_sta_subsystem(NQN) with one namespace backed by a local NVMe-PCI disk (doca_sta_be) and accept NVMe-over-RDMA connections from a remote initiator". Answered by the target-model-and-lifecycle workflow in the tasks companion + the capabilities companion target-object table."Can this BlueField accelerate an NVMe-oF target at all?" — worked example: "my data center is RoCE end-to-end; does this device support DOCA STA target acceleration?". STA transport is RDMA-only (there is no NVMe-over-TCP path). Answered by the capability-query rule (
doca_sta_cap_is_supportedagainst adoca_devinfo) in the capabilities companionthe discovery step in the tasks companion.
"How deep can I size my I/O queues, and how many I/O queues per connection?" — worked example: "I want 16 I/O queues at depth 1024 each — does this device support that?". Answered by the queue-sizing capability surface in the capabilities companion
the queue-sizing step in the tasks companion which gates on the matching
doca_sta_get_max_*query (e.g.doca_sta_get_max_qps,doca_sta_get_max_io_queue_size).
"Which other DOCA libraries do I need alongside doca-sta?" — worked example: "do I need doca-rdma directly, or does doca-sta hide it from me?". Answered by the substrate-library rule in the capabilities companion
the env-prep checklist in the tasks companion step 1, which routes the steering side to
doca-flow/SKILL.mdand the RDMA substrate todoca-rdma/SKILL.md.
"Is this STA capability available on my installed DOCA?" — worked example: "is STA target acceleration supported on this BlueField + DOCA version?". Answered by the version-and-device overlay in the capabilities companion, which cross-links the canonical detection chain in
doca-version/SKILL.mdand adds the STA-specific cap-query rule (pkg-config --modversion doca-stais the build-time anchor; the runtimedoca_sta_cap_is_supportedquery is the truth)."What does this
DOCA_ERROR_*from a STA call mean and which layer caused it?" — worked example: "DOCA_ERROR_NOT_PERMITTEDwhen opening thedoca_dev". Answered by the STA overlay on the cross-library taxonomy in the capabilities companionthe layered ladder in the tasks companion that escalates to
doca-debug/SKILL.md.
A Connect handshake that never completes is usually not an STA bug. It is the single most common first-app failure, and the answer is to walk the three preconditions in the capabilities companion before any code change: the RDMA substrate resolves on the chosen device, the
doca_devwas opened with sufficient permission, and — most often the culprit — a DOCA Flow rule actually steers the matching NVMe-oF 5-tuples to this instance's queues. The steering side belongs todoca-flow/SKILL.md; route it rather than inventing adoca_sta_*steering call, and do not start by auditing STA lifecycle or target-side code. The same applies to an Identify Controller that times out over RoCE.
DOCA_ERROR_IO_FAILEDon a per-I/O completion is a transport error, not a target-side STA bug — a link drop, RDMA peer disconnect, firmware fault, or peer controller reset. Being able to ping the target does not exclude any of these. Do not retry blindly and do not change STA code first: capturedmesgand route todoca-rdma/SKILL.md, per the tasks companion.
Audience
This skill serves external developers building NVMe-over-Fabrics
storage targets that consume DOCA STA on BlueField — i.e., users
whose code calls doca_sta_* (directly in C/C++, or through
FFI/bindings from another language) to accelerate the target-side
data path of an NVMe-oF target on the BlueField hardware: presenting
doca_sta_subsystem targets (NQN + namespaces) backed by local
NVMe-PCI disks (doca_sta_be) to remote initiators over RDMA. The
skill is not for NVIDIA developers contributing to DOCA STA
itself, and it is not for initiator/host-side NVMe stacks.
Language scope. DOCA STA ships as a C library with
pkg-config module name doca-sta. DOCA STA ships no public
samples — the public packages install no
samples/doca_sta/ directory — so the worked examples in
the tasks companion build against the public headers directly rather than
modify a shipped sample. C and C++ consumers are the canonical
case. 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 target-model, lifecycle,
capability-discovery, queue-pair shape, substrate-dependency,
and error-taxonomy guidance language-neutral, and to route the
agent to the public C ABI as the authoritative surface that any
wrapper will eventually call.
When to load this skill
Load this skill when the user is doing hands-on DOCA STA work, in any language. Concretely:
Initializing a
doca_stainstance on adoca_devopened against a BlueField PF / SF and configuring the NVMe-oF target subsystems beforedoca_ctx_start().Defining target resources —
doca_sta_subsystem(NQN + namespaces) anddoca_sta_bebackend controllers (local NVMe-PCI disks) — and accepting NVMe-oF connections (admin queue plus N I/O queues per connection) on the target side as remote initiators connect over RDMA CM.Reading or setting STA properties via the
doca_sta_set_*family, checking device support viadoca_sta_cap_is_supported, and querying sizing limits via thedoca_sta_get_max_*family (max I/O queue depth, max number of queue pairs, max I/O size, max subsystems, max namespaces per subsystem, max backends).Wiring the NVMe-over-RDMA transport — STA's only transport; it lands on the
doca-rdmasubstrate and uses RDMA CM for connection establishment — for the target's I/O queues.Wiring DOCA Flow rules so that NVMe-oF traffic actually reaches the STA-managed queues — the steering boundary is
doca-flow, notdoca-sta.Debugging a
DOCA_ERROR_*returned from a STA call (lifecycle vs. capability vs. transport-layer I/O failure vs. driver-below) and the per-queue events on the DOCA Core progress engine.Designing or extending non-C bindings (Rust, Go, Python, …) that wrap the DOCA STA C ABI — for the lifecycle, queue-pair, cap-query, and substrate-dependency rules the wrapper must honor.
Do not load this skill for general DOCA orientation, install
of DOCA itself, raw RDMA data movement (use
doca-rdma/SKILL.md), raw packet I/O on
Ethernet queues (use doca-eth/SKILL.md),
flow-rule programming (use doca-flow/SKILL.md),
or initiator/host-side NVMe stack development
(SPDK or kernel-nvme own that, not this skill). For DOCA
documentation orientation, 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 STA-specific material lives in two companion files:
the capabilities companion — what DOCA STA can express on this version: the target object model (
doca_sta_subsystem/ namespaces /doca_sta_bebackend NVMe-PCI disks), the NVMe queue-pair shape (admin queue + I/O queues over RDMA), the RDMA-only transport, the capability-query surface (doca_sta_cap_is_supportedplus thedoca_sta_get_max_*sizing queries), the STA error taxonomy (mapped onto the cross-libraryDOCA_ERROR_*set), the observability surface (per-queue progress engine events, capability snapshots), and the safety policy that gates substrate-library, permission, and steering preconditions.the tasks companion — step-by-step workflows for the six in-scope STA verbs:
configure,modify,build,run,test,debug. Plus aDeferred task verbsblock that points out-of-scope questions at the right next skill, and aCommand appendixof the recurring commands the agent reaches for.
The skill assumes a BlueField (with DOCA installed at the
standard location) plus a remote NVMe-oF initiator reachable on
the fabric to connect into the accelerated target, and one or
more local NVMe-PCI disks to back the target's namespaces. It
does not cover installing
DOCA — that path goes through
doca-setup/SKILL.md. It does not cover
initiator/host-side NVMe stacks (SPDK bdev_nvme, kernel nvme
host) or NVMe protocol semantics above the accelerated target
data path — those are out of scope.
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 STA application source code, in any language. DOCA STA ships no public samples — there is no
/opt/mellanox/doca/samples/doca_sta/directory. The authoritative surface is the public headers under $(pkg-config --variable=includedir doca-common) plus the public DOCA STA guide; the agent builds against those directly rather than modifying a shipped sample, per the the tasks companion workflow.Initiator/host-side NVMe stack glue. SPDK
bdev_nvme, the kernelnvmehost, and any initiator-side NVMe stack are upstream projects out of scope for this skill — DOCA STA is target-side acceleration, not an initiator transport provider.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 doca-stais the source of truth.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.
For the STA capability matrix, the target object model, queue-pair shape, RDMA-only transport, capability-query rules, error taxonomy, observability, and safety policy, see the capabilities companion.
For step-by-step workflows — configure, modify, build, run, test, debug — see the tasks companion.
Both companion files cross-link to each other,
doca-version/SKILL.md for the canonical
version-handling rules,
doca-rdma/SKILL.md for the RDMA substrate
that NVMe-over-RDMA transport lands on,
doca-flow/SKILL.md for the steering rules
that direct NVMe traffic to STA-managed queues, and
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 "STA-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. The STA URL slug isDOCA-STA.doca-setup/SKILL.md— env preparation, install verification, BlueField mode checks, and the permission / group-membership requirements for opening adoca_dev. This skill assumes its preconditions are satisfied.doca-version/SKILL.md— canonical DOCA version-handling rules. This skill's## Version compatibilitycross-links the four-way match rule and adds only the STA-specific overlay (STA target-acceleration availability windows, NVMe-oF feature-set device-conditional support).doca-structured-tools-contract/SKILL.md— the bundle's structured-tools precedence rule (detect / prefer / fall back / report). The Command appendix in the tasks companion honors this contract.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 STA specifics on top.doca-rdma/SKILL.md— the RDMA substrate that NVMe-over-RDMA transport lands on. STA hides most of the RDMA queue-pair details from the consumer, but the user still needsdoca-rdmalinked in and the device's RDMA capabilities discoverable for the NVMe-over-RDMA path to work.doca-eth/SKILL.md— the queue-pair shape that STA's per-connection queue model echoes. Reach here if the user is asking general questions about how DOCA exposes queue-pairs that don't have an STA-specific answer.doca-flow/SKILL.md— the steering surface that decides which NVMe-oF packets land on which STA-managed queue. DOCA STA does not program steering itself; an NVMe-oF target whose connections never come up is often a missing or wrong Flow rule, not a STA bug.doca-debug/SKILL.md— the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). STA-specific debug (transport-type mismatches, queue-depth oversize, IO-failed transport errors) overlays on top of that ladder.
Files
- ATTRIBUTION.mdAdded by AutoGineer882 B
- BENCHMARK.md10.1 KiB
- CAPABILITIES.md20.3 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md15.8 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md35.2 KiB
- evals/evals.json3.2 KiB
- skill-card.md5.1 KiB
- skill.oms.sig5.1 KiB
TASKS.md
DOCA STA workflows
Where to start: The verbs run configure → modify → build → run → test → debug. Skip ahead only when the user is already
past a verb. The ## test verb is an iterative loop (cap-query
re-check → substrate / steering precondition re-check →
single-IO admin-then-read smoke → multi-queue smoke → loop back
if a precondition or sizing changed), not a one-shot pass — see
the eval-loop overlay in ## test below.
Read this file when the loader sent you here from
SKILL.md. For the STA capability surface, the
target object model (subsystem / namespaces / backend NVMe-PCI
disks), the NVMe queue-pair shape, the RDMA-only transport, the
capability-query rules,
the error taxonomy, the observability surface, and the safety
policy, see CAPABILITIES.md. For the
cross-library DOCA patterns layered under everything below (the
universal Core lifecycle, the cross-library DOCA_ERROR_*
taxonomy, the modify-a-shipped-sample workflow), see
doca-programming-guide/SKILL.md.
For the RDMA substrate that NVMe-over-RDMA transport lands on,
see doca-rdma/SKILL.md. For the steering
side that decides which NVMe-oF packets reach STA-managed
queues, see doca-flow/SKILL.md.
Each verb below describes the shape of the workflow, not a copy-paste recipe. The agent's job is to walk the user through the steps in order, verifying preconditions before recommending the next call.
configure
Goal: stand up a doca_sta Core context on a BlueField, confirm
the device supports STA, define the target object model
(subsystems / namespaces / backend NVMe-PCI disks), size the NVMe
queue pair against the reported doca_sta_get_max_* bounds, and
confirm both the
substrate-library and the steering preconditions are met before
the NVMe-oF Connect handshake is attempted.
Steps the agent should walk the user through:
Confirm the env preconditions and substrate library FIRST. Per the precondition matrix in
CAPABILITIES.md ## Safety policy, walk three checks BEFORE anydoca_sta_*call: (a) DOCA is installed and consistent —pkg-config --modversion doca-staresolves and matchesdoca_caps --versionper the four-way match rule owned bydoca-version/SKILL.md; (b) for the RDMA transport (STA's only transport),pkg-config --modversion doca-rdmaresolves ANDdoca_rdma_cap_*on the chosen device reports a non-empty surface perdoca-rdma CAPABILITIES.md ## Capabilities and modes(doca-rdma/CAPABILITIES.md#capabilities-and-modes); (c) the user has a plan for how NVMe-oF traffic will reach the STA-managed queue — either a DOCA Flow rule programmed perdoca-flow TASKS.md ## configure(doca-flow/TASKS.md#configure), or the env-side equivalent on the user's setup. If any of the three is missing, route to the owning skill (the env side todoca-setup TASKS.md ## configure(doca-setup/TASKS.md#configure)) first and do NOT propose adoca_sta_*workaround.Confirm the device supports STA. Per the cap-check rule in
CAPABILITIES.md ## Capabilities and modes, calldoca_sta_cap_is_supportedagainst the activedoca_devinfoand quote the result. This is the single device gate — there is no transport choice to make, because STA's only transport is NVMe-over-RDMA. If the device is not supported, that is the answer — this device or DOCA version cannot accelerate an STA target.Define the target object model. Per the target-object table in
CAPABILITIES.md ## Capabilities and modes, lay out the NVMe-oF target the BlueField will present:doca_sta_subsystem_create()(one NQN per subsystem),doca_sta_subsystem_add_ns()for each namespace (with a block size validated bydoca_sta_is_logical_block_size_supported()), anddoca_sta_be_create()for each backend controller (a local NVMe-PCI disk) that stores the namespace data. The remote initiator that connects in is out of scope.Size the NVMe queue pair against the reported maxima. Per the queue-pair sizing table in
CAPABILITIES.md ## Capabilities and modes, ASK the user for the intended per-connection I/O queue count and queue depth, then gate each input on the matchingdoca_sta_get_max_*query (doca_sta_get_max_qps,doca_sta_get_max_io_queue_size,doca_sta_get_max_io_size). Surface the queried ceilings before the user commits — oversizing fails atdoca_ctx_start()withDOCA_ERROR_NOT_SUPPORTEDorDOCA_ERROR_INVALID_VALUE, and undersizing leaves throughput on the floor. Each NVMe-oF connection always carries exactly one admin queue plus the configured number of I/O queues — that ratio is not negotiable.Create and configure the
doca_stacontext. This is a standard DOCA Core context create — the universal lifecycle fromdoca-programming-guide TASKS.md ## configure(doca-programming-guide/TASKS.md#configure) applies. Mandatory beforedoca_ctx_start(): the underlyingdoca_devopened against a device that passesdoca_sta_cap_is_supported; the devices added withdoca_sta_add_dev(); the IO-context count set withdoca_sta_set_max_sta_io()at or below the library maximum; the subsystems, namespaces, and backends from step 3 defined within thedoca_sta_get_max_*bounds. Register the per-queue and per-IO completion callbacks BEFORE start — callbacks registered afterdoca_ctx_start()are not observed on the first lifecycle transitions and the agent must surface this.Sanity check before any Connect handshake. Confirm with the user: that the remote initiator / host NVMe stack is a separate peer out of scope for doca-sta (doca-sta accelerates the target data path only, per
CAPABILITIES.md ## Capabilities and modes); whichdoca_sta_subsystem(NQN) the initiators will connect to; how the user will read per-queue state transitions and per-IO completions on the DOCA Core progress engine perCAPABILITIES.md ## Observability. If any of those are unclear, stop and ask.
If any step fails with a DOCA_ERROR_*, route through the STA
error taxonomy in
CAPABILITIES.md ## Error taxonomy
before retrying.
build
Goal: produce a binary that links DOCA STA against the user's
installed DOCA, using the canonical cross-library build pattern,
with the substrate library (doca-rdma) linked alongside — STA's
transport is RDMA, so doca-rdma is always required.
The build pattern for any DOCA C/C++ consumer is fully
documented in
doca-programming-guide TASKS.md ## build (doca-programming-guide/TASKS.md#build).
This skill carries only the STA-specific overlay:
| Slot | Value for STA | Why it matters |
|---|---|---|
pkg-config module name | doca-sta for the STA surface itself; AND doca-rdma for the RDMA substrate (always required — STA's transport is RDMA) | Linking only doca-sta without doca-rdma produces undefined reference errors for the substrate symbols — surface the substrate-link requirement up front per CAPABILITIES.md ## Safety policy |
| Include flags | pkg-config --cflags doca-sta doca-rdma | Resolves DOCA headers under whichever include directory pkg-config --cflags reports on this install (do not hardcode the include path — it can move across DOCA install profiles) for the STA surface and the RDMA substrate surface in one pass |
| Link flags | pkg-config --libs doca-sta doca-rdma | Pulls in whatever pkg-config --libs resolves on this install (do not predict the -l<name> form by hand — .so basenames use underscores, .pc names use hyphens, and pkg-config is the only correct translator), plus whatever the doca-rdma .pc adds (resolved by pkg-config, do not hand-craft); ordering is handled by pkg-config, do not hand-craft the -l list |
| Version anchors | pkg-config --modversion doca-sta MUST agree with doca_caps --version; pkg-config --modversion doca-rdma MUST also agree with the same line | Per the substrate-library version-match rule in CAPABILITIES.md ## Version compatibility, a STA install that compiles against one DOCA RDMA major and runs against another is a partial-install hazard; route to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) layer 2 |
| Companion DOCA libs | doca-argp for argument parsing (if the consumer uses the standard DOCA arg style); the cross-library doca-common is pulled in transitively | Adding unnecessary companion libs bloats the link line and obscures real partial-install issues |
| Initiator/host NVMe stack glue | NOT shipped by this skill | Per SKILL.md, the initiator / host NVMe stacks (SPDK bdev_nvme, kernel nvme host) are upstream projects out of scope; doca-sta is target-side acceleration, not an initiator transport provider |
For non-C consumers (Rust, Go, Python), the wrapper consumes
libdoca_sta.so (and libdoca_rdma.so for the RDMA substrate)
through FFI; the build-time version visibility goes through the
language's own FFI generator (e.g. bindgen against the
doca-sta headers, which assume the RDMA substrate headers). The
substrate rule, lifecycle
rule, and capability-discovery rules still apply per
doca-version CAPABILITIES.md ## Version compatibility (doca-version/CAPABILITIES.md#version-compatibility),
and the wrapper must surface the version-pair to the user.
modify
Goal: because DOCA STA ships no public samples (there is no
/opt/mellanox/doca/samples/doca_sta/ directory), the
first-app path is to build a minimal STA target directly against
the public headers — not to modify a shipped sample. The agent
assembles the smallest correct program from the doca_sta_* API
and the public DOCA STA guide.
The universal modify-a-shipped-sample workflow in
doca-programming-guide TASKS.md ## modify (doca-programming-guide/TASKS.md#modify)
does NOT apply here (there is no sample to start from); instead
the agent walks these slots to scope the from-scratch minimal
target:
| Slot | What the agent asks the user | STA-specific consideration |
|---|---|---|
| 1. Public-header surface | Which doca_sta_* symbols does this install expose? | There is no shipped sample; read the public headers at $(pkg-config --variable=includedir doca-common) doca_sta*.h (doca_sta.h, doca_sta_subsystem.h, doca_sta_be.h, doca_sta_io_qp.h, …) and the public DOCA STA guide as the authoritative surface. Do NOT fabricate a sample path. |
| 2. Target object model | How many subsystems / namespaces / backends does the target need? | Define each doca_sta_subsystem (NQN), its namespaces (doca_sta_subsystem_add_ns() with a doca_sta_is_logical_block_size_supported()-valid block size), and the doca_sta_be backend disks within the doca_sta_get_max_subsys / doca_sta_get_max_ns_per_subs / doca_sta_get_max_be bounds. |
| 3. Device support | Is STA supported on the chosen device? | Gate on doca_sta_cap_is_supported against the active doca_devinfo BEFORE writing any setup code. STA's transport is RDMA-only — there is no transport to choose. |
| 4. Queue-pair sizing | What I/O queue count and depth does the target need? | Gate each input on the matching doca_sta_get_max_* query (doca_sta_get_max_qps, doca_sta_get_max_io_queue_size, doca_sta_get_max_io_size); the reported max is the ceiling. |
| 5. Build manifest | A fresh meson.build (or equivalent) in the user's project | Wire pkg-config doca-sta doca-rdma (the RDMA substrate is always required); do NOT hand-roll a Makefile that drops the version-check and substrate-link rails. |
| 6. Initiator boundary | Is the user expecting doca-sta to act as an NVMe-oF initiator / host? | No — doca-sta is target-side acceleration only. The remote initiator (SPDK bdev_nvme, kernel nvme host) is out of scope; route the user to the upstream project. |
The agent emits an intent description + the six filled slots,
then helps the user assemble the minimal target program directly
against the public headers, validating each doca_sta_* call
against the header it came from. Because there is no shipped
sample to bisect against, the agent must lean harder on the
single-IO smoke in ## test as the known-good baseline.
run
Goal: actually execute the built binary against the user's installed DOCA on a BlueField, with a remote NVMe-oF initiator reachable on the fabric to connect into the accelerated target and drive the NVMe protocol semantics.
Steps the agent should walk the user through:
Confirm the remote initiator can reach the target. doca-sta accelerates the target data path; without a remote initiator (the NVMe-oF host) connecting in, no Connect handshake arrives and the target idles. For NVMe-over-RDMA — STA's only transport — both ends must route IB / RoCE to each other per
doca-rdma TASKS.md ## run(doca-rdma/TASKS.md#run). This is a fabric / env precondition, NOT a code problem.Confirm the steering side is in place. Per the precondition matrix in
CAPABILITIES.md ## Safety policy, NVMe-oF traffic only reaches the STA-managed queue when a DOCA Flow rule (or the env-side equivalent) steers it there. The most common symptom of a missing Flow rule is that the Connect handshake never completes and the program blocks indefinitely — do NOT recommend retrying thedoca_ctx_start()until the Flow rule is confirmed perdoca-flow TASKS.md ## run(doca-flow/TASKS.md#run).Start the target before the initiator connects. Bring the STA target up (subsystems / namespaces / backends defined,
doca_ctx_start()returned success) before the remote initiator attempts to connect. An initiator that connects before the target is listening produces a symptom identical to a steering bug and wastes bisection time.Have the remote initiator connect. Per
SKILL.md, doca-sta accelerates the target data path; the NVMe-oF Connect handshake, the Discovery exchange, and the admin / I/O command stream are driven by the remote initiator's NVMe host stack (SPDKbdev_nvme, kernelnvmehost, …), which is out of scope for this skill. Confirm the initiator is pointed at the target's NQN.Capture the structured log on the first run. Set
DOCA_LOG_LEVEL=tracefor the first run (seedoca-debug CAPABILITIES.md ## Observability(doca-debug/CAPABILITIES.md#observability)). This is the cheapest way to make the per-queue lifecycle transitions, the Connect handshake outcome, and the per-IO completion events visible on first failure — and to confirm the DOCA Core progress engine is being progressed perCAPABILITIES.md ## Observability.
For the runtime version + LD_LIBRARY_PATH cross-checks that
underlie "the program built but does nothing", see
doca-version TASKS.md ## run (doca-version/TASKS.md#run).
test
Goal: prove the configured STA context can actually establish an NVMe-oF connection and move one admin command and one I/O end-to-end on the user's hardware, before the user opens the target to production traffic from remote initiators.
This is a loop, not a one-shot pass. Each iteration narrows either the capability set, the substrate / steering preconditions, the queue-pair sizing, or the target object model. The loop terminates when either (a) a single admin command (e.g. Identify Controller) on the admin queue plus a single Read I/O on one I/O queue both complete successfully, or (b) the agent has narrowed the failure cause to a layer outside STA itself (substrate library, steering, fabric, remote initiator, driver / firmware) and escalated to the matching skill.
Iteration shape:
Capability re-check. Re-run
doca_sta_cap_is_supportedagainst the activedoca_devinfo, and re-run the matchingdoca_sta_get_max_*query for each sizing value the user requested. If the device is unsupported (or a getter returns a smaller bound than the user's request) that is the answer — the user's device or DOCA version does not support the request. PerCAPABILITIES.md ## Capabilities and modes, do NOT escalate further until the cap-query baseline is re-established.Substrate and steering re-check. Walk the precondition matrix in
CAPABILITIES.md ## Safety policyonce more: substrate library (the RDMA substrate), device access (group / sudo), DOCA Flow rule in place for the NVMe-oF 5-tuple. The vast majority of "the initiator's Connect handshake never completes" failures are here, not in the STA code.Single-IO smoke — admin command FIRST, then one I/O. Per the smoke-before-scale-up rule in
CAPABILITIES.md ## Safety policy, drive ONE NVMe admin command (typically Identify Controller) on the admin queue and confirm the completion event arrives on the DOCA Core PE with success; THEN drive ONE NVMe Read on a single I/O queue and confirm its completion arrives. Read is the default smoke because it does not overwrite namespace data. Use Write instead only after the user explicitly confirms that the namespace is disposable and supplies a safe test LBA or LBA range whose existing data may be overwritten; without both confirmations, do not issue a Write and do not invent an LBA. Failure on admin narrows to handshake / fabric / steering; failure on I/O after admin succeeded narrows to I/O-queue sizing / mmap / SPDK or kernel-nvme glue. Both together give a much cleaner bisection than starting at production scale.Multi-queue smoke. Once the single-IO smoke is green, add a second I/O queue on the same connection, repeat one Read on each, and confirm both completions arrive. Catches per-queue bugs that a single-queue smoke cannot (queue-count cap miscount, per-queue progress not wired, queue-pair state machine confused about which queue is which). A Write remains gated on the same explicit disposable- namespace and user-supplied safe-LBA confirmation from step 3.
Negative test — capability mismatch. Intentionally request an over-cap queue depth or queue count, or a logical block size, that the
doca_sta_get_max_*/doca_sta_is_logical_block_size_supportedchecks in step 1 reject, and confirm the reportedDOCA_ERROR_NOT_SUPPORTED(orDOCA_ERROR_INVALID_VALUEfor an over-cap value) matches the queried answer. Validates the agent's capability discovery is itself correct. Run this intentional invalid-configuration test only on an isolated, non-production target context with a disposable test namespace; never run it against an active workload or production namespace.Sustained-run loop (optional, only after the smoke is green). Drive a small steady-state workload through the established connection for minutes — not seconds — and confirm: no spurious
DOCA_ERROR_IO_FAILED(transport is stable); noDOCA_ERROR_AGAINstorm (in-flight budget is appropriately sized for the steady rate); per-queue completions continue to arrive. Catches sizing-envelope bugs that a short smoke cannot.
Eval-loop overlay — why this is a loop, not a one-shot pass:
| Iteration trigger | What it looks like | What changes next iteration |
|---|---|---|
| Connect handshake never completes | doca_ctx_start() returns success but the per-queue state never transitions past CREATED, OR the remote initiator reports the NVMe-oF Connect timed out | Re-walk the substrate + steering precondition matrix in CAPABILITIES.md ## Safety policy BEFORE re-checking STA code — this is almost never a STA bug |
DOCA_ERROR_NOT_SUPPORTED at start | The chosen device does not pass doca_sta_cap_is_supported, or a sizing value exceeds the reported doca_sta_get_max_* bound | Re-run doca_sta_cap_is_supported and the matching doca_sta_get_max_* query against the active doca_devinfo; pick a supported device OR lower the sizing value below the reported maximum |
Single I/O fails with DOCA_ERROR_IO_FAILED after admin command succeeded | The admin queue worked but the I/O queue path is broken — transport-layer error, peer-side controller reset, or the substrate (e.g. RDMA queue-pair) hit a fault | Capture `dmesg |
DOCA_ERROR_AGAIN on submit during the sustained-run loop | The per-queue in-flight budget is full | This is the cross-library "would-block, retry after progress" pattern — drain completions via doca_pe_progress() before re-submitting, or raise the queue depth / in-flight budget within the device cap per CAPABILITIES.md ## Capabilities and modes |
| Same code passes on host A, fails on host B | Different DOCA version, different substrate version, or different device cap surface | Re-run the version chain per doca-version TASKS.md ## test (doca-version/TASKS.md#test) four-way match on host B; re-run the STA cap queries on host B against the active doca_devinfo; re-walk the substrate-library version-match rule in CAPABILITIES.md ## Version compatibility |
Loop termination: stop iterating once two consecutive
iterations of the same kind do not change the picture — that
means the cause is below STA (substrate, steering, fabric,
NVMe stack on top, driver / firmware). Escalate to
doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug)
with the captured STA-layer trace, the cap-query baseline,
and the substrate-side trace as evidence.
debug
Goal: when a doca_sta_* call (or the per-queue / per-IO
event stream on the progress engine) returns a DOCA_ERROR_*
or does not behave as expected, narrow the cause to a single
layer before recommending any code change.
The cross-library debug ladder lives in
doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug).
Walk through it in order — install → version → build → link →
runtime → program → driver — before recommending STA-specific
fixes. This skill's overlay names the STA-specific
manifestation at layers 5 (runtime), 6 (program), and 7
(driver / substrate):
Layer 5 (runtime) — STA overlay.
DOCA_ERROR_BAD_STATEon the first STA call after start is almost always a lifecycle violation on the per-connection queue-pair state machine: an I/O was submitted before the queue-pair transitioned to CONNECTED, or the context was reconfigured after start. Walk the universal lifecycle indoca-programming-guide CAPABILITIES.md ## Capabilities and modes(doca-programming-guide/CAPABILITIES.md#capabilities-and-modes) AND the per-queue state-transition note inCAPABILITIES.md ## Observabilitybefore recommending any code change.DOCA_ERROR_AGAINon I/O submit is the in-flight budget full. This is not a hardware error — drivedoca_pe_progress()to drain completions, or raise the per-queue in-flight budget within the device cap perCAPABILITIES.md ## Capabilities and modes. Do not recommend a retry loop without the progress call."The Connect handshake never completes" is rarely an STA bug. Per the safety policy in
CAPABILITIES.md ## Safety policy, walk the precondition matrix (substrate library present, device access, steering rule in place) BEFORE any code change. The most common cause is a missing or wrong DOCA Flow rule for the NVMe-oF 5-tuple, owned bydoca-flow TASKS.md ## debug(doca-flow/TASKS.md#debug).
Layer 6 (program) — STA overlay.
Lifecycle order: configure → start → per-queue CONNECTED callback → use → stop → destroy. Out-of-order returns
DOCA_ERROR_BAD_STATEperCAPABILITIES.md ## Error taxonomy. The most common case is submitting an I/O before the queue-pair reports CONNECTED — surface the transition-event hookup before any other diagnosis.Cap-query miss:
DOCA_ERROR_NOT_SUPPORTEDorDOCA_ERROR_INVALID_VALUEat configure / start is almost always a value (queue depth, queue count, logical block size) that thedoca_sta_get_max_*/doca_sta_is_logical_block_size_supportedchecks would have rejected, or a device that does not passdoca_sta_cap_is_supported. Re-read the value, lower it, and re-run configure perCAPABILITIES.md ## Error taxonomy.Initiator-boundary confusion: the agent must NOT propose an initiator-side fix inside this skill. Per
CAPABILITIES.md ## Capabilities and modes, the remote initiator / host NVMe stack (SPDKbdev_nvme, kernelnvmehost) drives the initiator side — if the failure is at that layer, route the user to the upstream project's own debug guide and do not invent adoca_sta_*call to substitute.
Layer 7 (driver / substrate) — STA overlay.
DOCA_ERROR_IO_FAILEDon a per-IO completion is a transport-layer error: link drop, RDMA peer disconnect, firmware fault, or peer-side controller reset. Capturedmesg | tailandmlxconfig -d <pcie> qperdoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug) layer 5 (driver); for the NVMe-over-RDMA path overlay the substrate-side error taxonomy indoca-rdma CAPABILITIES.md ## Error taxonomy(doca-rdma/CAPABILITIES.md#error-taxonomy). Do NOT retry blindly in the STA code.DOCA_ERROR_DRIVERfrom any STA call is the layer below DOCA reporting failure. Capturepkg-config --modversion doca-sta,pkg-config --modversion doca-rdma(if applicable), anddoca_caps --version; cross-check the version triple perCAPABILITIES.md ## Version compatibility; route todoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug) layer 5 (driver). A version-skew between STA and the substrate is the canonical partial-install hazard here.DOCA_ERROR_NOT_PERMITTEDon thedoca_devopen or thedoca_stacontext create is access-side, not code-side. Confirm sudo or the appropriate group membership perCAPABILITIES.md ## Safety policy; the fix lives indoca-setup TASKS.md ## configure(doca-setup/TASKS.md#configure), not in adoca_sta_*call.
Once the layer is identified, route to the matching debug
verb on the matching skill: install / build / link / driver
to doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug);
version to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug);
cross-cutting runtime to
doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug);
program-layer Core-context patterns to
doca-programming-guide TASKS.md ## debug (doca-programming-guide/TASKS.md#debug);
substrate (RDMA) to
doca-rdma TASKS.md ## debug (doca-rdma/TASKS.md#debug);
steering to
doca-flow TASKS.md ## debug (doca-flow/TASKS.md#debug).
Deferred task verbs
The following verbs are out of scope for this skill but are commonly asked in the same conversations. Route them as follows so the agent does not invent guidance:
install. Installing DOCA, choosing packages, post-install verification,
pkg-configwiring — defer todoca-setup/SKILL.mdand to the install-tree layout indoca-public-knowledge-map ## Layout of an installed DOCA package(doca-public-knowledge-map/SKILL.md#layout-of-an-installed-doca-package). This skill assumes DOCA is already installed.deploy. Deploying NVMe-oF-using applications at scale across many hosts / DPUs, multi-tenant subsystem fan-out, Kubernetes operator workflows for NVMe-oF workloads — out of scope for this skill. For single-host first-run testing, the right verb in this skill is
## run; do not invent a "deploy" workflow.Initiator / host NVMe stack work. The remote initiator's NVMe host stack — SPDK
bdev_nvme, the kernelnvmehost, or any other NVMe-oF initiator — is a separate peer with its own integration patterns. PerSKILL.md, doca-sta is target-side acceleration, not an initiator transport provider, and this skill does not ship initiator glue. Route the user to the upstream project's own integration documentation reachable viadoca-public-knowledge-map/SKILL.md.Initiator-side NVMe host semantics. Host-side controller configuration, host block-layer semantics, and host multipath policy are owned by the remote initiator's NVMe stack, not by doca-sta. (Target-side namespaces and backends are doca-sta's job — see
## configurestep 3.) Surface the boundary perCAPABILITIES.md ## Capabilities and modesand route initiator-side questions to the upstream project.firmware burn / BFB re-image. STA depends on the underlying ConnectX firmware and BlueField BFB; if the debug ladder lands on a driver-layer issue, the fix is via
mlxconfig/mlxfwreset/ re-imaging the BFB, all of which belong to the env-side skill rather than this one. Route todoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug) layer 5.
Command appendix
Every command below is cross-cutting on DOCA STA — it answers a recurring class of question that comes up in the verbs above. The agent should treat the class as load-bearing; the worked example is a single instance. Run-as user is the unprivileged user unless noted. Rows that need elevated privileges call that out explicitly.
Infra-aware preamble (every row below). Per the bundle's
detect → prefer → fall back → report contract documented in
doca-structured-tools-contract ## The agent behavior contract (doca-structured-tools-contract/SKILL.md#the-agent-behavior-contract),
the agent should:
Probe for the matching structured helper FIRST (
doca-env --jsonfor version + devices + libraries + drivers + hugepages in one shot;doca-capability-snapshotfor per-device capability flags;version-matrix.jsonfor "available since" lookups).If the probe succeeds, the structured tool's output is the authoritative answer and the agent SHOULD NOT also run the manual command in the row below. Report "using structured
<tool>".If the probe fails, fall back to the manual command in the row. Report "falling back to manual chain".
The schemas the structured tools emit are defined in
doca-structured-tools-contract ## Schemas(doca-structured-tools-contract/SKILL.md#schemas); the version-handling semantics (four-way match, NGC, headers-win) are owned bydoca-version/SKILL.md.
| Command (worked example) | Owning step | Class of question it answers | What healthy output looks like |
|---|---|---|---|
pkg-config --modversion doca-sta | ## configure step 1; ## build version-anchor slot | What is the build-time DOCA STA version? | A semver string matching doca_caps --version. Disagreement = partial install (route to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) layer 2) |
pkg-config --modversion doca-rdma | ## configure step 1 (NVMe-over-RDMA path); ## build version-anchor slot | What is the build-time DOCA RDMA substrate version, and does it agree with doca-sta? | A semver string matching pkg-config --modversion doca-sta and doca_caps --version. Disagreement = substrate-vs-STA partial-install hazard per CAPABILITIES.md ## Version compatibility |
pkg-config --cflags --libs doca-sta doca-rdma | ## build | What include + link flags does the linker need for the STA surface plus the RDMA substrate? | Trust whatever pkg-config --cflags --libs produces on this install. Do not hardcode either the -I include path or the -l<name> flag form — both can drift between DOCA install profiles and DOCA majors; the on-disk .so basenames use underscores, while the .pc package names use hyphens, and pkg-config is the only thing that resolves both correctly. Hand-crafted -l lines silently break when DOCA upgrades. |
ls /opt/mellanox/doca/samples/doca_sta/ 2>/dev/null | ## modify slot 1 | Does this install ship STA samples? | Expect no such directory — DOCA STA ships no public samples. Build from the public headers (next row) instead; do NOT fabricate a sample path |
doca_caps --list-devs | ## configure step 2 | Which devices on this host can be used as a doca_dev for STA, and what do they advertise? | One row per visible device with PCIe address and capability flags; cross-check against doca_sta_cap_is_supported for the per-device STA support |
ls "$(pkg-config --variable=includedir doca-common)/doca_sta*.h" | ## configure step 2; ## modify slot 1 | Which doca_sta_* cap-check, sizing, and setter symbols does this install actually expose? | One or more header files; grep inside for the doca_sta_cap_is_supported, doca_sta_get_max_*, and doca_sta_set_* declarations rather than quoting symbols from memory per CAPABILITIES.md ## Capabilities and modes |
DOCA_LOG_LEVEL=trace ./<binary> | ## run step 5 | What did the structured DOCA logger emit for the first failing STA call? | Trace-level lines on every STA-layer lifecycle transition, the Connect handshake outcome, every per-IO completion. Silence after doca_ctx_start() on the doca_sta = either PE not progressed OR the steering rule is missing — reach for the substrate / steering trace next |
dmesg | tail -n 40 (sudo) | ## debug layer 7 | What did the kernel / driver log around the last STA / substrate call? | Empty or recent benign messages. Repeated mlx5 / IB errors → driver-layer bug; route to doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug). Repeated NVMe-oF reset / disconnect lines → peer-side fault, NOT a doca-sta bug |
ibv_devinfo (sudo, NVMe-over-RDMA path only) | ## configure step 1; ## debug layer 7 | What does the underlying libibverbs see for this device on the RDMA substrate side? | One device row with state: PORT_ACTIVE and a sane MTU; absence indicates the RDMA substrate is not actually up regardless of what doca-sta reports |
For commands shared across libraries (pkg-config --modversion,
doca_caps, cat /opt/mellanox/doca/applications/VERSION,
DOCA_LOG_LEVEL) the cross-library overlay is in
doca-debug TASKS.md ## Command appendix (doca-debug/TASKS.md#command-appendix);
this table adds the STA-specific rows on top. The substrate-
library commands (RDMA-side cap queries, ibv_devinfo,
RDMA-side trace) live in
doca-rdma TASKS.md ## Command appendix (doca-rdma/TASKS.md#command-appendix)
and are referenced from there, not duplicated here.
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 installed at /opt/mellanox/doca on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) with a BlueField DPU or ConnectX NIC attached. Reads the user's local install via `pkg-config doca-sta` (and `pkg-config doca-rdma` for the NVMe-over-RDMA transport) and inspects /opt/mellanox/doca/{lib,include,samples,applications}. 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-sta · 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-sta.zip