Generated banner for Doca Mgmt
Generated logo for Doca Mgmt

Doca Mgmt

NVIDIAOfficialCreated by NVIDIA

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • Medium risk

From the author

Use this skill when the user is doing hands-on DOCA Management programming against BlueField / ConnectX devices — standing up a management or representor context (doca_mgmt_dev_ctx / doca_mgmt_dev_rep_ctx), querying device caps (data-direct, caps-general), toggling congestion-control global status, modifying diagnostics-data, setting ICM quotas, or issuing a raw firmware command via doca_mgmt_raw_cmd with the right scope (CONFIGURATION / DEBUG_READ_ONLY / DEBUG_WRITE / DEBUG_WRITE_FULL). Trigger even when the user does not say "DOCA Management" — typical implicit phrasings include "fleet tool that walks every BlueField and reads device state", "toggle data-direct on a VF", "set an ICM quota per representor", "send a raw firmware command from C", "DOCA_ERROR_IO_FAILED from raw_cmd", or "fwctl ioctl is failing". Refuse and route elsewhere for mlxconfig direct operation, BFB / firmware reflash, streaming telemetry, doca_caps CLI snapshots, or DOCA install itself — those belong to other skills.
— the description by NVIDIA

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/doca-mgmt/download
  2. Unzip 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_SYSTEM instead.

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-mgmt even 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 in

    Capabilities 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_ctx on the device, then a doca_mgmt_dev_rep_ctx on a specific VF representor for caps-general programming". Answered by the management-context lifecycle in

    Capabilities 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_get on the representor context, read the data-direct flag". Answered by the capability-query pattern in

    Capabilities and modes

    • the test step in ## test.

  • "How do I modify a device-level feature flag safely?" — worked example: "toggle data_direct on a representor; capture pre-state, write, verify, prepare rollback". Answered by the apply-with-rollback workflow in

    modify layered on the

    bundle-wide hardware-safety meta-policy referenced from

    Safety policy.

  • "What does the doca_mgmt_raw_cmd scope mean and which scope should I use?" — worked example: "I have a vendor- documented opcode for a DEBUG_READ_ONLY query — what scope does that need and what is the blast radius?". Answered by the command-scope ladder in

    Capabilities and modes

    • the raw-command verb in ## use.

  • "What does this DOCA_ERROR_* from a doca_mgmt_* call mean and which layer caused it?" — worked example: "DOCA_ERROR_IO_FAILED from doca_mgmt_raw_cmd". Answered by the mgmt overlay on the cross-library taxonomy in ## Error taxonomy

    • the layered ladder in

    debug that escalates to

    doca-debug/SKILL.md and to doca-hardware-safety/SKILL.md when 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_ctx on a doca_dev to inspect or modify device-level state.

  • Standing up a doca_mgmt_dev_rep_ctx on a doca_dev_rep (or via doca_mgmt_dev_rep_ctx_create_by_pci_addr when 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 set path.

  • 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_cmd against the device's firmware-control endpoint, choosing the right enum doca_mgmt_cmd_scope for the operation's blast radius.

  • Debugging a DOCA_ERROR_* returned by a doca_mgmt_* call and deciding whether the cause is a configuration mistake, a lifecycle ordering bug, a missing capability on the device, an fwctl ioctl 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 public doca_mgmt_* symbol is tagged EXPERIMENTAL), the mgmt overlay on the cross-library DOCA_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 a Deferred task verbs block 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-mgmt is the source of truth.

  • Raw-command opcode catalogs. The doca_mgmt_raw_cmd in-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 via doca-public-knowledge-map/SKILL.md.

  • A samples/, bindings/, or reference/ 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

  1. Read this skill first to confirm the user's question is in scope.

  2. 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.

  3. 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".

  • 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.md and doca-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.md and doca-pcc-counters/SKILL.md — programmable congestion control. doca-mgmt's doca_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 canonical pkg-config + meson build pattern, the universal modify-a-shipped-sample first-app workflow, the cross-library DOCA_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 compatibility anchor 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 appendix in the tasks companion defers to them before falling back to the manual chain.

Files

CAPABILITIES.md

DOCA Management capabilities, version compatibility, errors, observability, safety

