doca-mgmt

Guides DOCA Management C API programming for BlueField and ConnectX device administration.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill doca-mgmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doca-mgmt
Source: https://github.com/NVIDIA/skills/tree/main/skills/doca-mgmt
Command: npx skills add https://github.com/NVIDIA/skills --skill doca-mgmt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers building fleet-management or device-administration tools against NVIDIA BlueField DPUs and ConnectX NICs need to query and modify device-level state programmatically, but the DOCA Management API surface is EXPERIMENTAL, safety-critical, and easy to misuse — a wrong raw-command scope or an unrollbackable write can leave a device in an unrecoverable state.

Core Features & Use Cases

  • Management context workflows: Step-by-step guidance for standing up doca_mgmt_dev_ctx and doca_mgmt_dev_rep_ctx contexts, probing sub-domain capability gates, and applying the correct lifecycle ordering.
  • Safe device-state modification: An apply-with-rollback discipline for caps-general, congestion-control, diagnostics-data, and ICM-quota writes, including pre-state capture, narrowest-scope selection for doca_mgmt_raw_cmd, and post-write re-query verification.
  • Error diagnosis: A doca-mgmt overlay on the DOCA_ERROR_* taxonomy that maps failures like DOCA_ERROR_IO_FAILED and DOCA_ERROR_OPERATING_SYSTEM to configuration, fwctl, firmware, or driver layers.
  • Use Case: A fleet tool walks every BlueField in a data center, reads each device's data-direct capability, toggles it on a VF representor, and rolls back safely if the post-write state diverges from intent.

Quick Start

Ask your agent to walk you through opening a doca_mgmt_dev_ctx on a BlueField device and querying its general capabilities with the doca-mgmt skill.

Frequently Asked Questions about doca-mgmt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query BlueField device capabilities with the DOCA Management API?

Create a doca_mgmt_dev_ctx on the device, optionally a doca_mgmt_dev_rep_ctx for a representor, then call doca_mgmt_device_caps_general_get on a transient caps-general handle. Always run the sub-domain capability gate first and treat DOCA_ERROR_NOT_SUPPORTED as the not-supported signal.

When should I use doca-mgmt instead of doca-telemetry or doca_caps?

Use doca-mgmt for programmatic point-in-time queries and modifications of device state from C code. Choose doca-telemetry for continuous streaming metrics, doca_caps for interactive read-only CLI snapshots, and doca-bench for throughput or latency measurement.

Which doca_mgmt_raw_cmd scope should I use for a firmware command?

Pick the narrowest scope that satisfies the operation: DEBUG_READ_ONLY for read-only queries, CONFIGURATION for persistent device-visible writes, and DEBUG_WRITE or DEBUG_WRITE_FULL for firmware-side mutation. Prefer a dedicated sub-domain wrapper over raw_cmd whenever one exists.

Why does doca_mgmt_raw_cmd return DOCA_ERROR_IO_FAILED?

DOCA_ERROR_IO_FAILED means the fwctl ioctl reached the firmware but the firmware rejected the command. Re-confirm the four-way version match between pkg-config, doca_caps, and the install tree, verify the opcode against vendor documentation, then investigate device state if both pass.

Does the DOCA Management API require root privileges?

Yes, most management-plane operations require root or an equivalent device-administration capability set, plus a host kernel exposing the /dev/fwctl character device. A DOCA_ERROR_OPERATING_SYSTEM on a non-root invocation is almost always a privilege gate.

Is the doca-mgmt API stable across DOCA releases?

No, every public doca_mgmt_* symbol is tagged EXPERIMENTAL under the DOCA_3 version bucket, so the API shape can change between releases. Re-run the full test workflow against each new DOCA install and verify symbols against the installed headers, not documentation memory.