Doca Mgmt
NVIDIAOfficialCreated by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill assists developers in building management-plane applications that interact with BlueField DPUs and ConnectX NICs. It covers the lifecycle of management and representor contexts, querying device capabilities, modifying congestion control settings, managing ICM quotas, and executing raw firmware commands. It is designed for developers integrating device-level state management into fleet tools or orchestration software, emphasizing safe modification patterns and proper error handling within the DOCA ecosystem.
What it does
- Guides the setup of doca_mgmt_dev_ctx and doca_mgmt_dev_rep_ctx contexts.
- Explains how to query and modify device-level capabilities and feature flags.
- Provides the command-scope ladder for safe execution of raw firmware commands.
- Details the management-specific overlay for the DOCA error taxonomy.
- Outlines procedures for modifying diagnostics data and ICM quotas.
- Integrates with hardware safety policies for state-changing operations.
When to use it
- When developing fleet management or orchestration tools that require programmatic access to DPU/NIC state.
- When you need to toggle features like data-direct on a VF representor.
- When debugging DOCA_ERROR_IO_FAILED or other management-plane API errors.
- When you need to issue raw firmware commands with specific security scopes.
- When you need to query device-wide attributes programmatically rather than via CLI snapshots.
Advantages
- Ensures safe interaction with device state through structured workflows.
- Provides clear boundaries between management-plane tasks and other DOCA domains.
- Standardizes the approach to firmware command scopes and error handling.
- Promotes the use of verified reference samples for application development.
Usage examples
- “How do I toggle data-direct on a VF?”
- The agent will guide you to open a representor context, capture the pre-state, apply the toggle, and verify the change while following the hardware-safety policy.
- “I am getting DOCA_ERROR_IO_FAILED from doca_mgmt_raw_cmd, what should I check?”
- The agent will help you verify the four-way version match, the opcode, and ensure the command scope (e.g., DEBUG_READ_ONLY) is appropriate for the operation.
- “How do I set an ICM quota per representor?”
- The agent will provide the steps to use the doca_mgmt_icm_quota_* functions within a valid representor context.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/doca-mgmt/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-mgmt.zip -d .agents/skills
Documentation by NVIDIA
DOCA Management
Examples
"Toggle data-direct on a VF." — this is in scope. Use the management / representor context; do not drop to raw mlxconfig.
"DOCA_ERROR_IO_FAILED from raw_cmd." — the firmware rejected the command: re-check the four-way version match, the opcode, and the narrowest correct scope (CONFIGURATION, DEBUG_READ_ONLY, DEBUG_WRITE, DEBUG_WRITE_FULL). fwctl or permission failures surface as
DOCA_ERROR_OPERATING_SYSTEMinstead.
Instructions
Follow Loading order below. Open the tasks companion for configure / raw-cmd / debug. Open the capabilities companion for scopes and device caps. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed
and the user is doing hands-on management-plane work against
a BlueField / ConnectX device — typically a fleet-management or
orchestration tool that needs to query or modify device-level
state programmatically. Open the tasks companion if the user
wants to do something (install / configure / build / modify /
run / test / debug / use); open the capabilities companion
when the question is what can doca-mgmt express on this version —
the management context model, the raw-command scope ladder, the
sub-domain surfaces (caps-general, cc-global-status, diagnostics-
data, icm-quota), version compatibility, and the safety overlay.
If the user has not installed DOCA yet, route to
doca-setup/SKILL.md first.
How to use this skill. Read this file, then search the companion file
for the ## <name> heading the question needs and read that whole section.
Answer completely from it, quoting only its symbols and commands. Do not
browse docs; use the entry points in doca-public-knowledge-map. Give
environment checks as commands for the user's DOCA host. Any change to
device state also follows doca-hardware-safety: say so and cite it. For
out-of-scope requests, name the skill that owns them and stop.
Example questions this skill answers well
The CLASSES of management-plane 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.
"Is
doca-mgmteven the right surface, or do I want telemetry / bench / caps?" — worked example: "I'm building a fleet inventory tool — do I use doca-mgmt to query each BlueField's data-direct capability, or doca-telemetry, or doca_caps?". Answered by the management-plane vs observability-plane vs read-only-CLI selection rule inCapabilities and modes
surface-selection table.
"How do I stand up a management context on a device (and a representor)?" — worked example: "open a
doca_mgmt_dev_ctxon the device, then adoca_mgmt_dev_rep_ctxon a specific VF representor for caps-general programming". Answered by the management-context lifecycle inCapabilities and modes
the configure walk in
configure.
"How do I query a device capability — say, whether it supports data-direct?" — worked example: "create a caps-general handle, call
doca_mgmt_device_caps_general_geton the representor context, read the data-direct flag". Answered by the capability-query pattern inCapabilities and modes
the test step in ## test.
"How do I modify a device-level feature flag safely?" — worked example: "toggle
data_directon a representor; capture pre-state, write, verify, prepare rollback". Answered by the apply-with-rollback workflow inmodify layered on the
bundle-wide hardware-safety meta-policy referenced from
Safety policy.
"What does the
doca_mgmt_raw_cmdscope mean and which scope should I use?" — worked example: "I have a vendor- documented opcode for aDEBUG_READ_ONLYquery — what scope does that need and what is the blast radius?". Answered by the command-scope ladder inCapabilities and modes
the raw-command verb in ## use.
"What does this
DOCA_ERROR_*from adoca_mgmt_*call mean and which layer caused it?" — worked example: "DOCA_ERROR_IO_FAILEDfromdoca_mgmt_raw_cmd". Answered by the mgmt overlay on the cross-library taxonomy in ## Error taxonomythe layered ladder in
debug that escalates to
doca-debug/SKILL.mdand todoca-hardware-safety/SKILL.mdwhen the cause is a device-state change.
When to load this skill
Load this skill when the user is doing hands-on DOCA Management work on a host with one or more BlueField / ConnectX devices. Concretely:
Standing up a
doca_mgmt_dev_ctxon adoca_devto inspect or modify device-level state.Standing up a
doca_mgmt_dev_rep_ctxon adoca_dev_rep(or viadoca_mgmt_dev_rep_ctx_create_by_pci_addrwhen the representor is not available) to inspect or modify a VF / function-level configuration.Querying a device's general capabilities via
doca_mgmt_device_caps_general_*(data-direct support and similar device-wide attributes).Programming a representor's general capabilities via the same
setpath.Querying or modifying congestion-control global status via
doca_mgmt_cc_global_status_*(RP / NP protocol type, priority, enable / disable).Modifying or querying multi-domain diagnostics data via
doca_mgmt_diagnostics_data_*against a specific device.Setting ICM quota limits per device or per representor via
doca_mgmt_icm_quota_*and reading the current allocation / max-reached.Issuing a
doca_mgmt_raw_cmdagainst the device's firmware-control endpoint, choosing the rightenum doca_mgmt_cmd_scopefor the operation's blast radius.Debugging a
DOCA_ERROR_*returned by adoca_mgmt_*call and deciding whether the cause is a configuration mistake, a lifecycle ordering bug, a missing capability on the device, anfwctlioctl failure, or a firmware-side rejection.
Do not load this skill for general DOCA orientation, install
of DOCA itself, live performance benchmarking, or stream-based
telemetry. For those, use
doca-public-knowledge-map/SKILL.md,
doca-setup/SKILL.md,
doca-bench/SKILL.md, and
doca-telemetry/SKILL.md respectively.
What this skill provides
This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive management-specific material lives in two companion files:
the capabilities companion — what doca-mgmt can express on this version: the management-context object model (
doca_mgmt_dev_ctx+doca_mgmt_dev_rep_ctx), the raw- command scope ladder (DOCA_MGMT_CMD_SCOPE_CONFIGURATION,DOCA_MGMT_CMD_SCOPE_DEBUG_READ_ONLY,DOCA_MGMT_CMD_SCOPE_DEBUG_WRITE,DOCA_MGMT_CMD_SCOPE_DEBUG_WRITE_FULL), the sub-domain surfaces (caps-general, cc-global-status, diagnostics-data, icm-quota) with their capability-query gates, the EXPERIMENTAL symbol-set policy (every publicdoca_mgmt_*symbol is tagged EXPERIMENTAL), the mgmt overlay on the cross-libraryDOCA_ERROR_*taxonomy, the observability surface (pre-state capture + post-write re-query), and the per-artifact safety overlay on the bundle-wide hardware-safety meta-policy.the tasks companion — step-by-step workflows for the eight in-scope verbs:
install,configure,build,modify,run,test,debug,use. Plus aDeferred task verbsblock that points out-of-scope questions at the right next skill.
The skill assumes a host or BlueField where DOCA is already
installed at the standard location and the user has the
privileges their public install profile expects (management-
plane operations typically require root or an equivalent
device-administration capability). It does not cover installing
DOCA — that path goes through
doca-setup/SKILL.md.
What this skill deliberately does not ship
This skill is agent guidance, not a samples or templates bundle. To keep the boundary clean, it deliberately does not contain — and pull requests should not add:
Pre-written DOCA Management application source code, in any language. Management-plane code touches device state and a wrong write can take the device offline; authoring it from documentation prose, especially against an EXPERIMENTAL symbol set whose shape can change between releases, is forbidden by this skill. The agent's job is to route the user to verified reference code (the shipped DOCA samples on the installed package set are the canonical worked examples) and to prescribe a minimum-diff modification via the universal modify-a-sample workflow in
doca-programming-guide/SKILL.md.Standalone build manifests parked inside the skill. The agent constructs the build manifest in the user's project directory against the user's installed DOCA, where
pkg-config --modversion doca-mgmtis the source of truth.Raw-command opcode catalogs. The
doca_mgmt_raw_cmdin-payload and out-payload are device / firmware specific; the skill names the scope of a command class and the discipline the agent applies (pre-state capture, scope ladder, rollback path) but it does NOT enumerate opcodes — those are vendor / device documentation and looked up viadoca-public-knowledge-map/SKILL.md.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 management-context object model, the raw-command scope ladder, the sub-domain surfaces, version compatibility, the error taxonomy, observability, and the per-artifact safety overlay, see the capabilities companion.
For step-by-step workflows — install, configure, build, modify, run, test, debug, use — see the tasks companion.
Both companion files cross-link to each other and to
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public docs or
the installed package layout" rather than "mgmt-specific
guidance".
Related skills
doca-hardware-safety/SKILL.md— the bundle-wide hardware-safety meta-policy. Because doca-mgmt is the surface through which agents most commonly modify device state programmatically, the safety overlay in the capabilities companion cross-links the meta-policy load-bearingly and the agent walks the hardware-safety ladder whenever a write is recommended.doca-telemetry/SKILL.mdanddoca-telemetry-exporter/SKILL.md— the observability surfaces for streaming telemetry from the device. Use those when the user wants live metrics; use doca-mgmt when the user wants point-in-time programmatic query or modification.doca-caps/SKILL.md— the read-only CLI for inspecting device capabilities. Use the tool when the user wants an interactive snapshot; use doca-mgmt when the user wants the same information through the C API in a fleet tool.doca-bench/SKILL.md— the live-performance benchmarking tool. Out of scope for doca-mgmt; the skill names the boundary.doca-pcc/SKILL.mdanddoca-pcc-counters/SKILL.md— programmable congestion control. doca-mgmt'sdoca_mgmt_cc_global_status_*surface is the global enable/disable + protocol selection control plane that layers on the deeper programmable-CC surface owned by doca-pcc.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.doca-setup/SKILL.md— env preparation, install verification, and the I have no install yet path with the public NGC DOCA container.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 cross-libraryDOCA_ERROR_*taxonomy. This skill layers management-plane specifics on top.doca-debug/SKILL.md— the cross-cutting debug ladder. Management-specific debug overlays on top of it.doca-version/SKILL.md— the version detection / four-way match rule every per-artifact## Version compatibilityanchor builds on. This skill quotes the management-specific overlay only.doca-structured-tools-contract/SKILL.md— the JSON-schema contracts for the agent-preferred structured helpers; the## Command appendixin the tasks companion defers to them before falling back to the manual chain.
Files
- ATTRIBUTION.mdAdded by AutoGineer885 B
- BENCHMARK.md9.8 KiB
- CAPABILITIES.md29.8 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md14.1 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md29.6 KiB
- evals/evals.json2.8 KiB
- skill-card.md5.4 KiB
- skill.oms.sig5.1 KiB
TASKS.md
DOCA Management workflows
Where to start: The verbs run install → configure → build → modify → run → test → debug → use. Skip ahead only when the user
is already past a verb. The ## modify verb is HIGH STAKES
because the management plane writes device-level state; the
agent walks the apply-with-rollback workflow there even when the
write looks trivial. The ## test verb is an iterative loop
(symbol-presence → cap-supported → pre-state capture → write →
re-query → loop back if the diff is unexpected), 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 underlying object model, version
compatibility, error taxonomy, observability surface, and safety
policy that these workflows assume, see
CAPABILITIES.md. For where to find docs, the
installed DOCA layout, or release notes, route through
doca-public-knowledge-map/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
Goal: confirm the user's installed DOCA actually ships
doca-mgmt and the host kernel exposes the underlying fwctl
path before any management-plane work begins.
This skill does not own DOCA installation; that path lives
in doca-setup/SKILL.md. The
management-specific preconditions the agent verifies after a
DOCA install:
doca-mgmt.pcfile is present.pkg-config --modversion doca-mgmtresolves and reports a semver matchingdoca_caps --version. If it does not resolve, the installed DOCA package set does not include doca-mgmt; the user needs to install the matching package (the exact package name is platform-specific and looked up viadoca-public-knowledge-map ## Layout of an installed DOCA package(doca-public-knowledge-map/SKILL.md#layout-of-an-installed-doca-package)).Supporting
.pcfiles are present. doca-mgmt requiresdoca-common. Bothpkg-config --modversionresults must agree on the same DOCA semver per the four-way match indoca-version CAPABILITIES.md ## Version compatibility(doca-version/CAPABILITIES.md#version-compatibility).Installed headers expose the symbols. Check the public header set (
doca_mgmt.h,doca_mgmt_device_caps_general.h,doca_mgmt_cc_global_status.h,doca_mgmt_diagnostics_data.h,doca_mgmt_icm_quota.h) resolves under the installed DOCA infrastructure include tree. If the.pcresolves but the headers are missing, the install is partial.fwctlis available on the host kernel. doca-mgmt's raw-command path issuesfwctlioctls; the host kernel must expose the matching character device. The agent does not name a specific kernel version from memory; route todoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug) layer 5 (driver) forfwctl-side checks. ADOCA_ERROR_OPERATING_SYSTEMfromdoca_mgmt_raw_cmdon a freshly-installed system is almost always this gate.User privileges. Most management-plane operations require root or an equivalent device-administration capability. Confirm the user can either run as root or has been granted the necessary
cap_*capabilities on the binary before any write is attempted.
If any precondition fails, stop and route to
doca-setup/SKILL.md for the install /
kernel side or to the operator's privilege-management process
for the privilege side; a doca-mgmt-layer diagnosis against a
half-installed system wastes the user's time.
configure
Goal: bring up the management context (and optionally a representor context) and reach the state where capability queries and / or sub-domain operations can run.
Steps the agent should walk the user through:
Confirm the installed DOCA version. Use the procedure in
doca-version CAPABILITIES.md ## Version compatibility(doca-version/CAPABILITIES.md#version-compatibility). Quote the version observed (pkg-config --modversion doca-mgmt, thendoca_caps --version); do not assume "latest". Surface that everydoca_mgmt_*symbol the agent recommends isEXPERIMENTALperCAPABILITIES.md ## Version compatibility.Open the device. Use the standard
doca_devdiscovery path (looked up viadoca-public-knowledge-map/SKILL.mdwhen the user is unfamiliar with it) to obtain adoca_dev*for the target BlueField / ConnectX.Create the management device context. Call
doca_mgmt_dev_ctx_create(dev, &dev_ctx). The lifetime ofdev_ctxis bound to the lifetime ofdev; destroydev_ctxfirst, then close the device.(Optional) Create the representor context. If the user wants to operate on a VF / function-level surface, obtain a
doca_dev_rep*and calldoca_mgmt_dev_rep_ctx_create(dev_ctx, rep, &rep_ctx). If the VF's kernel-side representor is not exposed but the PCI address is known, usedoca_mgmt_dev_rep_ctx_create_by_pci_addr(dev_ctx, "0000:3a:00.2", &rep_ctx)with the documented HEXDomain:Bus:Device.Functionformat.Probe sub-domain support. Before any sub-domain
_setor_modify, call the sub-domain's capability gate:doca_mgmt_cap_icm_quota_is_supported(dev_ctx)for icm-quota;doca_mgmt_cap_diagnostics_data_multi_domain_is_supported(dev_ctx)for the multi-domain diagnostics data; for caps-general and cc-global-status, attempt a_getagainst a transient handle and treatDOCA_ERROR_NOT_SUPPORTEDas the not-supported signal.Sanity check before any write. Confirm with the user: which device, which representor (if any), which sub-domain, which fields. If any of those are unclear, stop and ask — do not invent.
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 Management 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 mgmt-specific overlay:
| Slot | Value for doca-mgmt | Why it matters |
|---|---|---|
pkg-config module name | doca-mgmt | The library's .pc file installed by the DOCA host packages |
| Co-required modules | doca-common | doca-mgmt depends on Core / Common |
| Header check | The public mgmt header set (doca_mgmt.h plus the sub-domain headers) resolvable under the installed DOCA infrastructure include tree (path via doca-public-knowledge-map/SKILL.md) | If pkg-config --cflags doca-mgmt resolves but the headers are missing, the install is partial |
| Minimum required DOCA version | Query with pkg-config --modversion doca-mgmt; never hardcode in build files | The EXPERIMENTAL tag means a version pin from agent memory is wrong by construction |
| Runtime privilege model | The built binary will need root or an equivalent capability set to issue management operations; ensure the deployment plan accounts for this | A binary that compiles but cannot exercise its primary surface in deployment is a productivity sink |
For non-C consumers (Rust, Go, Python), the link surface is the
same *.so files; FFI wrappers are out of scope for this skill.
modify
Goal: change device-level state through doca-mgmt — toggle a caps-general field, change a cc-global-status setting, modify diagnostics-data, set an ICM quota, or issue a raw command — in a way that preserves the operator's ability to roll back.
This verb is HIGH STAKES. The agent NEVER recommends a
doca-mgmt write without walking the apply-with-rollback workflow
below, even when the write looks trivial. The workflow is the
doca-hardware-safety change-application discipline (doca-hardware-safety/CAPABILITIES.md#capabilities-and-modes)
applied at the API surface.
Apply-with-rollback workflow (every modify pattern):
Pre-flight inventory. Run the bundle-wide pre-flight inventory per
doca-hardware-safety TASKS.md ## configure(doca-hardware-safety/TASKS.md#configure) FIRST. The doca-mgmt-specific addendum is the sub-domain handle pre-state: create the sub-domain handle, call the matching_get/_queryagainst the target context, and record every field the upcoming_setwill touch.Confirm capability support. Re-run the sub-domain's capability gate from
## configurestep 5 against the actual target context. The gate may differ between device context and representor context.Identify the scope. If the operation is a
raw_cmd, pick the narrowestenum doca_mgmt_cmd_scopeper the ladder inCAPABILITIES.md ## Capabilities and modes. If a dedicated sub-domain wrapper exists, prefer it overraw_cmd.Name the rollback path. Before writing, write down (and read back to the user) the exact
_set/raw_cmdcall that would revert to the captured pre-state. If the pre-state cannot be reproduced by the same surface, the change has no rollback and the agent refuses to apply it perdoca-hardware-safety ## Safety policy(doca-hardware-safety/CAPABILITIES.md#safety-policy).Maintenance window + OOB precondition. For any write that could affect link state or hardware traffic — most notably
cc_global_statusenable/disable,raw_cmdCONFIGURATIONorDEBUG_WRITE_FULLagainst a port- affecting opcode, and any change applied during live traffic — confirm with the operator the maintenance window and OOB-access classes perdoca-hardware-safety ## Capabilities and modes(doca-hardware-safety/CAPABILITIES.md#capabilities-and-modes).Apply on replica first. Per
doca-hardware-safety ## Capabilities and modes(doca-hardware-safety/CAPABILITIES.md#capabilities-and-modes) replica-first rule, apply on a non-prod replica that matches the production hardware class first; run the post-write re-query gate (step 8 below) on the replica. After the intended forward diff is proven, apply the recorded rollback values to restore the replica's captured pre-state and re-run the same_get/_query. Production remains blocked until this second re-query proves the replica is back at the recorded baseline.Apply the write. Call the sub-domain's
_set/_modify/_set_limit/raw_cmdon the target context. Quotedoca_error_get_descr()verbatim if the call returns an error; do not paraphrase.Post-write re-query. Immediately re-run the matching
_get/_queryand diff against the pre-state. The diff should be exactly the change the user intended. Any unexpected delta is a regression; trigger the rollback path from step 4. Re-query after rollback and require an exact match to the recorded pre-state. If the rollback call fails or the re-query still differs, fail closed: stop all further writes, preserve the target identity plus pre-state, intended forward diff, post-write state, rollback call/result, and post-rollback state, then hand that bundle to the operator for hardware recovery (out-of-band console or BMC perdoca-hardware-safety, then NVIDIA support with the bundle). Do not retry the write.Hold the rollback path ready for the duration of the change window. The user does not declare the change "done" until either (a) the workload has resumed and the device's observability surface is healthy, or (b) the rollback has been applied and the re-query proves the pre-state was restored. A failed or unproven rollback is an incident, not a reason to retry or continue production rollout.
The agent emits the intent description + the apply-with-
rollback workflow filled out for the user's specific call; the
actual unified diff against any sample code the user is
modifying is produced line-by-line via the universal modify-a-
sample workflow in
doca-programming-guide TASKS.md ## modify (doca-programming-guide/TASKS.md#modify).
run
Goal: actually execute the built binary against the user's installed DOCA on a host with a BlueField / ConnectX device, with appropriate privileges.
Steps the agent should walk the user through:
Privilege check. Confirm the binary will run with the privileges its management operations require (root or equivalent
cap_*capabilities). ADOCA_ERROR_OPERATING_SYSTEMfromdoca_mgmt_raw_cmdon a non-root invocation is almost always a privilege gate.Capture the structured log. Set
DOCA_LOG_LEVEL=tracefor the first run (seedoca-debug CAPABILITIES.md ## Observability(doca-debug/CAPABILITIES.md#observability)). The doca-mgmt surface is small and quiet; the trace log is the cheapest way to see lifecycle transitions.Run read-only operations first. Before any write, run the binary's read-only path (
doca_mgmt_device_caps_general_get,doca_mgmt_cc_global_status_get,doca_mgmt_diagnostics_data_query_for_dev,doca_mgmt_icm_quota_query, ordoca_mgmt_raw_cmdwithDEBUG_READ_ONLY) against the target device. The output is the baseline.Confirm the baseline matches the operator's mental model. If the device's reported pre-state diverges from what the operator expected, stop — the discrepancy is a bug to investigate before any write. Writing onto an unexpected pre-state compounds the bug.
Only then run writes, following the apply-with-rollback workflow from
## modify.
test
Goal: prove the configured management surface actually returns correct data and applies writes the device honors, without disturbing live state any more than necessary.
This is a loop, not a one-shot pass. Each iteration narrows either the symbol set, the cap-supported result, the pre-state capture, the write outcome, or the post-write re-query diff. The loop terminates when either (a) the user's intended management operation flows end-to-end with the expected device-side state change, or (b) the agent has narrowed the failure cause to a layer outside doca-mgmt itself (fwctl, firmware, driver) and escalated to the matching skill.
Iteration shape:
Symbol-presence check. Confirm every
doca_mgmt_*symbol the user's code references is exported by the installedlibdoca_mgmt.soand matched in the installed headers. Afunction not foundat link time is almost always a partial install or a wrong-version pairing perdoca-version TASKS.md ## debug(doca-version/TASKS.md#debug) layer 2.Capability-supported check. Re-run the sub-domain's
_is_supportedagainst the active context. If false → that's the answer; the user's device or DOCA version does not support the sub-domain.Pre-state capture. Run the
_get/_queryfor every field the upcoming write will touch. The result is the rollback baseline.Apply the write on a replica. Per the
doca-hardware-safety/SKILL.mdreplica-first rule, the test environment is the replica; never the production device. Apply the write.Post-write re-query. Run the
_get/_queryagain and diff against step 3. The diff should match the user's intent exactly.Restore and prove the replica pre-state. Apply the rollback values captured in step 3, then run the same
_get/_queryagain. Do not authorize production unless this re-query exactly matches the captured pre-state. On a rollback error or residual diff, stop, preserve the full forward/rollback evidence set from## modifystep 8, and escalate for operator intervention.Negative test. Construct one deliberately invalid call (e.g. an ICM-quota limit above
_cap_get_max_limit, or a_seton a context whose_is_supportedreturned failure) and confirm the API returnsDOCA_ERROR_INVALID_VALUE/DOCA_ERROR_NOT_SUPPORTEDas expected. This validates the agent's capability-discovery understanding is itself correct on this DOCA version. If the invalid operation unexpectedly succeeds, stop immediately: capture the exact target, sub-domain, parameters, capability result, return value, and post-operation_get/_querystate; restore the captured pre-state using the prepared rollback; re-query; and report the unexpected firmware/library behavior to the user with that capture, as a defect for NVIDIA support (DOCA version, firmware version, opcode, parameters). Do not continue negative testing or promote the operation.
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 a sub-domain we expected to ship | The user's code references a sub-domain the installed DOCA does not expose | Re-confirm via the sub-domain's capability gate; the EXPERIMENTAL tag means sub-domains can be added / renamed between releases |
DOCA_ERROR_BAD_CONFIG from _set | The handle was not populated with all required fields before _set | Re-walk the sub-domain handle's field accessors; every field the surface requires must be set or _clear-ed before _set |
DOCA_ERROR_IN_USE on a representor _set | The representor context is already initialized for this surface | Destroy and re-create the representor context, then retry; some surfaces are not field-mutable in place |
DOCA_ERROR_OPERATING_SYSTEM on raw_cmd | The host-side fwctl ioctl path is not reachable | Confirm the host kernel exposes the fwctl interface; route to doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug) layer 5 |
DOCA_ERROR_IO_FAILED on raw_cmd | The firmware rejected the command | Re-confirm the four-way version match; re-confirm the opcode against the vendor docs; if both check out, the device state is the gate — route to doca-hardware-safety TASKS.md ## debug (doca-hardware-safety/TASKS.md#debug) |
| Post-write re-query diff doesn't match intent | The _set returned success; the _get shows unexpected state | The write landed but with side effects the agent did not anticipate; rollback per ## modify step 4, then re-investigate |
Loop identity is the same error family on the same sub-domain,
target device/representor, operation, inputs, and captured
pre-state, with unchanged return descriptions, capability
results, trace logs, and post-operation query evidence. Stop
after two consecutive iterations with that identity produce no
evidence change — that means the cause is below doca-mgmt.
Escalate to
doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug)
with the captured layer-1-through-5 evidence.
debug
Goal: when a DOCA Management call returns a DOCA_ERROR_*
(or a write lands but the device state diverges from the
operator's intent), 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
doca-mgmt-specific fixes. This skill's overlay names the
management-specific manifestation at layers 5 (runtime), 6
(program), and at the hardware-state-investigation cross-link:
Layer 5 (runtime) — doca-mgmt overlay.
Confirm the management contexts were created in the right order: device context first, then representor context (the representor context's
_createrequires an existingdev_ctx). Out-of-order returnsDOCA_ERROR_INVALID_VALUE.Confirm the user-side privilege model. A
DOCA_ERROR_OPERATING_SYSTEMis almost always either missing root or a missingcap_*set; check the binary's privileges before deeper investigation.Confirm the
fwctlioctl path is reachable. The kernel-side check forfwctlis owned bydoca-setup/SKILL.md; route there.
Layer 6 (program) — doca-mgmt overlay.
Sub-domain field discipline: every
_setrequires its fields to be populated via the matching_set_<field>accessor before the apply call.DOCA_ERROR_BAD_CONFIGis the signal for an unset field.Handle re-use: a sub-domain handle is transient; it can be re-used across multiple operations via
_clear, but cannot be shared across threads without external synchronization.PCI address format for
_create_by_pci_addr: the documented format is HEXDomain:Bus:Device.Function(e.g."0000:3a:00.2"). A malformed string returnsDOCA_ERROR_INVALID_VALUE.
Hardware-state investigation cross-link. When a write
returned success but the device's reported state diverges from
the intended value, OR when raw_cmd returns
DOCA_ERROR_IO_FAILED after the four-way version match and
opcode check both pass, the cause is at the
hardware/firmware layer — route to
doca-hardware-safety TASKS.md ## debug (doca-hardware-safety/TASKS.md#debug)
for the change-application incident discipline. doca-mgmt's
debug overlay does NOT include the firmware-state recovery
ladder; that's the meta-policy's job.
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);
cross-cutting runtime to
doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug);
device-state recovery to
doca-hardware-safety TASKS.md ## debug (doca-hardware-safety/TASKS.md#debug);
program-layer Core-context patterns to
doca-programming-guide TASKS.md ## debug (doca-programming-guide/TASKS.md#debug).
use
Goal: integrate a working doca-mgmt component into a fleet- management agent, an orchestration plugin, or a device- administration tool — and operate it against many devices over time without surprise.
The integration shape this skill teaches:
Per-application init order. Open the device → create
doca_mgmt_dev_ctx→ optionally createdoca_mgmt_dev_rep_ctxfor representor-targeted operations → run the sub-domain capability gates → cache the result for the session. The cached cap snapshot is the baseline every future operation in the same session compares against.Per-application teardown order. Destroy representor contexts before the device context; destroy sub-domain handles before the context they were used against; close the device last. Out-of-order destroy is the canonical leak.
Bulk operation discipline. When the fleet agent walks many devices, each device gets its own
doca_mgmt_dev_ctx; do NOT share a context across devices. The library is not documented as cross-device-safe and the agent does not assume it.Per-release re-verification. Because the API surface is EXPERIMENTAL, every DOCA upgrade requires re-running
## testend-to-end against the new install. A sub-domain that worked on DOCA X may be reshaped on DOCA Y; the agent does not assume the fleet tool survives a version bump without re-testing.Operational handoff. Production deployment uses the bundle's hardware-safety meta-policy (
doca-hardware-safety/SKILL.md) for every write. The fleet tool's change-control runbook names the maintenance window, the OOB access class, the replica-first stage, the rollback path, and the observability gate per the meta-policy.raw_cmdoperator discipline. The raw-command path is the escape valve for vendor-documented opcodes without a dedicated wrapper. The agent treats everyraw_cmdcall site as a change to the device's firmware-control surface: opcode + scope + payload reviewed; pre-state captured; rollback documented; the operation runs inside the same change-control discipline asmlxconfigwrites.
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 (of DOCA itself). 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's## installverb assumes DOCA is already installed and only checks the mgmt-specific preconditions.deploy. Deploying fleet-management agents at scale across many hosts and BlueFields, Kubernetes operator workflows, multi-tenant isolation — out of scope for this skill. For single-host first-run testing, the right verb is
## run.rollback (fleet-wide). Coordinated rollback of doca-mgmt-applied changes across many devices is fleet-tool operator workflow, not a doca-mgmt API concern; the API surface for per-device rollback is the same
_set/_modify/raw_cmdused for the original write, called with the pre-state captured per## modify. The cross-cuttingdoca-hardware-safety/SKILL.mdmeta-policy owns the discipline.mlxconfig direct operation. Some configuration spaces are reachable both via doca-mgmt and via
mlxconfig; the latter is outside this skill's surface and routes throughdoca-hardware-safety/SKILL.mdfor the change-application discipline.Firmware burn / BFB reflash. Out of scope. Route to
doca-hardware-safety/SKILL.mdfor the meta-policy and to the public firmware-tooling documentation reachable throughdoca-public-knowledge-map/SKILL.md.
Command appendix
Every command below is cross-cutting on DOCA Management — 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.
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 probes for the matching structured helper FIRST
(doca-env --json for version + devices + libraries +
drivers; doca-capability-snapshot for per-device capability
flags; version-matrix.json for “available since” lookups).
If the probe succeeds, the structured tool's output is the
authoritative answer. If the probe fails, fall back to the
manual command in the row.
| Command (worked example) | Owning step | Class of question it answers | What healthy output looks like |
|---|---|---|---|
pkg-config --modversion doca-mgmt | ## install step 1; ## configure step 1 | What is the build-time DOCA Management version? | A semver 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-common doca-mgmt | ## install step 2 | Do both .pc files agree on the same DOCA semver? | A single semver repeated twice. Any disagreement is the partial-install pattern |
pkg-config --cflags --libs doca-mgmt | ## build | What include + link flags does the linker need? | Includes resolve under whichever include directory pkg-config --cflags reports on this install (do not hardcode the path); libs include -ldoca_mgmt -ldoca_common |
doca_caps --list-devs | ## configure step 2 | Which devices on this host can be used as a doca_dev for management operations? | One row per visible device with PCIe address and capability flags |
doca_caps --version | ## install step 1 | What is the runtime DOCA version on this host? | A semver matching pkg-config --modversion doca-mgmt |
cat /opt/mellanox/doca/applications/VERSION | ## install step 1; ## debug layer 1 | What does the install tree itself claim its version is? | A semver matching the other version sources |
id -u and getcap <binary> | ## run step 1 | Does the user / binary have the privileges management operations require? | 0 for root invocation, or a capability set that includes the device-administration cap_* the operation requires |
ls /dev/fwctl* | ## install step 4 | Is the host kernel exposing the fwctl character device doca-mgmt's raw command path uses? | One or more /dev/fwctl* character devices visible to root |
DOCA_LOG_LEVEL=trace ./<binary> | ## run step 2 | What did the structured DOCA logger emit for the first failing call? | A trace-level line on every lifecycle transition and every management-plane call |
| `dmesg | tail -n 40` (requires sudo) | ## debug layer 7 | What did the kernel / driver / firmware log around the last mgmt call? |
| `mlxconfig -d <pcie> q | head -n 40` (requires sudo) | ## debug layer 7 | What firmware-stored config does the NIC / DPU report? |
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 mgmt-specific rows on top.
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-mgmt` + `doca-common` and inspects /opt/mellanox/doca/{lib,include,samples,applications}; runtime operations require root (or device-admin cap_*) and an /dev/fwctl* character device exposed by the host kernel. 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-mgmt · 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-mgmt.zip