Where to start: The pattern overview below names the recurring management-class patterns. Pick the pattern first, then drill into the H2 that owns the substance. For the how of executing each pattern, jump to TASKS.md.

Read this file when the loader sent you here from SKILL.md. For step-by-step workflows that use these capabilities (install, configure, build, modify, run, test, debug, use) see TASKS.md. For where the underlying public documentation and installed package paths live, defer to doca-public-knowledge-map/SKILL.md — do not duplicate URLs or install paths in this file.

Pattern overview

Every management-class question this skill teaches resolves into one of SIX patterns. The patterns are CLASSES — they apply across every fleet-management or device-administration use case, not just the worked example shown.

Mgmt patternClass shapeWhere the substance lives
1. Pick doca-mgmt vs telemetry vs caps vs benchDecide before writing any code whether the operation is a point-in-time programmatic query / modification (mgmt), a continuous stream of metrics (telemetry), an interactive capability snapshot (caps CLI), or a live performance probe (bench)## Capabilities and modes surface-selection table
2. Stand up the management contextOpen doca_mgmt_dev_ctx on a doca_dev; optionally open a doca_mgmt_dev_rep_ctx on the device's representor (or by PCI address when the representor is unavailable)TASKS.md ## configure
3. Query a capability before actingEach sub-domain has a cap-supported-first discipline: doca_mgmt_cap_*_is_supported for icm-quota and diagnostics-data; doca_mgmt_device_caps_general_get for the general device cap surface## Capabilities and modes cap-supported-first rule + TASKS.md ## test
4. Modify device state — with rollback wired before the writeThe agent never recommends a doca_mgmt_*_set / _modify / _set_limit / raw_cmd write without (a) capturing the pre-state, (b) naming the rollback path, (c) cross-linking the bundle-wide hardware-safety meta-policy## Safety policy overlay + TASKS.md ## modify
5. Issue a raw command with the correct scopedoca_mgmt_raw_cmd takes an enum doca_mgmt_cmd_scope that classifies operation class and blast radius: CONFIGURATION is the broadest configuration-write scope for persistent device-visible state; DEBUG_WRITE_FULL is the broadest debug-write scope for firmware-side mutation. The agent picks by operation class, then chooses the narrowest scope that satisfies the request## Capabilities and modes raw-command scope ladder + TASKS.md ## use
6. Interpret a DOCA_ERROR_* from a mgmt callMap the error to a layer (configuration / capability / lifecycle / fwctl-ioctl / firmware-rejection / driver) and route## Error taxonomy mgmt overlay + TASKS.md ## debug

