Doca Verbs
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
The doca-verbs skill serves as an escape hatch for developers who need direct control over RDMA and Ethernet queue objects that are not exposed by higher-level DOCA libraries like doca-rdma, doca-eth, or doca-rmax. It enables the use of specific verbs, opcodes, WR flags, and esoteric QP attributes while maintaining integration with the DOCA Core context and progress engine. This skill is intended for advanced users porting existing libibverbs code or requiring fine-grained hardware object manipulation, and it enforces strict boundaries to prevent unnecessary use of raw verbs when higher-level abstractions suffice.
What it does
- Provides direct access to QP, CQ, PD, SRQ, and address-handle objects via doca_verbs_context.
- Facilitates porting of libibverbs code into the DOCA Core model.
- Exposes raw WR flags, opcodes, and QP attributes not available in high-level DOCA APIs.
- Supports congestion-control group attachment and custom CQ handling.
- Integrates raw verbs objects with the DOCA progress engine for completion management.
- Provides diagnostic guidance for IO_FAILED errors based on completion-queue entry inspection.
When to use it
- When a specific verb, opcode, WR flag, or QP attribute is required but not exposed by higher-level DOCA libraries.
- When porting legacy libibverbs applications to the DOCA Core framework.
- When custom completion-queue handling or explicit SRQ control is necessary.
- When attaching to congestion-control groups or performing advanced address-handle tuning.
- When diagnosing errors in raw-verbs operations that require inspecting completion-queue entries.
Advantages
- Enables fine-grained hardware control while remaining within the DOCA Core ecosystem.
- Allows for the migration of complex libibverbs logic into modern DOCA-based applications.
- Provides a structured path for advanced tuning of RDMA and Ethernet queueing.
- Maintains consistency with DOCA's progress engine and lifecycle management.
- Offers a clear decision framework to prevent the misuse of low-level APIs.
Usage examples
- “I need to set a specific path MTU on my QP, but doca-rdma doesn't expose it. Can I use doca-verbs?”
- The agent confirms if the attribute is available in the doca_verbs_qp_modify surface and guides the user through the integration with doca_verbs_context.
- “How do I port my existing libibverbs code to DOCA?”
- The agent provides the porting path, emphasizing replacing ibv_* handles with doca_verbs_* handles and integrating with the DOCA progress engine.
- “I am getting DOCA_ERROR_IO_FAILED on a work request submit. How do I debug this?”
- The agent instructs the user to inspect the completion-queue entry's error field rather than the submit return value to identify the root cause.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/doca-verbs/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-verbs.zip -d .agents/skills
Documentation by NVIDIA
DOCA Verbs
Examples
"Should I use doca-verbs or doca-rdma?" — ordinary RDMA data movement with no raw QP / CQ / WR / SRQ / Address-Handle attribute named is out of scope — route to
doca-rdma/SKILL.md."I need a raw QP attribute the task API does not expose." — stay here. Use only the installed
doca_verbs.hsurface.
Instructions
Follow ## Loading order. Open only the companion
that matches the question.
STOP — most RDMA tasks do NOT belong here
If the task is general RDMA data movement (send / receive / read /
write / atomic between endpoints) and the user did not name a raw
QP / CQ / work-request / SRQ / Address-Handle attribute the
higher-level API cannot express, this skill is out of scope —
route to doca-rdma/SKILL.md and stop after
explaining the boundary. Unless doca-rdma guidance is loaded, do not
infer its implementation APIs; conceptual terms (QP, CQ, connection,
send, receive) are not implementation API names.
Loading this skill is never a license to hand-roll libibverbs /
librdmacm. A general-RDMA deliverable whose ldd shows no
libdoca_rdma is a failed task — the same rule
doca-rdma/SKILL.md enforces. Raw doca_verbs_* is in
scope only for the narrow attribute-level needs below; everything else
climbs back up.
Where to start: This skill is the raw-verbs escape hatch beneath
the higher-level DOCA libraries (doca-rdma/SKILL.md,
doca-eth/SKILL.md, doca-rmax/SKILL.md).
The agent's first job is to confirm the user actually needs to drop
down — most users do not; the right answer is almost always "stay in
the higher-level library". Open CAPABILITIES.md
for what the verbs surface exposes and the libibverbs boundary; open
TASKS.md once raw verbs is confirmed. If DOCA is not
installed, route to doca-setup/SKILL.md first.
Non-negotiable answer checklist
For every in-scope porting, lifecycle, or debugging answer, do not declare it complete until it explicitly states all applicable items below:
doca_verbs_contextis the DOCA Core context owning the verbs surface; it wraps thedoca_dev, integrates with the progress engine, and owns the per-object PD / MR / CQ / QP lifecycle inCAPABILITIES.md ## Capabilities and modes.A submit-time success followed by
DOCA_ERROR_IO_FAILEDis diagnosed from the completion-queue entry's error field — not the submit return — before recommending retries or code changes.The answer selects exactly one completion path: progress engine, manual CQ polling, or completion-channel delivery.
Both version axes are stated before any symbol is promised:
pkg-config --modversion doca-verbsmust agree withdoca_caps --versionandpkg-config --modversion doca-common; and thedoca_verbs_*ABI ships in the EXPERIMENTAL tier — symbols may rename or graduate between releases and the installed headers outrank documentation (doca-version/SKILL.md). Device support for a verb is answered by thedoca_devinfocapability query, not by either version.Existing
ibv_*handles are replaced, never mixed withdoca_verbs_*handles on the same hardware objects.
The decision this skill exists to gate
The decision every conversation loading this skill must make FIRST, before any code-level discussion:
Has the user confirmed that the matching higher-level DOCA library does not expose the semantic they need? If no — route back:
doca-rdma/SKILL.mdfor general RDMA,doca-eth/SKILL.mdfor Ethernet TX / RX,doca-rmax/SKILL.mdfor timing-precise media. The most common failure is recommending raw verbs unnecessarily because the user said "verbs" or "QP" without confirming the higher-level surface already covers the case.Is the needed semantic a specific verb / opcode / WR flag / QP attribute / SRQ option the higher-level library does not expose? Examples: a raw WR flag
doca_rdma_task_*does not surface; custom CQ handling beyond the progress engine; an esoteric QP attribute (path MTU, PSN, ECE); explicit SRQ control; congestion-control group (doca_verbs_cc_group_*) attachment; Address-Handle tuning (DGID / DLID / SL / SGID index / hop limit / traffic class / UDP source port). If yes — in scope.Is the user porting existing libibverbs code into the DOCA Core model? In scope, AND the agent must teach the porting path (replace
ibv_*handles withdoca_verbs_*handles, integrate viadoca_verbs_context_create, drive completions via the DOCA progress engine instead of polling the CQ) — not a mechanical 1:1 replacement.
If none of (1)-(3) apply, the answer to "should I use doca-verbs?"
is no — route back to the matching higher-level library. A raw-verbs
skill that talks the user out of raw verbs is doing its job.
Audience
This skill serves external developers building applications that
consume the DOCA Verbs library — code calling doca_verbs_*
(directly in C/C++, or via FFI/bindings) for raw QP / CQ / PD / MR /
SRQ / Address-Handle / Ethernet-SQ / Ethernet-RQ control inside a
DOCA Core context. It is not for NVIDIA developers contributing to
DOCA Verbs, and not the entry point for general DOCA RDMA / Eth /
RMAX work — that belongs in the matching higher-level library skill.
Language scope
DOCA Verbs ships as a C library (pkg-config module doca-verbs);
public headers live under the installed DOCA tree
($(pkg-config --variable=includedir doca-common)/doca_verbs.h plus
the doca_verbs_*.h family) and, per the headers-win-over-docs rule
in doca-version/SKILL.md, are the
authoritative symbol surface. C / C++ is the canonical case TASKS.md
assumes; other languages reach the same *.so through FFI, and the
skill keeps its rules language-neutral while routing to the public C
ABI as the authoritative surface.
When to load this skill
Load this skill ONLY after the user has confirmed the matching higher-level DOCA library does not expose the needed semantic. Concretely:
The user asks "do I need to drop to
doca-verbsfor this?" — load to answer, but expect "no, stay in the higher-level library" unless the user can name the verb / opcode / option the higher-level library does not surface.The user wants a specific raw WR flag, QP option, SRQ feature, custom CQ-handling pattern, or congestion-control group attachment the higher-level library does not expose.
The user is porting libibverbs code into the DOCA Core model and needs the integration path (lifecycle, progress engine, no-mixing).
A
DOCA_ERROR_*from adoca_verbs_*call needs diagnosis — including IO_FAILED, where the answer lives on the completion-queue entry, not the submit return.Designing non-C bindings wrapping the verbs C ABI that must honor the boundary, lifecycle, and cap-query rules.
Do not load for: general RDMA (doca-rdma/SKILL.md);
Ethernet queueing (doca-eth/SKILL.md); timing-precise
media (doca-rmax/SKILL.md); cases another
higher-level library covers (doca-flow/SKILL.md for
steering, doca-sta/SKILL.md for NVMe-oF target acceleration); DOCA install
(doca-setup/SKILL.md); or general orientation —
all routed via
doca-public-knowledge-map/SKILL.md.
What this skill provides
This is a thin loader. The substantive raw-verbs material lives in two companion files:
CAPABILITIES.md— whatdoca-verbscan express on this version: the higher-level-vs-verbs selection table, the libibverbs boundary, the verbs object model (doca_verbs_context+ QP / CQ / PD / MR / SRQ / Address-Handle / Completion-Channel / Ethernet-SQ / Ethernet-RQ / CC-group), the capability-query surface (doca_verbs_query_device+doca_verbs_device_attr_get_*), the error taxonomy (mapped ontoDOCA_ERROR_*with the IO_FAILED → completion-entry overlay), the observability surface (progress engine vs manual CQ polling vs comp-channel delivery), and the safety policy gating the no-mixing-with-libibverbs rule.TASKS.md— workflows for the six in-scope verbs:configure,build,modify,run,test,debug, plus aDeferred task verbsblock. Every workflow assumes the drop-down decision above was made;## configurere-confirms it.
The skill assumes DOCA is installed and the user has the privileges
their install profile expects (RDMA stack on host, same as
doca-rdma/SKILL.md). It does not cover installing
DOCA — route to doca-setup/SKILL.md.
What this skill deliberately does not ship
This skill is agent guidance, not a samples or templates bundle. It deliberately does not contain — and pull requests should not add:
Pre-written DOCA Verbs application source code, in any language. The verified verbs source is the shipped C samples on the install (via
ls /opt/mellanox/doca/samples/); the agent routes there and prescribes a minimum-diff modification via the modify-a-sample workflow indoca-programming-guide/SKILL.md, layered with the verbs overrides inTASKS.md ## modify.Standalone build manifests (
meson.build,CMakeLists.txt,Cargo.toml, …) parked inside the skill. The agent constructs the manifest in the user's project against the installed DOCA, wherepkg-config --modversion doca-verbsis the source of truth.A
samples/,bindings/, orreference/subtree of any kind. A mock artifact labeled "reference" reads as buildable and misleads.A migration script from libibverbs to
doca-verbs. Porting is judgment, not mechanical replacement — seeTASKS.md ## modify.
Loading order
Confirm the question is in scope by walking the drop-down decision above.
For the higher-level-vs-verbs split, the libibverbs boundary, the object model, capability discovery, error taxonomy, observability, and safety policy, see CAPABILITIES.md.
For step-by-step workflows — configure, build, modify, run, test, debug — see TASKS.md.
Both companion files cross-link to each other, to the higher-level
libraries (doca-rdma/SKILL.md,
doca-eth/SKILL.md,
doca-rmax/SKILL.md) as climb-back homes, to
doca-common/SKILL.md for the doca_dev /
doca_pe / doca_ctx foundation primitives, to
doca-version/SKILL.md for canonical version
rules, and to
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public docs or the
install layout".
Related skills
When a step below routes to another skill that is not already loaded, read that skill first; if unavailable, stop and name it and the layer it covers — do not continue that layer from memory.
doca-rdma/SKILL.md— the canonical higher-level RDMA library and the home this skill routes most RDMA users back to. Any conversation loadingdoca-verbsfor an RDMA question should also loaddoca-rdmaso the climb-back answer is immediate.doca-eth/SKILL.md— the higher-level Ethernet queue library.doca-verbsalso exposes Ethernet SQ / RQ verbs (doca_verbs_eth_sq_*,doca_verbs_eth_rq_*); once the user confirmsdoca-ethlacks the needed option (TS-source-type tuning, plane-index pinning, multi-pkt-send-WQE), this skill takes over.doca-rmax/SKILL.md— the higher-level Rivermax library for timing-precise media. Most Rivermax cases stay there; raw verbs is the escape hatch for the rare case needing a verb Rivermax does not expose.doca-common/SKILL.md— the foundation every DOCA context (includingdoca_verbs_context) rests on:doca_dev/doca_pe/doca_ctx, thedoca_devinfocap-query rule, and the lifecycle. This skill layers verbs specifics on top.doca-public-knowledge-map/SKILL.md— the routing table for public DOCA docs and the install layout; the DOCA Verbs public guide is listed there.doca-setup/SKILL.md— env preparation, install verification, and the no install yet path via the NGC DOCA container. This skill assumes its preconditions hold.doca-version/SKILL.md— canonical DOCA version-handling rules.## Version compatibilitycross-links the four-way match rule (withdoca-verbs.pcjoining the match set) and the cap-query-is-runtime-authority rule.doca-structured-tools-contract/SKILL.md— the bundle's structured-tools precedence rule (detect / prefer / fall back / report). The Command appendix in TASKS.md honors it.doca-programming-guide/SKILL.md— general DOCA programming patterns shared by every library:pkg-config+ meson build, modify-a-shipped-sample first-app, the universal lifecycle, theDOCA_ERROR_*taxonomy, and the debug order. This skill layers raw-verbs specifics on top.doca-debug/SKILL.md— the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). Raw-verbs debug (completion-entry inspection, no-mixing-with-libibverbs, lifecycle in verbs terms) overlays on top.doca-hardware-safety/SKILL.md— the cross-cutting hardware-safety meta-policy this skill's## Safety policyoverlays.
Files
- ATTRIBUTION.mdAdded by AutoGineer888 B
- BENCHMARK.md9.8 KiB
- CAPABILITIES.md30.7 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md14.4 KiB
- SKILLCARD.yaml2.6 KiB
- TASKS.md30.1 KiB
- evals/evals.json2.6 KiB
- references/command-appendix.md6.0 KiB
- references/deferred-topics.md2.0 KiB
- references/deferred-verbs.md1.9 KiB
- references/install.md1.8 KiB
- references/pattern-overview.md3.4 KiB
- references/use.md6.0 KiB
- skill-card.md5.7 KiB
- skill.oms.sig6.5 KiB
TASKS.md
DOCA Verbs workflows
Where to start: The verbs run configure → build → modify → run → test → debug. EVERY workflow below begins by re-confirming the
drop-down decision in SKILL.md — if the matching
higher-level DOCA library (doca-rdma/SKILL.md /
doca-eth/SKILL.md /
doca-rmax/SKILL.md) covers the user's case, the
right answer is to stop and climb back up, not to walk these verbs.
The ## test verb is an iterative loop (smoke → narrow → loop back
if the WR-flag set, QP feature set, or completion path changed),
not a one-shot pass.
Read this file when the loader sent you here from
SKILL.md. For the higher-level-library-vs-doca-verbs
split, the libibverbs-vs-doca-verbs boundary, the verbs object
model, capability discovery, error taxonomy, observability, and
safety policy that these workflows assume, see
CAPABILITIES.md. For the foundation primitives
(doca_dev, doca_pe, doca_ctx, doca_mmap, doca_buf,
doca_log) every verbs context rests on, see
doca-common/SKILL.md. For the cross-library
DOCA patterns layered under everything below (the universal
lifecycle, the cross-library DOCA_ERROR_* taxonomy, the
modify-a-shipped-sample workflow), see
doca-programming-guide/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.
install
DOCA 3.5 field notes
Known behaviours on DOCA 3.5 with BlueField-3; check them before debugging further:
Async events block.
doca_verbs_get_async_event()blocks until an event is pending; the header says it is a blocking function even though the guide calls async events non-blocking notifications. Poll the context's async-event handle (doca_verbs_get_async_event_handle()) withpoll()/epollfirst, then calldoca_verbs_get_async_event()only when it is readable, and acknowledge every event withdoca_verbs_ack_async_event().Multi-Rail on BlueField-3. The 3.5 Multi-Rail app fails with default settings:
EWMA (measured-BW) LB mode is supported only on Spectrum-X devices, anddoca_verbs_multi_rail_update_qpreturnsDOCA_ERROR_NOT_SUPPORTED. Uselb_mode: port_speed(listed in the app's--help). No dedicated application guide is published; treat--helpas the reference.Multi-Rail build is skipped without json-c. meson prints `Skipping compilation of DOCA Application - verbs_multi_rail_server_client
Missing json-c support
; installlibjson-c-dev(not pulled in bydoca-all`) and rebuild.
DOCA 3.5 API changes. Use the new RCX type setter (
doca_verbs_qp_init_attr_set_rcx_type()) when initializing QP attributes. The DOCA Verbs header now defines new constant families:DOCA_VERBS_CQ_ST_*,DOCA_VERBS_MULTI_RAIL_LB_MODE_*,DOCA_VERBS_MULTI_RAIL_PROBE_*,DOCA_VERBS_MULTI_RAIL_QP_OP_*,DOCA_VERBS_MULTI_RAIL_UPDATE_*, andDOCA_VERBS_QP_ORDERING_SEMANTIC_*. Use these families; see the DOCA Verbs header.
configure
Goal: bring up a doca-verbs context on a host or BlueField, with
a QP / CQ / PD / MR / SRQ / AH set the user has explicitly chosen,
after confirming the drop-down decision is correct.
Steps the agent should walk the user through:
Re-confirm drop-down. Ask: "have you confirmed the matching higher-level DOCA library (
doca-rdma/SKILL.mdfor RDMA work,doca-eth/SKILL.mdfor Ethernet queues,doca-rmax/SKILL.mdfor timing-precise media) does not expose the verb / opcode / WR flag / QP attribute / SRQ option / CC-group hint / Ethernet-queue option you need?" If no — stop, route back. If yes — ask the user to name the specific thing the higher-level surface does not cover; that name is the load-bearing input for steps 4 and 5. This step is the cheapest place to catch the "recommended raw verbs unnecessarily" failure mode.Version and ABI evidence before feature advice. Name and follow
doca-version TASKS.md ## configure(doca-version/TASKS.md#configure). Requestpkg-config --modversion doca-verbs,pkg-config --modversion doca-common, anddoca_caps --versionfrom the target install; compare them using that version-coherence procedure before promising a feature. Missing or mismatched evidence means stop and diagnose the install, not guess a version. Also state thatdoca_verbs_*is experimental on the documented release: signatures and availability can change between releases.Read the symbols from that same install. Discover the headers with
pkg-config --variable=includedir doca-common, and list/opt/mellanox/doca/samples/for the shipped examples. The installed headers and ABI declarations win over prose; never extrapolate an experimental symbol into another release. Version agreement is only a prerequisite: the device query in step 5 must still confirm the specific feature on the activedoca_devinfo.Bring up the doca-common foundation FIRST. Walk the universal foundation skeleton in
doca-common TASKS.md ## use(doca-common/TASKS.md#use):doca_devinfo_create_list→ pick devinfo →doca_dev_open→doca_pe_create. Without this foundation in place, the verbs-layer steps below have nothing to attach to.Capability-query the SPECIFIC verb / option the user named in step 1. Call
doca_verbs_query_device(devinfo, &dev_attr)and inspect the matchingdoca_verbs_device_attr_get_*for what the user wants —_get_is_qp_type_supportedfor the QP type;_get_max_qp_wr/_get_max_sge/_get_max_inline_datafor QP sizing;_get_is_ece_supported,_get_is_cc_group_supported,_get_is_cqe_inline_supported,_get_is_ordering_semantic_supported,_get_is_send_dbr_mode_supported,_get_is_dpa_external_datapath_supported,_get_is_gpu_external_datapath_supportedfor the feature flags; the Ethernet-queue family (_get_max_eth_sq_wr_num,_get_max_eth_rq_wr_num,_get_is_eth_sq_ts_source_type_supported,_get_is_eth_rq_ts_source_type_supported,_get_is_eth_rq_srq_supported,_get_is_allow_multi_pkt_send_wqe_supported,_get_is_plane_index_supported) when the user is dropping to doca-verbs for an Ethernet-queue case. If the relevant flag is false (or the max is zero) — that is the answer. The user's device / firmware / DOCA version does not support what they wanted, and dropping to raw verbs cannot manufacture support that the cap-query denies. Climb back up to the matching higher-level library if it covers a viable alternative. Free the handle withdoca_verbs_device_attr_freeafter snapshotting.Sketch the verbs object set BEFORE any code. Which
doca_verbs_context? Whichdoca_verbs_pd? Whichdoca_verbs_qp(s), with which feature set (transport type, QP type, ECE / CC-group / CQE-inline / ordering-semantic choices)? Whichdoca_verbs_cq(s), with which completion-handling path (DOCA progress engine vs manualdoca_verbs_bridge_poll_cqvs comp-channel event delivery — pick one explicitly per CAPABILITIES.md ## Observability)? Whichdoca_verbs_srq(s)? Whichdoca_verbs_ah_attrfor IB or RoCE routing? Which MR(s) covering which memory? If any of those are unclear, stop and ask — do not invent.Configure the verbs context. Walk the universal Core lifecycle (
cfg-create → cfg-set-* → init → start → use → stop → destroy, perdoca-common CAPABILITIES.md ## ctx(doca-common/CAPABILITIES.md#ctx)); apply the verbs-specific setters in the order the headers require. The high-level shape is:doca_verbs_context_create(dev, &ctx)→doca_verbs_pd_create(ctx, &pd)→ if selected,doca_verbs_comp_channel_create(ctx, &chan)anddoca_verbs_cq_attr_set_comp_channelon the CQ attributes → CQ init-attr / create → QP init-attr / create → drive the QP state machine viadoca_verbs_qp_modify(qp, qp_attr)through the transitions the QP type requires (RESET → INIT → RTR → RTS for RC) →doca_pe_connect_ctx(pe, ctx_as_doca_ctx)→doca_ctx_start. This is the order in CAPABILITIES.md and references/use.md; when the shipped sample differs on your release, follow the sample. Per the no-mixing rule in CAPABILITIES.md ## Safety policy, do not pull anyibv_*handle into this context.Sanity check before any WR submission. Confirm with the user: which QP, which CQ it reports to, which MR(s) the WR will reference, which WR opcode + flags. If any of those are unclear, stop and ask — raw verbs amplifies the cost of guessed parameters.
If any step fails with a DOCA_ERROR_*, route through the error
taxonomy in
CAPABILITIES.md ## Error taxonomy
before retrying.
build
Goal: produce a binary that links doca-verbs against the user's
installed DOCA, using the canonical cross-library build pattern.
The build pattern for any DOCA C/C++ consumer is identical
across libraries — pkg-config for include + link flags, meson
or CMake as the build system — and is fully documented in
doca-programming-guide TASKS.md ## build (doca-programming-guide/TASKS.md#build).
This skill carries only the raw-verbs-specific overlay:
| Slot | Value for doca-verbs | Why it matters |
|---|---|---|
pkg-config module name | doca-verbs (NOT doca-rdma; NOT libibverbs; NOT doca-eth even when the workload is Ethernet-side) | The library's .pc file installed by the DOCA host packages. A typo to doca-rdma silently links the wrong library; a fallback to libibverbs puts the user on the wrong side of the boundary in CAPABILITIES.md ## Safety policy |
| Required runtime libs | libdoca_common plus the verbs runtime referenced by pkg-config --libs doca-verbs | The raw-verbs library depends on Core (doca-common); it does NOT auto-pull doca-rdma / doca-eth / doca-rmax, and adding any of them on the link line as a "just in case" hides the drop-down decision the agent and user already made |
| Header check | The verbs headers resolvable under $(pkg-config --variable=includedir doca-common) (doca_verbs.h and the adjacent doca_verbs_*.h family) | If pkg-config --cflags doca-verbs resolves but the include is missing, the install is partial — route to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) |
| Minimum required DOCA version | Query with pkg-config --modversion doca-verbs; never hardcode in build files | Cross-version build/runtime mixing breaks per CAPABILITIES.md ## Version compatibility, and verbs-only upgrades are a documented partial-install pattern. The doca-verbs ABI is on the experimental tier and may shift between releases |
| Coexistence with the higher-level library on the same link line | Allowed only if BOTH libraries are independently used in the same binary; never just in case | Adding doca-rdma (or doca-eth / doca-rmax) to a binary that only uses doca-verbs is a code-smell that suggests the drop-down was not actually needed |
For non-C consumers (Rust, Go, Python), the link surface is the
same *.so files; the FFI wrapper layer is the language-specific
binding and is out of scope for this skill — but the five slots
above are still the load-bearing inputs the wrapper needs.
modify
Goal: take a shipped DOCA Verbs sample as the verified starting point and apply a minimum-diff modification to express the user's intent — OR, for the libibverbs-porting case, walk the integration path step by step (this is the load-bearing case for this skill in particular).
The universal modify-a-shipped-sample workflow lives in
doca-programming-guide TASKS.md ## modify (doca-programming-guide/TASKS.md#modify).
Use it as-is for the modify-a-sample path. The verbs-specific
overlays are the modify-from-sample schema fill AND the
libibverbs-porting block below.
Modify-from-sample schema fill — the five slots the agent must elicit from the user before recommending any code-level edit:
| Slot | What the agent asks the user | Verbs-specific consideration |
|---|---|---|
| 1. Starting sample | Which sample under the installed DOCA samples tree? Run ls /opt/mellanox/doca/samples/ and pick the one whose QP shape (reliable vs unreliable; connected vs unconnected; RDMA-side vs Ethernet-side) most closely matches the user's intent | Pick the closest in QP shape (RC / UC — the only QP types this release defines) and completion-handling path (DOCA PE vs manual CQ poll vs comp-channel event, per CAPABILITIES.md ## Observability). Do NOT bridge across both axes in a single modify pass — a smaller diff is always safer than a re-architecture |
| 2. Verbs / opcodes added or removed | Which WR opcodes? Which QP features (ECE, CC-group, CQE-inline, ordering-semantic, send-DBR-mode)? Which SRQ options? Which AH attributes? Which Ethernet-queue options (TS-source-type, plane-index, multi-pkt-send-WQE, flush-in-error)? | Each added opcode / WR flag / QP attribute / SRQ option / AH attribute / CC-group hint / Ethernet-queue option needs its own doca_verbs_device_attr_get_* query from ## configure step 5 against the active doca_devinfo before any code-level change |
| 3. MR / PD changes | Which MR(s) / PD(s) change? | Refer to the no-mixing rule in CAPABILITIES.md ## Safety policy — if the user is tempted to reuse an ibv_pd / ibv_mr from existing code, the porting block below is the right path |
| 4. Completion-handling change | Switch PE → manual CQ poll → comp-channel, or vice versa? | This is a re-architecture, not a tweak. If yes, recommend the user start from the sample that already uses the target path instead of patching one over |
| 5. QP type / queue sizing | Change QP type (RC / UC) or queue depths? | Same option set as doca-rdma/SKILL.md when relevant; re-run ## configure step 5 — QP-type support is device-conditional even at the verbs level (doca_verbs_device_attr_get_is_qp_type_supported) |
Libibverbs porting block — what the agent walks the user through
when they arrive with existing ibv_* code. This is NOT a
textual replacement; it is an integration into the DOCA Core
model:
Confirm the case really wants
doca-verbs, not the matching higher-level DOCA library. Most libibverbs ports land cleaner on the higher-level surface because the task abstractions cover the case once the user names what they actually do. Re-walk the drop-down decision in SKILL.md before any porting work. A worked instance: a libibverbs codebase that sendsIBV_SEND_INLINEfrom a custom QP attribute likely maps todoca-rdmawith the matchingdoca_rdma_task_send_*abstraction and a per-task inline-data flag; only if that abstraction does NOT expose the inline path does the user need to drop todoca-verbsand set the verbs-side equivalent (doca_verbs_qp_init_attr_set_max_inline_data+ a WR with the inline flag).Replace
ibv_contextownership withdoca_devownership. The device handle the verbs context consumes isdoca_dev, discovered through the standard DOCA Core path (doca_dev_openon adoca_devinfo), not throughibv_open_device. Mixing the two handles on the same hardware resource is the no-mixing rule in CAPABILITIES.md ## Safety policy.Build the verbs context. Call
doca_verbs_context_create(dev, &ctx); create the PD withdoca_verbs_pd_create(ctx, &pd); create the CQ(s) via thedoca_verbs_cq_attr_*+doca_verbs_cq_createfamily; create the QP via thedoca_verbs_qp_init_attr_*+doca_verbs_qp_createfamily; when setting QP init attributes, call the new RCX type setter (doca_verbs_qp_init_attr_set_rcx_type) instead of assigning the field directly, and select ordering semantics from theDOCA_VERBS_QP_ORDERING_SEMANTIC_*family in the DOCA Verbs header; drive the QP state machine to the in-use state withdoca_verbs_qp_modifyusing adoca_verbs_qp_attrbuilt via thedoca_verbs_qp_attr_*setters; build the AH attributes viadoca_verbs_ah_attr_*setters and attach to the QP viadoca_verbs_qp_attr_set_ah_attrfor RoCE or IB QPs.Integrate with the DOCA Core lifecycle. Wrap the verbs object set in a
doca_ctx_*lifecycle perdoca-common TASKS.md ## configure(doca-common/TASKS.md#configure). Calls that lived inibv_*setup move into the verbs-init-attr / qp-attr / ctx-start path; calls that lived in cleanup move into the destroy path (reverse order — destroy the QP before the CQ before the PD before the context).Drive completions through the DOCA progress engine. Replace the libibverbs CQ-polling loop with
doca_pe_progressagainst the verbs context, per CAPABILITIES.md ## Observability. If the user has a documented reason to keep manual CQ polling, the verbs-side equivalent isdoca_verbs_bridge_poll_cq; if the user has a documented reason to use event-driven delivery, the verbs-side equivalent isdoca_verbs_comp_channel_createdoca_verbs_get_cq_event+doca_verbs_ack_cq_events. The agent must make the choice explicit, not let it drift.
Map every
ibv_*error path ontoDOCA_ERROR_*. Per the raw-verbs error overlay in CAPABILITIES.md ## Error taxonomy, including theIO_FAILED → inspect the CQErule.
The agent emits an intent description + the five filled slots (modify-from-sample case) or the six-step porting walk (libibverbs case); the actual unified diff against the sample source is produced by the user (this bundle has no diff renderer). The agent walks the user through the diff line-by-line against the sample source they read on disk, and has the user paste back the result for validation.
run
Goal: actually execute the built binary against the user's installed DOCA on a host or BlueField, including a peer to connect to (for QP-class workloads) or a traffic generator (for Ethernet-queue-class workloads).
Steps the agent should walk the user through:
Confirm the peer / traffic source is reachable. For QP-class workloads, raw verbs needs a peer; the peer's RDMA stack and transport must match what this side asked for (IB / RoCE; QP type RC / UC and feature set per
## configurestep 5). A solo run produces a misleading hang. For Ethernet-queue-class workloads, the traffic generator (host-sidepktgen, a remote sender, the DPU-sidedoca-flowrules feeding the queue) must be set up first.Run the listening side first. Same shape as
doca-rdma TASKS.md ## run(doca-rdma/TASKS.md#run) — the listening side must be in its accept-ready state before the connecting side starts. Raw verbs does not change that ordering.Capture the structured log. Set
DOCA_LOG_LEVEL=trace(or--sdk-log-level DEBUG) for the first run per the two-tier model indoca-common CAPABILITIES.md ## log(doca-common/CAPABILITIES.md#log). This is the cheapest way to make verbs-layer lifecycle transitions visible on first failure.Confirm completions are arriving on the chosen path. A run that submits WRs but produces no CQEs is almost always one of: a missing
doca_pe_progresscall (DOCA PE path), a missingdoca_verbs_bridge_poll_cqcall (manual path), or a missingepoll/doca_verbs_get_cq_eventchain (comp-channel path). Confirm the chosen path from CAPABILITIES.md ## Observability is actually being driven on both sides.
test
Goal: prove the configured raw-verbs context can actually move data correctly between the two sides on the user's hardware, and that the specific verb / opcode / WR flag / QP attribute that justified the drop-down actually fires the way the user expected.
This is a loop, not a one-shot pass. Each iteration narrows
either the cap-query, the QP / WR setup, the completion-handling
path, or the user's no-mixing-with-libibverbs hygiene. The loop
terminates when either (a) the user's intended raw-verbs pattern
flows end-to-end with the expected completions, or (b) the agent
has narrowed the failure cause to a layer outside doca-verbs
itself (driver / firmware / network / the higher-level library
was the right answer all along) and escalated to the matching
skill.
Iteration shape — the smoke-before-scale principle is non-negotiable for raw verbs:
One QP, one WR, one completion. The cheapest possible smoke. Bring up exactly ONE
doca_verbs_qp, post exactly ONE WR (matched on the peer where two-sided), drain exactly ONE completion through the chosen path (CAPABILITIES.md ## Observability). If this fails, do not scale up — narrow.Re-confirm the cap-query passed for THIS device. Re-run
doca_verbs_query_device+ the matchingdoca_verbs_device_attr_get_*for the specific verb / opcode / WR flag / QP attribute against the activedoca_devinfo. If false → that's the answer; the user's device or DOCA version does not support the verb. Update the user's intent, climb back to the matching higher-level library, or update the install. Free the handle withdoca_verbs_device_attr_free.Verify completion-handling path is wired. If the agent picked the DOCA PE path: confirm
doca_pe_progressis in the user's main loop on both sides. If the agent picked the manual CQ poll: confirm thedoca_verbs_bridge_poll_cqloop runs and reads CQEs. If the agent picked the comp-channel path: confirmdoca_verbs_req_notify_cqis called to arm the channel, the OS handle fromdoca_verbs_comp_channel_get_handleisepoll'd, anddoca_verbs_get_cq_event/doca_verbs_ack_cq_eventscomplete the cycle. The most common failure mode here is picked one path in## configurebut the user wrote a different path in the main loop.Inspect the CQE on
DOCA_ERROR_IO_FAILED. Per the raw-verbs error overlay in CAPABILITIES.md ## Error taxonomy, IO_FAILED means the submit succeeded but the completion reports an error. The answer is in the CQE error field; the agent must direct the user there before recommending any code-level change.Confirm the no-mixing-with-libibverbs hygiene. If the user was porting libibverbs code, walk the porting block from
## modifyand confirm no leftoveribv_*call touches an object owned bydoca-verbs. Mixed handles are the highest-cost-to-find raw-verbs bug.
Eval-loop overlay — why this is a loop, not a one-shot pass:
| Iteration trigger | What it looks like | What changes next iteration |
|---|---|---|
DOCA_ERROR_NOT_SUPPORTED on the verb / attribute / option we expected to work | A doca_verbs_device_attr_get_* returned true at configure time, but the runtime rejects the WR or the modify call | Re-run the same doca_verbs_query_device + matching doca_verbs_device_attr_get_* against the active selected doca_devinfo; verify that the queried attribute, selected device, and requested runtime configuration still match. If support is absent, climb back up or update the environment |
DOCA_ERROR_IO_FAILED on the WR | Submit returned DOCA_SUCCESS; completion arrives with error status | Stop reading the submit return; read the CQE error field. The cross-cutting taxonomy ladder in doca-debug ## debug (doca-debug/TASKS.md#debug) takes over from the CQE error |
| Submit succeeded but no completion at all | One of: the PE is not progressed, the doca_verbs_bridge_poll_cq loop is missing, the comp-channel is not armed (doca_verbs_req_notify_cq not called) or its handle is not epoll'd, or the peer disconnected silently | Map to the path picked in CAPABILITIES.md ## Observability; only ONE of PE / manual / comp-channel should be active on this CQ |
Intermittent DOCA_ERROR_BAD_STATE on doca_verbs_qp_modify / WR submit | QP state transitions misordered | Re-walk the verbs object lifecycle from CAPABILITIES.md ## Capabilities and modes; raw verbs exposes the QP state machine directly via doca_verbs_qp_modify + _set_current_state / _set_next_state, and the agent must confirm each transition's precondition |
Same code that worked yesterday now fails with NOT_PERMITTED | RDMA stack module loads / user group / ulimits regressed | Route to doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug); this is an env regression, not a verbs code change |
| The user's case turned out to be covered by the higher-level library after all | The drop-down was unnecessary; the smoke surfaced a higher-level alternative | This is a successful outcome of the loop. Climb back up to doca-rdma/SKILL.md / doca-eth/SKILL.md / doca-rmax/SKILL.md and retire the raw-verbs path |
Loop terms are exact: an iteration's kind is the Iteration trigger row selected above; its prescribed change is that row's
What changes next iteration action; and its evidence is the
cap-query, QP state, submit result, and selected completion-path
capture taken before and after that change. The outcome is
resolved when the named smoke turns green, shape-changed when
the re-run selects a different trigger row or materially changes
that evidence, and unchanged when the prescribed change was
applied but the re-run selects the same trigger row with the same
outcome and materially unchanged evidence. The baseline occurrence
and that post-change re-run are the two consecutive iterations; on
unchanged, stop and escalate to
doca-debug ## debug (doca-debug/TASKS.md#debug) with the
captured layer-1-through-5 evidence.
debug
Goal: when a doca_verbs_* call returns a DOCA_ERROR_* (or the
program doesn't make forward progress), narrow the cause to a
specific layer and act on it.
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
raw-verbs-specific fixes. This skill's overlay names the
raw-verbs-specific manifestation at layers 5 (runtime) and 6
(program):
Layer 5 (runtime) — raw-verbs overlay.
Walk the QP state machine: was the QP transitioned through every state the verbs surface requires before the first WR was posted? Out-of-order transitions return
DOCA_ERROR_BAD_STATE, not a self-describing symptom. Query the current state viadoca_verbs_qp_queryto confirm where the QP actually is.Confirm exactly ONE completion-handling path is active on the CQ — the DOCA progress engine OR
doca_verbs_bridge_poll_cqOR thedoca_verbs_comp_channelchain, never two. Mixed paths drop completions silently.On
DOCA_ERROR_IO_FAILED, the submit return is not the answer. Direct the user to the CQE error field per CAPABILITIES.md ## Error taxonomy.Wire
doca_verbs_get_async_event_handle+doca_verbs_get_async_event+doca_verbs_ack_async_eventinto the run loop if the symptom looks like a device-level event (QP fatal error, port state change) — those will not surface on the data-plane CQ.
Layer 6 (program) — raw-verbs overlay.
No mixing with libibverbs. This is the single highest-frequency raw-verbs program bug. Search the user's code for any
ibv_*call that touches an object owned bydoca-verbs; route to the porting block in## modifywhen found.Lifecycle order: configure → start → use → stop → destroy. Out-of-order returns
DOCA_ERROR_BAD_STATE. The most common case in verbs context is destroying an MR or PD before the QP that referenced it, or destroying thedoca_verbs_contextbefore the per-object handles it owned.Cap-query mismatches: the program's selected device, queried attribute, or requested runtime configuration does not match the device-level capability snapshot. Re-run the query against the active
doca_devinfoper CAPABILITIES.md ## Capabilities and modes cap-query rule.Climb-back-up check. Before exhausting a layer-6 debug session, ask: does the higher-level
doca-rdma/SKILL.md/doca-eth/SKILL.md/doca-rmax/SKILL.mdcover this case? If yes, is the raw-verbs path still required? Sometimes the cheapest fix at layer 6 is to drop the raw-verbs path entirely.Freed-handle hygiene: confirm
doca_verbs_device_attr_freewas called after everydoca_verbs_query_device. A slow leak shows up as memory growth across reconfiguration cycles and is easy to miss in short smoke runs.
Once the layer is identified, route to the matching debug verb on
the matching skill: install / build / link / driver to
doca-setup ## debug (doca-setup/TASKS.md#debug);
cross-cutting runtime to
doca-debug ## debug (doca-debug/TASKS.md#debug);
program-layer Core-context patterns to
doca-programming-guide TASKS.md ## debug (doca-programming-guide/TASKS.md#debug);
higher-level RDMA-layer patterns the user might climb back to,
to doca-rdma TASKS.md ## debug (doca-rdma/TASKS.md#debug);
higher-level Ethernet-queue patterns to
doca-eth TASKS.md ## debug (doca-eth/TASKS.md#debug);
higher-level Rivermax patterns to
doca-rmax TASKS.md ## debug (doca-rmax/TASKS.md#debug).
use
See references/use.md.
Deferred task verbs
The full deferred-verb routing lives in references/deferred-verbs.md. Load that companion rather than inventing a verb this skill does not own.
install/ env prep. Defer todoca-setup/SKILL.md.Higher-level RDMA / Ethernet / Rivermax. After a working QP, hand off to
doca-rdma/SKILL.md,doca-eth/SKILL.md, ordoca-rmax/SKILL.md.
Command appendix
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 local install via `pkg-config doca-verbs` (experimental ABI tier — symbols may shift between releases) and inspects /opt/mellanox/doca/{lib,include,samples,applications}. The verbs headers (doca_verbs.h + doca_verbs_*.h family) are the authoritative symbol surface per headers-win-over-docs.
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-verbs · 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 or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-verbs.zip