Two cross-cutting rules that apply to every pattern above:

  • Capture pre-state before any write. Every _set / _modify / _set_limit / raw_cmd with a write scope is preceded by the matching _get / _query against the current state. The pre-state is what the rollback path quotes; without it, rollback is impossible. This is the doca-hardware-safety pre-flight inventory (doca-hardware-safety/CAPABILITIES.md#capabilities-and-modes) rule applied at the API surface.

  • Capability-supported-first. Each sub-domain has a capability gate: for icm-quota, doca_mgmt_cap_icm_quota_is_supported; for multi-domain diagnostics data, doca_mgmt_cap_diagnostics_data_multi_domain_is_supported; for the general device caps, doca_mgmt_device_caps_general_get to read the current cap set. The agent does not recommend a set against a sub-domain whose is_supported returned a failure.

Capabilities and modes

DOCA Management is the management-plane API surface for BlueField / ConnectX device-level operations. The host-side library exposes a management context per device, an optional representor context per VF / function-level surface, four typed sub-domains (general caps, congestion-control global status, diagnostics data, ICM quota), two raw HCA/register surfaces (raw HCA capability, raw register), target info enumeration, and a raw-command pipe with an explicit scope classifier.

doca-mgmt vs telemetry vs caps vs bench

Four DOCA surfaces appear in fleet-management conversations. They are NOT interchangeable; pick one before writing any code:

SurfaceShapeWhen to pick
doca-mgmt (this skill)Programmatic point-in-time C API for querying and modifying device-level stateThe fleet tool needs to read or write device-level state through code; the operation is request/response, not streaming
doca-telemetry/SKILL.md + doca-telemetry-exporter/SKILL.mdStreaming telemetry producer + exporter for continuous device metricsThe fleet tool needs continuous time-series metrics (counters, gauges, histograms) rather than a one-off query
doca-caps/SKILL.mdRead-only CLI snapshot of device capabilitiesThe operator wants an interactive look at what a device supports, not a programmatic interface in a fleet agent
doca-bench/SKILL.mdLive performance benchmark for DOCA workloadsThe user wants to measure throughput / latency of a DOCA workload, not query or modify device state

Decision rule for the agent. If the user's intent is "my fleet agent needs to programmatically read or write device-level state", doca-mgmt is the right surface. If the intent contains the words continuous, streaming, Prometheus, time-series, or real-time monitoring, telemetry is the right answer. If the operator is at an interactive prompt rather than writing code, doca-caps is the answer. If the question is about throughput or latency, doca-bench is the answer.

The management context object model

Two objects expose the management plane. Verified surface (doca_mgmt.h):

ObjectCallsNote
doca_mgmt_dev_ctxdoca_mgmt_dev_ctx_create(dev, &ctx), doca_mgmt_dev_ctx_create_from_target_string(target_string, &ctx), doca_mgmt_dev_ctx_destroy(ctx), doca_mgmt_dev_ctx_get_doca_dev(ctx)Created on a doca_dev or from a target string; the device-wide management context. Required for doca_mgmt_raw_cmd, doca_mgmt_cap_*_is_supported, the device-wide icm-quota and diagnostics-data operations, and the raw HCA/register surfaces
doca_mgmt_dev_rep_ctxdoca_mgmt_dev_rep_ctx_create(dev_ctx, rep, &ctx) (with a doca_dev_rep), doca_mgmt_dev_rep_ctx_create_by_pci_addr(dev_ctx, "0000:3a:00.2", &ctx) (when a representor is not available for the VF), doca_mgmt_dev_rep_ctx_create_from_target_string(target_string, &ctx) (when only a target string is available), doca_mgmt_dev_rep_ctx_destroy, doca_mgmt_dev_rep_ctx_get_doca_dev_rep, doca_mgmt_dev_rep_ctx_get_mgmt_dev_ctxRequired for representor-targeted sub-domain calls (general caps _set / _get, icm-quota for representors). The _by_pci_addr and _from_target_string forms are the documented alternative paths when the kernel-side representor is not exposed

Every public doca_mgmt_* symbol is currently declared DOCA_EXPERIMENTAL in the installed headers. The agent must surface this whenever it recommends a symbol — see ## Version compatibility.

The raw-command scope ladder

doca_mgmt_raw_cmd(ctx, command_id, scope, in, in_size, out, out_size) is the firmware-control passthrough for operations that don't have a dedicated sub-domain surface. The enum doca_mgmt_cmd_scope field is the load-bearing piece:

ScopeClass of operationWhat the agent does before recommending it
DOCA_MGMT_CMD_SCOPE_CONFIGURATIONConfiguration writes that change device-visible state and persistCapture pre-state; name rollback; cross-link doca-hardware-safety ## Safety policy (doca-hardware-safety/CAPABILITIES.md#safety-policy) for the change-application discipline
DOCA_MGMT_CMD_SCOPE_DEBUG_WRITE_FULLThe widest debug-write surface; can mutate firmware-side state with broad blast radiusAll of the above PLUS the maintenance-window + OOB-precondition rule from the meta-policy; refuse if either is missing
DOCA_MGMT_CMD_SCOPE_DEBUG_WRITEA debug-write that mutates state with narrower scope than WRITE_FULLPre-state capture, documented rollback, capability confirmation, and post-write re-query are mandatory. Maintenance-window, OOB-access, and replica-first gates may be relaxed only with explicit operator authorization for a single-device operation confirmed non-traffic-affecting; if either condition cannot be established, refuse and escalate
DOCA_MGMT_CMD_SCOPE_DEBUG_READ_ONLYRead-only debug query; no state mutationThe agent may recommend it without the rollback discipline, but still inside a maintenance window when the device serves traffic

Scope selection rule for the agent. Pick the narrowest scope that satisfies the user's intent. A read-only query goes through DEBUG_READ_ONLY; a write that has a dedicated sub-domain surface (caps-general, cc-global-status, diagnostics-data, icm-quota) should go through that surface, not through raw_cmd. raw_cmd is the escape valve for vendor-documented commands without a dedicated wrapper — not the primary management surface.

Raw HCA capability and register surfaces

DOCA 3.5 adds two dedicated raw surfaces for HCA capabilities and registers. They are not doca_mgmt_raw_cmd; they use typed field descriptors and do not take an enum doca_mgmt_cmd_scope.

SurfaceFunctionsNotes
Raw HCA capabilitydoca_mgmt_raw_hca_cap_list(ctx, &hca_cap_types, &count), doca_mgmt_raw_hca_cap_describe(ctx, cap_type, &descriptors, &count), doca_mgmt_raw_hca_cap_query(ctx, cap_type, cap_mode, target, fields_out, count_out), doca_mgmt_raw_hca_cap_query_all(ctx, cap_type, cap_mode, target, &fields_out, &count_out), doca_mgmt_raw_hca_cap_modify(ctx, cap_type, target, fields_in, count_in)cap_mode is DOCA_MGMT_RAW_HCA_CAP_MODE_CUR or DOCA_MGMT_RAW_HCA_CAP_MODE_MAX. target type is DOCA_MGMT_RAW_HCA_CAP_TARGET_TYPE_SELF, DOCA_MGMT_RAW_HCA_CAP_TARGET_TYPE_OTHER_VHCA_ID, or DOCA_MGMT_RAW_HCA_CAP_TARGET_TYPE_OTHER_FUNCTION_ID. Free lists with doca_mgmt_raw_field_desc_list_free, doca_mgmt_raw_field_list_free, and doca_mgmt_raw_str_list_free
Raw registerdoca_mgmt_raw_register_list(ctx, &registers, &count), doca_mgmt_raw_register_describe(ctx, register_name, &descriptors, &count), doca_mgmt_raw_register_query(ctx, register_name, fields_in, count_in, fields_out, count_out), doca_mgmt_raw_register_query_all(ctx, register_name, fields_in, count_in, &fields_out, &count_out), doca_mgmt_raw_register_modify(ctx, register_name, fields_in, count_in)Field access constants: DOCA_MGMT_RAW_FIELD_ACCESS_RO, DOCA_MGMT_RAW_FIELD_ACCESS_RW, DOCA_MGMT_RAW_FIELD_ACCESS_WO, DOCA_MGMT_RAW_FIELD_ACCESS_INDEX, DOCA_MGMT_RAW_FIELD_ACCESS_OP, DOCA_MGMT_RAW_FIELD_ACCESS_UNKNOWN. Free lists with doca_mgmt_raw_field_desc_list_free, doca_mgmt_raw_field_list_free, and doca_mgmt_raw_str_list_free

doca_mgmt_raw_hca_cap_modify and doca_mgmt_raw_register_modify change device state. Apply the same pre-state capture, rollback, and doca-hardware-safety discipline as DOCA_MGMT_CMD_SCOPE_CONFIGURATION writes.

Target info enumeration

Target info enumeration lists devices and representors available as management targets. Use doca_mgmt_target_info_dev_create_list to enumerate device targets and doca_mgmt_target_info_dev_rep_create_list on a device target to enumerate its representors. Accessors return target strings, interface names, PCI function types, and representor indices. doca_mgmt_target_info_dev_rep_get_pci_pf_type returns DOCA_MGMT_PCI_PF_TYPE_EXTERNAL_HOST or DOCA_MGMT_PCI_PF_TYPE_SATELLITE. Destroy lists with the corresponding _destroy_list calls.

Device target accessors: doca_mgmt_target_info_dev_get_ibdev_name, doca_mgmt_target_info_dev_get_iface_name, doca_mgmt_target_info_dev_get_native_port_num, doca_mgmt_target_info_dev_get_pci_func_type, doca_mgmt_target_info_dev_get_target_string.

Representor target accessors: doca_mgmt_target_info_dev_rep_get_controller_num, doca_mgmt_target_info_dev_rep_get_iface_name, doca_mgmt_target_info_dev_rep_get_pci_func_type, doca_mgmt_target_info_dev_rep_get_pci_pf_type, doca_mgmt_target_info_dev_rep_get_pf_index, doca_mgmt_target_info_dev_rep_get_sf_index, doca_mgmt_target_info_dev_rep_get_target_string, doca_mgmt_target_info_dev_rep_get_vf_index, doca_mgmt_target_info_dev_rep_get_vhca_id.

Sub-domain surfaces

Four sub-domains expose typed wrappers on top of the management context. Each has its own capability gate and lifecycle:

Sub-domainHeaderCapability gateObject model
General device capsdoca_mgmt_device_caps_general.hImplicit: the _get call returns DOCA_ERROR_NOT_SUPPORTED on devices without the surfacedoca_mgmt_device_caps_general handle (_create / _destroy); apply via _set(rep_ctx, handle); read via _get(rep_ctx, handle); field accessors: _set_data_direct / _get_data_direct; _clear to reset before re-use
Congestion control global statusdoca_mgmt_cc_global_status.hImplicit: _get returns DOCA_ERROR_NOT_SUPPORTED on devices without the surfacedoca_mgmt_cc_global_status handle; protocol enum (RP / NP); priority and enable accessors; _set / _get against a representor or device context
Diagnostics datadoca_mgmt_diagnostics_data.hdoca_mgmt_cap_diagnostics_data_multi_domain_is_supported(dev_ctx) for the multi-domain capability; per-field cap probes for narrower featuresdoca_mgmt_diagnostics_data handle (_create / _destroy / _clear); _modify_for_dev / _query_for_dev; multi-domain accessors _get_multi_domain / _set_multi_domain
ICM quotadoca_mgmt_icm_quota.hdoca_mgmt_cap_icm_quota_is_supported(dev_ctx) for the surface; doca_mgmt_cap_icm_quota_get_max_limit(dev_ctx, &max) for the upper bounddoca_mgmt_icm_quota handle; per-device or per-representor; _set_limit (in 4 KB granularity; DOCA_MGMT_ICM_QUOTA_LIMIT_UNLIMITED is UINT32_MAX); _get_current_allocation, _get_max_reached, _clear, _modify, _query
Configuration shape

Mandatory before any sub-domain operation: a doca_mgmt_dev_ctx on the target device (created from a doca_dev or a target string), and (for representor-targeted operations) a doca_mgmt_dev_rep_ctx on the target VF / function (created from a doca_dev_rep, a PCI address, or a target string). The sub-domain handle is a transient configuration carrier: create it, populate fields, apply via _set, then destroy. Persistent state lives on the device, not on the handle. The handle's _clear call is for re-use of the same handle across multiple fields; the handle's _destroy is the final teardown.

Version compatibility

For the canonical DOCA version-detection chain, the four-way match rule, NGC container semantics, and the headers-win-over- docs rule, see doca-version/SKILL.md. The body lives there; this skill does not duplicate it.

The doca-mgmt-specific overlay is:

  • Every public doca_mgmt_* symbol is currently tagged EXPERIMENTAL. The installed headers declare every doca_mgmt_* symbol DOCA_EXPERIMENTAL. The agent must surface this whenever it recommends a management symbol: the API can change shape between DOCA releases, and building a long-lived fleet-management tool against this surface requires explicit per-release re-verification (see TASKS.md ## test).

  • DOCA 3.5 added new public API functions and constants. The agent must treat these additions as part of the same EXPERIMENTAL surface and verify them against the installed headers before recommending them. The added functions are:

    doca_mgmt_cap_diagnostics_data_multi_domain_is_supported
    doca_mgmt_dev_ctx_create_from_target_string
    doca_mgmt_dev_rep_ctx_create_by_pci_addr
    doca_mgmt_dev_rep_ctx_create_from_target_string
    doca_mgmt_diagnostics_data_clear
    doca_mgmt_diagnostics_data_create
    doca_mgmt_diagnostics_data_destroy
    doca_mgmt_diagnostics_data_get_multi_domain
    doca_mgmt_diagnostics_data_modify_for_dev
    doca_mgmt_diagnostics_data_query_for_dev
    doca_mgmt_diagnostics_data_set_multi_domain
    doca_mgmt_raw_field_desc_list_free
    doca_mgmt_raw_field_list_free
    doca_mgmt_raw_hca_cap_describe
    doca_mgmt_raw_hca_cap_list
    doca_mgmt_raw_hca_cap_modify
    doca_mgmt_raw_hca_cap_query
    doca_mgmt_raw_hca_cap_query_all
    doca_mgmt_raw_register_describe
    doca_mgmt_raw_register_list
    doca_mgmt_raw_register_modify
    doca_mgmt_raw_register_query
    doca_mgmt_raw_register_query_all
    doca_mgmt_raw_str_list_free
    doca_mgmt_target_info_dev_create_list
    doca_mgmt_target_info_dev_destroy_list
    doca_mgmt_target_info_dev_get_ibdev_name
    doca_mgmt_target_info_dev_get_iface_name
    doca_mgmt_target_info_dev_get_native_port_num
    doca_mgmt_target_info_dev_get_pci_func_type
    doca_mgmt_target_info_dev_get_target_string
    doca_mgmt_target_info_dev_rep_create_list
    doca_mgmt_target_info_dev_rep_destroy_list
    doca_mgmt_target_info_dev_rep_get_controller_num
    doca_mgmt_target_info_dev_rep_get_iface_name
    doca_mgmt_target_info_dev_rep_get_pci_func_type
    doca_mgmt_target_info_dev_rep_get_pci_pf_type
    doca_mgmt_target_info_dev_rep_get_pf_index
    doca_mgmt_target_info_dev_rep_get_sf_index
    doca_mgmt_target_info_dev_rep_get_target_string
    doca_mgmt_target_info_dev_rep_get_vf_index
    doca_mgmt_target_info_dev_rep_get_vhca_id

    The added constants are:

    DOCA_MGMT_PCI_PF_TYPE_EXTERNAL_HOST
    DOCA_MGMT_PCI_PF_TYPE_SATELLITE
    DOCA_MGMT_RAW_FIELD_ACCESS_INDEX
    DOCA_MGMT_RAW_FIELD_ACCESS_OP
    DOCA_MGMT_RAW_FIELD_ACCESS_RO
    DOCA_MGMT_RAW_FIELD_ACCESS_RW
    DOCA_MGMT_RAW_FIELD_ACCESS_UNKNOWN
    DOCA_MGMT_RAW_FIELD_ACCESS_WO
    DOCA_MGMT_RAW_HCA_CAP_MODE_CUR
    DOCA_MGMT_RAW_HCA_CAP_MODE_MAX
    DOCA_MGMT_RAW_HCA_CAP_TARGET_TYPE_OTHER_FUNCTION_ID
    DOCA_MGMT_RAW_HCA_CAP_TARGET_TYPE_OTHER_VHCA_ID
    DOCA_MGMT_RAW_HCA_CAP_TARGET_TYPE_SELF
  • The runtime authority is the installed headers, not the public docs. Per the cross-cutting rule in doca-version CAPABILITIES.md ## Observability (doca-version/CAPABILITIES.md#observability), the agent confirms a symbol exists by checking the installed 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) before recommending it.

  • doca-mgmt.pc plus doca-common.pc must match doca_caps --version at the four-way-match check (per doca-version CAPABILITIES.md ## Version compatibility (doca-version/CAPABILITIES.md#version-compatibility)). Management-plane operations depend on the firmware version on the device matching the host-side library's expectations; a four-way-match failure is the first hypothesis when doca_mgmt_raw_cmd returns DOCA_ERROR_IO_FAILED for an opcode that the vendor docs say should work.

  • The closest public docs surface is the DOCA SDK index. The agent does not quote a specific docs URL for doca-mgmt from agent memory; instead it routes to the DOCA SDK index and through doca-public-knowledge-map/SKILL.md for the up-to-date URL pattern. Where a DOCA Management page is published, it is the authoritative source for current opcodes, scopes, and supported sub-domains; until the agent has verified it on docs.nvidia.com/doca/sdk/, the agent frames version-specific claims as "check against the installed headers and the release notes for your DOCA version".

Error taxonomy

The cross-library DOCA_ERROR_* taxonomy (what each family means and which debug layer it routes to) lives in doca-programming-guide CAPABILITIES.md ## Error taxonomy (doca-programming-guide/CAPABILITIES.md#error-taxonomy). The mgmt-specific overlay names the families the agent will see most often from doca_mgmt_* calls and what they specifically indicate:

FamilyMost common mgmt causeFirst action
DOCA_ERROR_INVALID_VALUEA handle / context pointer is NULL, a PCI address string is malformed for _create_by_pci_addr, or a _set_* field accessor got an out-of-range valueRe-walk the create/configure step in ## Capabilities and modes; PCI addresses use the "Domain:Bus:Device.Function" HEX format (e.g. "0000:3a:00.2")
DOCA_ERROR_NOT_SUPPORTEDThe sub-domain's _is_supported / device-cap check returned a failure, OR the installed DOCA version does not export the requested symbol, OR the device's firmware does not implement the operationRun the sub-domain's _is_supported against the active context; confirm the symbol is in the installed headers per ## Version compatibility; if both pass, the firmware is the gate
DOCA_ERROR_BAD_CONFIGA sub-domain _set was called on a handle with required fields unset (e.g. doca_mgmt_device_caps_general_set returns this when data_direct was not set before _set)Re-walk the sub-domain handle's field accessors; every field the _set requires must be populated via the matching _set_<field> before the apply call
DOCA_ERROR_IN_USEA sub-domain _set was called against a representor context that is already initialized for the same surfaceRe-read the surface's documented re-init rule; some sub-domains require a destroy-then-recreate cycle on the representor context to change fields
DOCA_ERROR_EMPTYA field accessor _get_* was called on a handle whose field was never set or whose value the device has not yet returnedThe agent surfaces this as a not-yet-queried condition, not as an error — call the matching _get against the context first
DOCA_ERROR_OPERATING_SYSTEMThe underlying fwctl RPC ioctl failed on the host sideThe host kernel's fwctl interface is not available, or the user does not have permission to issue it. Confirm root privileges; route to doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug) layer 5 (driver) for fwctl-side issues
DOCA_ERROR_IO_FAILEDThe fwctl RPC reached the firmware but the firmware rejected the commandThe firmware version, the device state, or the command opcode is wrong. Re-confirm the four-way version match per ## Version compatibility; confirm the opcode against the vendor docs; if both check out, route through doca-hardware-safety/SKILL.md for the device-state investigation
DOCA_ERROR_NO_MEMORYThe library could not allocate internal state during _createInspect host-side resource limits; this is rarely an application bug
DOCA_ERROR_DRIVERThe layer below DOCA (mlx5 driver, firmware path the management plane traverses) reported a failureStop. This is not an API-spec problem. Capture `dmesg

Quote doca_error_get_descr() verbatim — do not paraphrase. The cross-cutting debug ladder (doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug)) is the canonical layered diagnosis path that the agent escalates to once the mgmt-specific cause has been narrowed.

Observability

doca-mgmt's observability surface is point-in-time and request/response, not streaming. Three primary signals the agent should reach for:

  1. Pre-state capture before any write. Every sub-domain exposes a _get / _query symmetric to its _set / _modify; the pre-state is the baseline every rollback depends on. Without it, the agent cannot tell what was changed if the user wants to back out. This is the bundle- wide pre-flight inventory (doca-hardware-safety/CAPABILITIES.md#capabilities-and-modes) rule applied at the API surface.

  2. Post-write re-query. After every _set / _modify / _set_limit / raw_cmd write, the agent re-runs the matching _get / _query to confirm the device adopted the new state. "The call returned success" is not sufficient evidence; the device's reported state is.

  3. Capability snapshots at start of session. Every sub-domain's _is_supported and _get_max_* / _get result is a snapshot of what the device said was possible at the start. Save it as a baseline; if a later call fails with DOCA_ERROR_NOT_SUPPORTED the diff against this snapshot is the regression — either the firmware was reset between sessions or the device's representor was reconfigured.

For continuous observability (counters streamed over time, historical metrics), doca-mgmt is the wrong surface — that is doca-telemetry/SKILL.md. For cross-cutting observability primitives (--sdk-log-level, DOCA_LOG_LEVEL) see doca-debug CAPABILITIES.md ## Observability (doca-debug/CAPABILITIES.md#observability). For the install-tree observability (logger names, package layout) defer to doca-public-knowledge-map/SKILL.md.

Safety policy

Overlay on the bundle-wide hardware-safety meta-policy. The rules below are this skill's per-artifact overlay on the cross-cutting rules in doca-hardware-safety CAPABILITIES.md ## Safety policy (doca-hardware-safety/CAPABILITIES.md#safety-policy) (specifically ### Per-artifact overlay pattern (doca-hardware-safety/CAPABILITIES.md#per-artifact-overlay-pattern)). When the two layers disagree, the stricter wins; when either layer says STOP, the agent stops.

doca-mgmt is — alongside mlxconfig and BFB reflash — one of the primary surfaces through which an agent can modify device-level state programmatically. A wrong raw_cmd opcode, a wrong scope, or an unrollbackable write can leave a device in a state the operator cannot restore. Three policies follow from that:

  1. Pre-state-capture is a hard precondition for any write. The agent does NOT recommend any _set / _modify / _set_limit / raw_cmd-with-write-scope call — including doca_mgmt_raw_hca_cap_modify, doca_mgmt_raw_register_modify, and doca_mgmt_diagnostics_data_modify_for_dev — without first walking the matching _get / _query to capture the current state. The captured state is what the rollback path quotes; the agent does not invent rollback values from memory. This is the doca-hardware-safety pre-flight inventory (doca-hardware-safety/CAPABILITIES.md#capabilities-and-modes) rule applied at the API surface.

  2. Narrowest scope wins. When the user describes an operation, the agent picks the narrowest doca_mgmt_cmd_scope (or sub-domain wrapper) that satisfies it. Read-only operations go through DEBUG_READ_ONLY. Write operations that have a dedicated wrapper (caps-general, cc-global-status, diagnostics-data, icm-quota) go through that wrapper, NOT through raw_cmd. doca_mgmt_raw_hca_cap_modify and doca_mgmt_raw_register_modify are write-scope raw surfaces and require the same precondition gates as raw_cmd with write scope. raw_cmd with DEBUG_WRITE_FULL is the widest scope and requires the most precondition gates from the meta-policy — maintenance window, OOB access, replica-first validation, documented rollback.

  3. No documented rollback → refuse and escalate. Per doca-hardware-safety ## Safety policy (doca-hardware-safety/CAPABILITIES.md#safety-policy), any change for which the operator cannot describe a rollback path is refused and routed to the operator's change-control process. doca-mgmt is the surface where this refusal is enforced at the API call: the agent does not issue a write whose _get counterpart cannot reproduce the pre-write state.

For changes that touch hardware state below the doca-mgmt library itself — mlxconfig-class writes that bypass DOCA, NIC firmware burns, BlueField BFB reflash, host kernel boot parameter changes — the cross-cutting meta-policy in doca-hardware-safety/SKILL.md applies without modification. The agent walks the hardware-safety ladder first whenever the recommended change falls into any of those classes, then the doca-mgmt overlay above for the API-surface specifics.

Deferred topic boundaries

This skill scopes itself to the DOCA Management library. Adjacent topics the agent will get asked but should route elsewhere:

  • mlxconfig-class firmware-stored configuration outside the DOCA API — out of scope. The doca-mgmt surface and mlxconfig partially overlap (both can affect device configuration); for mlxconfig proper, route to the doca-hardware-safety/SKILL.md meta-policy and to the public Mellanox / NVIDIA firmware tools documentation reachable through doca-public-knowledge-map/SKILL.md.

  • Live telemetry streaming — owned by doca-telemetry/SKILL.md and doca-telemetry-exporter/SKILL.md.

  • Read-only capability snapshots from a CLI — owned by doca-caps/SKILL.md.

  • Programmable congestion control — owned by doca-pcc/SKILL.md and doca-pcc-counters/SKILL.md. doca-mgmt's doca_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.

  • Cross-library DOCA_ERROR_* taxonomy — owned by doca-programming-guide CAPABILITIES.md ## Error taxonomy (doca-programming-guide/CAPABILITIES.md#error-taxonomy). This skill adds the mgmt overlay, not the taxonomy itself.

  • Cross-cutting hardware-state change discipline — owned by doca-hardware-safety/SKILL.md. This skill's safety overlay cross-links the meta-policy; it does not redefine the rules.

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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-mgmt.zip