Generated banner for Doca Hardware Safety
Generated logo for Doca Hardware Safety

Doca Hardware Safety

NVIDIAOfficialCreated by NVIDIA

  • Skill
  • Guidelines
  • Software development
  • Apache-2.0
  • Medium risk

From the author

Use this skill whenever the agent is about to recommend or apply a change that touches DPU / NIC hardware state on a live system — mlxconfig firmware-parameter write, NIC firmware burn, BFB reflash, NIC ↔ DPU mode flip, SR-IOV or device-emulation slot enable, kernel boot-parameter change (IOMMU, hugepages, VFIO), PCIe rebind / rescan / link-state flip, BlueField cold reboot, or remediation of a BlueField thermal shutdown. Wrap the change in pre-flight inventory, OOB reachability, a maintenance window, replica rehearsal, and rollback. Trigger on implicit phrasing: "flip BlueField mode over SSH", "enable SR-IOV and reboot", "burned firmware but mlxconfig shows old value", "BlueField thermal shutdown". Not for read-only inventory or version queries (doca-version, doca-caps). Refuse orientation (doca-public-knowledge-map), install or env debug (doca-setup), and program-side debug (doca-debug, doca-programming-guide).
— the description by NVIDIA

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a critical safety meta-policy for any operation that modifies DPU or NIC hardware state on live systems. It mandates a rigorous change-application discipline, including pre-flight inventory, verified out-of-band access, maintenance windows, and mandatory replica rehearsal. It is designed to prevent catastrophic failures such as bricked links or unrecoverable management loss during firmware updates, mode flips, or kernel parameter changes.

What it does

  • Defines a mandatory safety contract for hardware-touching operations.
  • Requires pre-flight inventory and out-of-band reachability verification.
  • Enforces a replica-first testing requirement for all production changes.
  • Provides a structured rollback ladder for failed operations.
  • Establishes strict refuse-and-escalate rules for high-risk scenarios.
  • Integrates with per-artifact safety policies across the DOCA bundle.

When to use it

  • When planning firmware updates, BFB reflashes, or mlxconfig parameter writes.
  • When changing host kernel boot parameters like IOMMU or hugepages.
  • When performing PCIe rebinds, rescan operations, or link-state flips.
  • When managing BlueField cold reboots or thermal shutdown remediations.
  • When enabling SR-IOV or device-emulation slots on a live system.

Advantages

  • Prevents unrecoverable hardware states by mandating OOB access.
  • Ensures production stability through mandatory replica rehearsal.
  • Standardizes the safety procedure across all hardware-touching tools.
  • Provides clear exit criteria for when to stop and escalate to support.
  • Reduces human error in complex DPU/NIC configuration tasks.

Usage examples

“Enable SR-IOV and reboot the BlueField DPU.”
The agent triggers the safety overlay, requiring a pre-flight inventory, confirmation of an OOB console path, a scheduled maintenance window, and proof of successful rehearsal on a replica.
“Flip BlueField mode over SSH.”
The agent checks for OOB access; if unavailable, it refuses the request to prevent a permanent loss of connectivity, citing the link-breaking nature of the change.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/doca-hardware-safety/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip doca-hardware-safety.zip -d .agents/skills

Documentation by NVIDIA

DOCA hardware safety

Examples

  • "Enable SR-IOV and reboot." — this is in scope. Inventory first, require out-of-band reachability, a maintenance window, replica rehearsal, then apply.

  • "Flip BlueField mode over SSH." — refuse if the host has no out-of-band path. A link-breaking change without BMC / RShim / console is a hard stop.

Quick answers (answer from this file)

  • Thermal shutdown or hardware safety limits. Treat it as a hardware event: capture read-only evidence first (BMC/Redfish chassis thermal sensors and event log, the out-of-band console, dmesg | grep -i mlx5, and mget_temp -d <mst device> from MFT). Never disable or raise thermal protection; airflow and cooling are facility fixes. Any remediation that is a firmware update, an mlxconfig write or a cold power cycle goes through the contract below; with no root cause or no rollback, refuse and escalate to NVIDIA support.

  • Read-only inventory or version questions do not need this skill: name doca-version (four-source chain) or doca-caps (doca_caps --list-devs) and answer there.

  • Name sibling skills (doca-version, doca-setup, doca-structured-tools-contract) when they apply; do not open them to answer a safety question.

Instructions

Follow Loading order below. Open the tasks companion before applying a hardware-touching change. Open the capabilities companion for the in-scope change class and refuse-and-escalate rules. Do not open every companion file.

Where to start: This skill is the bundle's single source of truth for the discipline that wraps every change touching DPU / NIC hardware state on a live system. Open the tasks companion when the operator is about to apply a hardware-touching change and needs the change-application discipline (pre-flight inventory → out-of-band path → window → apply → verify → rollback). Open the capabilities companion when the question is what does hardware-safety even cover (the class of changes in scope, the failure modes the policy prevents, the observability surface that gates a change, and the meta-policy that every per-artifact ## Safety policy overlays).

Every per-artifact skill (services, libraries, tools) in the bundle that recommends a hardware-touching action overlays this meta-policy with artifact-specific safety. The per-artifact ## Safety policy anchors do NOT redefine the cross-cutting discipline — they layer the artifact's own concerns on top of it. This skill is the layer they all build on.

Mandatory answer contract for an mlxconfig-class production change

An answer about applying an mlxconfig-class write on production MUST state every gate below explicitly; links to companion files do not substitute for walking the gates:

  1. Name the change class before any apply step and state that its firmware-stored value commits at the next cold power cycle, not a warm reboot.

  2. Require a pre-flight capture of PCIe topology, link state, firmware level, BFB level, the current mlxconfig configuration, and the host kernel/modules/environment.

  3. Treat the change as potentially link-breaking and refuse to issue it until a deployment-specific OOB console class is named and proven reachable. Never describe an mlxconfig-class production write as inherently non-link-breaking.

  4. Require a time-boxed maintenance window with stakeholders, rollback decision point, rollback plan, and verification gate documented before application.

  5. Rehearse both the forward change and the rollback on a matching non-production replica before production.

  6. Keep production workload gated until the four-way version match, per-artifact health metric, and end-to-end observability path all pass.

  7. Name the rollback ladder: compare with the captured baseline → restore the captured values → cold-power-cycle → repeat inventory and four-way checks → route residual software symptoms to doca-debug.

  8. Include an explicit refusal and escalation statement in the answer: if no documented rollback exists, the captured baseline cannot be restored, or OOB access is unavailable for a potentially link-breaking change, stop and refuse to proceed. Escalate to the operator's change-control process, vendor support, or the public DOCA Developer Forum; never guess at recovery. Merely naming a "refuse-and-escalate rule" without stating this action and route does not satisfy the contract. Never invent a parameter, address, version, endpoint, or recovery value.

The replica gate is required, never merely recommended: say that production is blocked until both the forward change and its rollback have succeeded on the representative replica. Wording such as "recommended", "highly recommended", or "if available" violates this contract even when a replica is mentioned elsewhere in the answer.

The same framing applies to firmware burn, BFB reflash, and host boot-parameter changes; only their documented commit action, class-specific preconditions, and rollback mechanism differ.

When to load this skill

Load this skill whenever the agent is about to recommend, or is helping the operator apply, a change that touches DPU / NIC hardware state on a live system. The decision must be made before the agent composes its first sentence — the activation checklist below is the same one referenced from AGENTS.md ## Cross-cutting overlay activation triggers (bundle AGENTS.md#cross-cutting-overlay-activation-triggers), mirrored here so a per-artifact skill that already loaded this skill has the activation rule at hand.

Agent activation checklist — load this skill at the START of the answer when any cell below is true

Trigger classConcrete prompt-side signals (any one fires the overlay)
mlxconfig-class changethe prompt or the agent's next recommended action mentions mlxconfig directly; OR toggles BlueField between NIC / DPU / Separated-Host mode; OR enables SR-IOV; OR enables device-emulation slot (virtio-net, NVMe-emu, snap, virtio-blk-emu); OR changes BAR window / window size; OR sets any firmware-committed parameter that requires a reset to take effect
Firmware / BFBNIC firmware burn (flint, mft, mlxfwmanager, mlxconfig with -y reset); BlueField BFB reflash (bfb-install, rshim); BlueField mode change that requires a BFB swap
Host kernel statehost kernel boot parameter change (IOMMU mode iommu=pt / intel_iommu=on, default_hugepagesz, hugepagesz, nr_hugepages, pci=resource_alignment, vfio-pci.ids); requires host reboot
Hugepageshugepage reservation change (/sys/kernel/mm/hugepages/*/nr_hugepages, sysctl vm.nr_hugepages); hugepage mount change (mount -t hugetlbfs); this is global state shared with every DOCA / DPDK process on the host
PCIe statePCIe rebind / echo > /sys/bus/pci/.../{bind,unbind,remove,rescan}; representor enable/disable; eswitch mode change (devlink dev eswitch set ... mode {switchdev,legacy}); link down/up on a port currently carrying traffic
BlueField reboot classBlueField cold reboot, BlueField warm reboot to apply mlxconfig; opening any RShim node other than misc (even cat /dev/rshimN/boot starts a boot cycle and resets the BlueField; read only /dev/rshimN/misc); any change whose blast radius is "every hosted service on this DPU restarts"
Per-artifact cross-linkany per-artifact skill's ## Safety policy cross-links here for the cross-cutting rule body

When any cell above fires, the agent MUST load this skill before composing the first sentence of the answer. For production it MUST walk the change-application discipline in this order:

configure (plan) →

## test (representative replica change + rollback rehearsal) → ## modify (production apply) → ## run (production verification) → ## debug (debug / rollback). It MUST cite the activation explicitly in the answer (e.g. "because this touches mlxconfig, the answer follows the doca-hardware-safety discipline …") so the user can audit the reasoning.

The activation is mandatory, not advisory. The most common failure mode this overlay prevents is "the agent recommended a mlxconfig change with no maintenance window, no out-of-band path, and no rollback statement, the user applied it, the management link dropped, and the box was unrecoverable without a physical console." The cost of one unjustified activation (a few extra paragraphs in the answer) is trivial compared to the cost of one missed activation.

Refuse-and-escalate is a hard rule

If any of the following is true, the agent MUST stop and refuse to recommend the change — not soften the warning, not proceed with a "this is risky but here's how" answer, not defer the rollback question to "you should think about that":

  1. The change has no documented rollback path AND the user cannot provide one. (Per ## Safety policy rollback-must-be-documented rule.)

  2. The change is link-breaking AND the host has no out-of-band access path. (Per ## Safety policy out-of-band-precondition rule.)

  3. The change touches hardware state AND the user has not confirmed an explicit, time-boxed maintenance window. (Per

    Safety policy

    maintenance-window rule.)

  4. Production application is contemplated before the change and its rollback have passed on a representative non-prod replica. This refusal is intent-based: it applies to a plan, recommendation, or next action that would reach production early, not only when the user explicitly asks for "direct application." A replica mismatched on the required hardware, firmware, kernel, module, or function-topology axes does not satisfy the gate; obtain a representative replica or refuse and escalate. (Per

    test replica-first rule.)

In each of these cases the correct answer shape is "this change requires X (here is why); the bundle refuses to recommend it without X; here is the route to obtain X" — not silence and not improvisation. The refuse-and-escalate rule is what makes the bundle's hardware-safety guidance trustworthy to production operators.

Do not load this skill for general DOCA orientation (use doca-public-knowledge-map/SKILL.md), for first-time install or env-class debug (use doca-setup/SKILL.md), or for purely program-side debug that does not touch hardware state (use doca-debug/SKILL.md or doca-programming-guide/SKILL.md).

What this skill provides

This is a thin loader. The body keeps only the orientation needed to pick the right next file. The substantive content lives in two companion files:

  • the capabilities companion — the meta-policy surface: the class of changes in scope (the pre-flight inventory taxonomy, the mlxconfig-class / firmware-burn / kernel-boot-parameter groupings), the cross-cutting safety policy that every per-artifact ## Safety policy overlays, the failure modes the policy prevents (bricked-link, runaway-burn, silent-mode-change, missing-rollback), the observability gate the operator must satisfy before any workload moves, and the thin version-compatibility overlay that redirects to doca-version/SKILL.md.

  • the tasks companion — the change-application workflows: ## configure (the pre-flight inventory + out-of-band + maintenance-window plan), ## build (routing stub — hardware-touching changes do not produce build artifacts), ## modify (the apply-the-change discipline, including the mlxconfig cold-power-cycle rule and the firmware-burn discipline), ## run (the post-change verification gate), ## test (the replica-first smoke), ## debug (the rollback ladder + the refuse-and-escalate escape valve), and the ## Deferred task verbs block.

Loading order

  1. Read this skill first to confirm the user's question is in scope (the agent is about to recommend a change that touches hardware state on a live system).

  2. For the class of changes in scope, the meta-safety policy, the failure-mode taxonomy, the observability gate, and the version-overlay redirect, see the capabilities companion.

  3. For the apply-a-change workflow — pre-flight inventory → out-of-band → maintenance window → apply → verify → rollback — see the tasks companion.

  4. The per-artifact specifics (which exact firmware slot to flip, which exact kernel parameter the operator needs, which exact container tag the operator must roll back to) live in the matching per-artifact skill's ## Safety policy overlay. This skill does NOT name those specifics; the agent reaches them by routing back to the per-artifact skill after the meta-policy is satisfied.

  • doca-version/SKILL.md — the four-way match rule and the host ↔ BlueField BFB ↔ container-tag pairing. Every hardware-touching change has a version dimension; this skill's ## Version compatibility overlay is a 3-5 line redirect to doca-version for the body.

  • doca-setup/SKILL.md — env-class checks that precondition a hardware-touching change (hugepages, IOMMU mode, pkg-config, representor visibility). The pre-flight inventory in this skill's ## configure cross-links to doca-setup for the env-class half of the inventory.

  • doca-debug/SKILL.md — the cross-cutting layered debug ladder. When a hardware-touching change goes wrong, the rollback ladder in this skill's ## debug hands off to doca-debug once the rollback has restored a known state and the symptom now lives at a software layer.

  • doca-structured-tools-contract/SKILL.md — the JSON schemas the agent prefers when present. The collect-host-state / collect-dpu-state schemas are the structured form of this skill's pre-flight inventory; the agent uses them as the one-shot answer when the host has the helpers installed.

  • doca-container-deployment/SKILL.md — the canonical container-deployment recipe shared across DOCA services. Several hardware-touching changes (BlueField cold reboot, BFB reflash) interrupt every hosted service container on the BlueField; the rollback path quotes the doca-container-deployment re-deploy shape.

  • doca-programming-guide/SKILL.md — program-side preconditions (capability discovery, validate-before-commit). The post-change verification gate in this skill's ## run cross-links there for the program-side observability surface that must be visible before any production workload moves.

  • Per-artifact ## Safety policy anchors in each in-bundle service / library / tool skill — e.g. the firmware-slot precondition in doca-argus/SKILL.md, doca-dms/SKILL.md, doca-firefly/SKILL.md, doca-urom-svc/SKILL.md; the device-touching libraries (doca-flow/SKILL.md, doca-rdma/SKILL.md, doca-eth/SKILL.md, doca-pcc/SKILL.md, doca-rmax/SKILL.md); and the hardware-touching tools (e.g. doca-spcx-cc/SKILL.md, doca-pcc-counters/SKILL.md). Every in-bundle artifact skill's ## Safety policy overlays this meta-policy with artifact-specific safety. The cross-link is intentionally bidirectional: per-artifact skills link here for the meta-policy; this skill enumerates the in-bundle overlays in

    Safety policy

    as "skills that overlay this meta-policy". The externally- productized analogs (doca-virtio-net, doca-snap, doca-hbn, BlueMan, DPF) are NOT in-bundle skills — their safety policies live in product documentation reached through doca-public-knowledge-map ## Externally-productized DOCA software (doca-public-knowledge-map/SKILL.md#externally-productized-doca-software--not-in-this-bundle-but-here-is-where-to-route).

Files

CAPABILITIES.md

DOCA hardware safety — capabilities, version compatibility, errors, observability, safety

Where to start: This file is the meta-policy surface. Pick the H2 anchor that matches the question (what changes are in scope / how version pairing factors in / which failure modes the policy prevents / what the observability gate looks like / what the cross-cutting safety meta-policy is) and read that section end-to-end. The tables in each section are the load-bearing content; the prose is interpretation.

Read this file when the loader sent you here from SKILL.md. For the how of executing the change-application discipline, jump to TASKS.md. For the JSON schemas of the structured helpers the agent prefers when present, see doca-structured-tools-contract/SKILL.md.

Pattern overview

Every hardware-safety question this skill teaches resolves into one of SIX patterns. The patterns are CLASSES — they apply across every DOCA release, every BlueField generation, and every hardware-touching change the per-artifact skills recommend.

Hardware-safety patternClass shapeWhere the substance lives
1. Identify the change classMap the recommended action (firmware-slot write, mode flip, BFB reflash, kernel-boot-parameter change, link state change, PCIe rescan, BlueField cold reboot) to its in-scope change class## Capabilities and modes change-class table
2. Take the pre-flight inventoryCapture the as-deployed PCIe topology, link state, firmware level, BFB level, and config snapshot BEFORE any change, so rollback is even possible## Capabilities and modes inventory taxonomy + TASKS.md ## configure
3. Establish out-of-band accessWhen the change can break the link the operator is managing the BlueField over, require an out-of-band path BEFORE the change is issued; refuse otherwise## Safety policy out-of-band rule + TASKS.md ## configure
4. Frame the maintenance windowEvery hardware-touching change runs inside an explicit, time-boxed maintenance window with ops notified; the agent does not silently apply during business hours## Safety policy maintenance-window rule
5. Apply, verify, observeApply the change with the right post-change action (cold power cycle for mlxconfig-class, host reboot for kernel boot parameters, BlueField cold reboot for BFB reflash), then verify against the captured baseline before any workload moves back## Observability post-change gate + TASKS.md ## modify + TASKS.md ## run
6. Roll back or escalateEvery change has a documented, rehearsed rollback path; changes without a documented rollback are refused and escalated rather than guessed## Safety policy rollback rule + TASKS.md ## debug

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

  • Pre-flight inventory is a hard prerequisite. Rollback is only possible against a captured baseline. The agent does not begin any hardware-touching change before the inventory in ## Capabilities and modes is recorded for the session, regardless of how small the change appears.

  • No documented rollback → refuse and escalate. The class-shape escape valve in ## Safety policy. Changes that the operator cannot describe a rollback for are not applied through this skill's discipline; the agent surfaces the missing rollback as the blocking issue and routes to the operator's change-control process.

Capabilities and modes

The class of changes in scope

This skill governs the change-application discipline for the following classes of action. The class names are the load-bearing piece; specific parameter names, version literals, PCI addresses, or kernel-command literals are not in scope and never appear in this skill — they live in the matching per-artifact skill or in the operator's own runbook.

Change classWhat it touchesWhy this skill governs it
mlxconfig-class firmware-level parameter writeFirmware-stored configuration on the NIC / DPU (BAR window, BlueField NIC ↔ DPU mode toggle, SR-IOV count, device-emulation slot enablement).Writes are committed at next cold power cycle; the link layer, PCIe surface, and host-visible function set can all shift on the next boot. The agent must surface this so the operator does not assume a warm reboot is enough.
NIC firmware burnThe NIC's firmware image.Interrupts every device function on the NIC during the burn; an interruption mid-burn is the canonical bricking failure mode.
BlueField BFB reflashThe BlueField's OS image and DOCA install.Every BlueField-hosted service container is removed; the host's view of the BlueField PCIe surface may change; the BFB-side version anchor moves.
BlueField mode flip (NIC ↔ DPU)The BlueField's operating personality.The host-visible representor topology, the DOCA install side that owns the dataplane, and the management surface all change shape.
Kernel boot parameter change (IOMMU mode, hugepages, device pass-through)The host kernel's boot configuration.Takes effect at host reboot, not at runtime. An installed runtime helper alone cannot make up for the wrong IOMMU mode or insufficient hugepages reserved at boot.
PCIe link state down / up, PCIe rescan, function rebindThe PCIe surface a workload is currently using.The workload's PCIe function disappears mid-flight; representors backed by the function go away; in-flight queues stall or fail.
BlueField cold rebootEverything the BlueField hosts.Every container and service on the BlueField restarts; host workloads that depend on the DPU are interrupted. Often the necessary post-change step for the classes above.

The agent's rule: identify which class the recommended next step falls into BEFORE issuing the change. The per-artifact skill names the action; this skill names the discipline that wraps it.

Pre-flight inventory taxonomy

The pre-flight inventory is the captured baseline every rollback depends on. The taxonomy is also a CLASS — specific commands belong in the operator's runbook, not in this skill.

Inventory dimensionWhat to captureWhy it is load-bearing for rollback
PCIe topologyThe current set of PFs, VFs, SFs, and representors as DOCA sees them, with their PCIe addresses and stateA change that moves the PCIe surface (mode flip, BAR change, BFB reflash) must reproduce the topology on the other side; without the baseline, the operator cannot tell what was lost
Link statePer-port link up/down state and link speedA change that drops a port flips the same field; the as-deployed state names what should come back
Running firmware levelThe firmware version the NIC / DPU is running before the changeA firmware burn rolls forward this anchor; the rollback path is to reflash the prior level, which the agent cannot name without the baseline
BFB level (BlueField only)The DOCA BFB version on the BlueField sideA BFB reflash moves this anchor; the rollback is to reflash the prior BFB, which the agent cannot name without the baseline
Configuration snapshotThe current mlxconfig-class parameters and any per-artifact service config the change is about to touchA change to firmware-stored config rolls forward this anchor; the rollback path is to write the prior values, which the agent cannot reconstruct without the baseline
Host-side env snapshotThe host's kernel command line (IOMMU mode, hugepage reservations), the loaded mlx5_* modules, and the host kernel versionA kernel-boot-parameter change rolls forward this anchor; the rollback path is to revert the boot configuration to the captured baseline

For the structured one-shot form of this inventory, see the collect-host-state and collect-dpu-state schemas in doca-structured-tools-contract/SKILL.md; the agent prefers the structured tool when present and falls back to the manual chain documented there otherwise.

Out-of-band access classes

Several change classes can break the link the operator is using to manage the BlueField. For those, the agent requires an out-of-band (OOB) management path to be in place BEFORE the change is issued. The specific OOB endpoints (which BMC IP, which TTY device) are operator- specific and never invented by the agent — the load-bearing piece is the class.

OOB classWhen this OOB class is appropriateOperator responsibility
BMC serial consoleA BMC is present on the host or the BlueField management board and exposes a serial console the operator can reach independently of the data-plane linkThe operator knows the BMC's reachable address (or local KVM path) and has confirmed access before the change
RShim USB / RShim-over-PCIe consoleThe operator has physical or PCIe-level access to the BlueField's RShim management interfaceThe operator has confirmed RShim is reachable and the console is responsive before the change
Operator-managed console (KVM, terminal server, OCC-attached console)The deployment includes a dedicated console path the operator controlsThe operator names the path and has confirmed it works before the change

The agent's rule: when the recommended change is in the link- breaking class (mode flip, BAR change, port reassignment, BFB reflash, NIC mode change), refuse to issue it until the operator names which OOB class is in place. "I'll just do it over SSH" is the canonical failure mode; the change drops the SSH session and the operator cannot recover.

Apply / verify / observe shape

Each change class has a documented commit action. The class shapes:

Change classCommit actionWhat "applied" means
mlxconfig-class parameter writeCold power cycle of the NIC / DPU (full A/C power removal)A warm reboot does NOT commit firmware-stored configuration. The agent does not declare the change applied after a warm reboot.
NIC firmware burnThe burn tool's documented completion handshake plus a power cycle if the tool requires itThe agent quotes the tool's own documented completion criterion; never invents a "looks done" judgment from log noise.
BFB reflashThe BFB's documented post-flash boot + BlueField cold rebootThe BlueField comes up on the new BFB; every hosted service container has to be re-deployed per doca-container-deployment ## run (doca-container-deployment/TASKS.md#run).
BlueField mode flipCold power cycle + post-reboot verification of the new personality (per the matching per-artifact skill)Confirm the host-visible representor topology matches the post-flip plan before any workload moves.
Kernel boot parameter changeA host reboot. An installed DOCA runtime helper alone does NOT make up for a wrong IOMMU mode or for hugepages that were not reserved at boot.The agent does not promise that a host-side runtime helper substitutes for the boot-time parameter. Cross-link to doca-setup/SKILL.md for env-class verification of the post-reboot state.
Link state down / up, PCIe rescanThe operator's documented procedure for the affected functionThe agent surfaces that any workload currently using the function will see the function disappear; the verification gate is that the function comes back in the expected state.
Replica-first validation

Every hardware-touching change is first applied on a non-prod replica with the same hardware class (same BlueField generation, same firmware band, same host kernel). The smoke test from the per- artifact skill runs on the replica before the production change. The agent does not skip the replica step "because this is a small change" — the replica is the cheapest signal that the change does what the operator expects on the actual hardware class, and it is the last opportunity to discover that the rollback path does not work before production is exposed to that risk.

The replica's hardware class must match production on:

  • The BlueField generation (per doca-version/SKILL.md, the BFB anchor must be in the same compatibility band).

  • The running firmware level on the NIC / DPU.

  • The host kernel version and the loaded mlx5_* modules.

  • The set of representors / VFs / SFs that the change touches.

Differences against production along any of those axes mean the replica is not a representative test of the change, and its result does not satisfy the production gate. Obtain a representative replica; if one cannot be obtained, refuse the production change and escalate through change control. Do not downgrade a mismatched result to merely advisory and then proceed.

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 hardware-safety overlay is:

  • Every hardware-touching change has a version dimension. A firmware burn moves the running firmware level; a BFB reflash moves the BlueField BFB version; an mlxconfig-class write changes firmware-stored configuration that the BFB and the host packages jointly interpret. The pre-flight inventory captures every version anchor named by doca-version's four-way match plus the firmware level and the BFB level, so the rollback path can quote them.

  • The version anchor is jointly bound by host package, BFB, firmware, and (when applicable) the per-artifact container tag. After the change, the agent re-runs the four-way match per doca-version TASKS.md ## test (doca-version/TASKS.md#test); a change that leaves the four-way match in a partial state is a failed change and the rollback path applies.

  • Never quote a firmware version, BFB version, or DOCA version literal from agent memory. The version handling rules in doca-version CAPABILITIES.md ## Safety policy (doca-version/CAPABILITIES.md#safety-policy) apply here without modification; the agent quotes the version observed from the operator's host, not from agent memory or from a public docs URL.

Error taxonomy

The hardware-safety surface is anti-bricking, anti-silent-mismatch, anti-discovered-during-failure-rollback. The failure modes below are what the meta-policy exists to prevent. Each row pairs a failure mode with the policy rule that prevents it.

Failure modeClass shapePolicy rule that prevents it
Bricked link (the change drops the management link and the operator cannot recover)A link-breaking change was applied without an out-of-band pathThe OOB-precondition rule in ## Safety policy and the OOB classes in ## Capabilities and modes
Runaway firmware burn (a burn is interrupted mid-flight; the device is left in an indeterminate state)A firmware burn ran outside a documented maintenance window, or against a host that lost power continuityThe maintenance-window rule + the firmware-burn precondition list in ## Safety policy and TASKS.md ## modify
Silent mode change (an mlxconfig write happens; a warm reboot occurs; the agent declares the change applied; the firmware-stored configuration in fact did not commit)The operator was not told that mlxconfig-class writes commit at cold power cycle, not at warm rebootThe mlxconfig-class commit-action row in ## Capabilities and modes and the apply-with-cold-power-cycle workflow in TASKS.md ## modify
Missing rollback (the change is applied; it fails; the operator and the agent cannot agree on what state the system is supposed to revert to)The pre-flight inventory was not captured, OR the change was applied without a documented rollback pathThe pre-flight inventory rule + the rollback-must-be-documented rule in ## Safety policy
Discovered-during-failure rollback (the rollback path is invented mid-incident; the invented rollback does not work)The rollback was not rehearsed on the replica before production was exposed to the changeThe replica-first rule in ## Capabilities and modes and the replica-smoke step in TASKS.md ## test
IOMMU / hugepages drift (host-side runtime helper is installed; the operator believes the env is configured; the change still fails because the IOMMU mode or hugepage reservation is wrong at boot)A kernel-boot-parameter change was treated as if a runtime helper could substitute for itThe kernel-boot-parameter commit-action row in ## Capabilities and modes; cross-link to doca-setup/SKILL.md for env-class verification
Version regression (the change is applied; the four-way match no longer holds; the agent does not notice because no post-change verification ran)The post-change verification gate in ## Observability was skippedThe verification-before-workload rule in ## Safety policy and the post-change four-way match in TASKS.md ## run
Workload-during-burn (a firmware burn or BFB reflash is started while real traffic is on the wire; the burn interrupts the workload, or the workload interrupts the burn)The do-not-interrupt rule was not surfacedThe firmware-burn precondition list in ## Safety policy

For DOCA-program-level errors that surface AFTER the rollback has restored a known state (e.g. DOCA_ERROR_DRIVER, DOCA_ERROR_NOT_SUPPORTED), hand off to doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug) — the hardware-safety ladder owns the change-application discipline; the program-side debug ladder owns what comes after.

Observability

The hardware-safety observability surface is the set of signals the operator must be watching before, during, and after a hardware- touching change. The signals are CLASSES — specific command names belong in the operator's runbook or in the per-artifact skill's ## Observability overlay.

PhaseSignal classWhat it tells the operator
Pre-changePre-flight inventory (PCIe topology + link state + firmware level + BFB level + config snapshot + host-side env snapshot)The captured baseline every later check is compared against. Without this, the agent cannot detect a regression after the change.
Pre-changeOut-of-band reachability (the OOB class identified in ## Capabilities and modes is confirmed responsive)The recovery path is in place before the operator issues a link-breaking change.
Pre-changeWorkload state (is the affected NIC / DPU / port currently carrying traffic? Are workloads using representors on the affected function?)The set of workloads that need to be drained or scheduled around the change.
During changeThe commit tool's own output (firmware burn progress, BFB reflash progress, mlxconfig apply confirmation)The documented signal of the change's progress. The agent quotes the tool's documented signal verbatim and never paraphrases it as "looks done".
Post-changeRe-captured inventory (the same set of signals as pre-flight)Did the change land as expected? Specifically, did the PCIe topology / link state / firmware level / BFB level move to the post-change values the plan named?
Post-changePost-change four-way match (per doca-version TASKS.md ## test (doca-version/TASKS.md#test))Is the install consistent on the new state? A change that breaks the four-way match is a failed change.
Post-changePer-artifact health metric (the smoke test from the matching per-artifact skill)Did the artifact this change was made for actually come back to a healthy state on its own observability surface?
Pre-workloadObservability path proven end-to-end (logs visible, counters readable, dmesg readable, container / service stdout reachable)Can the operator see what the workload is doing once it moves? The agent does not declare the deployment "ready" until this gate passes.

For the env-side observability primitives (PCIe scans, link introspection, kernel-module presence), see doca-setup CAPABILITIES.md ## Observability (doca-setup/CAPABILITIES.md#observability). For the program-side cross-library observability (--sdk-log-level, the doca-<lib>-trace build flavor, DOCA_LOG_LEVEL), see doca-debug CAPABILITIES.md ## Observability (doca-debug/CAPABILITIES.md#observability). This skill names the gates; the named skills carry the surface itself.

Safety policy

This skill defines the cross-cutting hardware-safety meta-policy that every per-artifact ## Safety policy overlays. The rules below apply to every hardware-touching change in the bundle. Per-artifact skills layer artifact-specific safety on top; they do not redefine the meta-policy.

Cross-cutting rules
  • Inventory before any change. Capture the pre-flight inventory per ## Capabilities and modes before issuing any hardware-touching action. Rollback is only possible against a captured baseline; an agent that begins a change without the inventory is choosing to make rollback impossible. The inventory is a hard prerequisite, not a nice-to-have.

  • Out-of-band path is a precondition for link-breaking changes. When the change is in the link-breaking class (mode flip, BAR change, port reassignment, BFB reflash, NIC mode change), require an OOB class per ## Capabilities and modes to be in place before issuing the change. Refuse the change if no OOB is named and reachable. Specific OOB endpoints belong to the operator; the agent never invents a BMC IP or a console TTY.

  • Maintenance window is the default frame. Every hardware- touching change runs inside an explicit, time-boxed maintenance window with operations notified. The agent does not silently recommend applying a change "right now" during business hours. The agent names the rollback plan and the verification gate in the same breath as the change, not as an afterthought.

  • mlxconfig-class writes commit at cold power cycle. The agent surfaces this rule explicitly whenever the recommended next step writes an mlxconfig-class parameter. "mlxconfig ... then reboot" is an anti-pattern: the warm reboot does not commit firmware-stored configuration. The agent does not declare the change applied until the cold power cycle has occurred and the post-change inventory confirms the new state.

  • Firmware burn is high-stakes. A NIC firmware burn or BFB reflash requires (a) the pre-flight inventory captured (in particular, the running firmware / BFB level the rollback would need to reflash to), (b) confirmed power continuity (UPS or dual feed) for the duration of the burn, (c) the OOB console reserved, and (d) no ongoing workload on the affected NIC / DPU. An interrupted burn is the canonical bricking failure mode; the agent refuses to start the burn if any precondition is missing.

  • Kernel boot parameters require a host reboot. Changes to IOMMU mode, hugepage reservations, or device pass-through take effect at host reboot. An installed runtime helper alone is not sufficient; the agent does not promise that a host-side helper substitutes for the boot-time configuration. The post-change gate is verified after the host reboot per doca-setup ## debug (doca-setup/TASKS.md#debug).

  • Replica-first validation. Apply the change on a non-prod replica that matches production's hardware class first; run the per-artifact smoke on the replica; only then schedule the production change. The replica is the last opportunity to discover that the rollback path does not work before production is exposed to the risk; skipping the replica because the change "is small" is how a small change becomes a long incident.

  • Observability before workload. The agent does not declare a deployment "ready" until the post-change observability path is proven end-to-end per ## Observability. A workload that moves before the observability surface is reachable is a workload moved blind; the next failure has no diagnostic signal to work from.

  • Rollback is documented and rehearsed. Every change has an explicit rollback path (revert mlxconfig + cold power cycle; reflash the previously-captured firmware level; reflash the previously-captured BFB; revert the kernel boot parameter and reboot; remove the emulation slot; redeploy the previous container tag together with the matching DPU-side package). The rollback is documented BEFORE the change is applied and rehearsed on the replica BEFORE production is exposed. Discovered-during- failure rollback is too late.

  • No documented rollback → refuse and escalate. Changes that the operator cannot describe a rollback for, or for which the vendor explicitly states no rollback exists (irreversible firmware rolls, board-level changes), are NOT applied through this skill's discipline. The agent surfaces the missing rollback as the blocking issue, refuses to proceed, and routes the operator to their change-control process or vendor escalation. Guessing at a rollback in the absence of one is a user-visible regression dressed up as helpfulness.

Host-side cold power cycle — when it is indicated

A host cold power cycle (full AC removal, not a warm reboot) is the right next action when any of these signals appear AFTER a hardware-safety-class change on the host:

  • An mlxconfig write succeeded but mlxconfig -d <bdf> q continues to show the prior value after a warm reboot — firmware-stored config commits only at cold cycle.

  • A NIC firmware burn was reported successful but flint -d <bdf> q continues to show the previous FW version on a warm-rebooted host.

  • After a host-side DOCA / OFED upgrade reboot, lspci -d 15b3: still lists devices but devlink dev info reports Link has been severed or kernel-side mlx5_core complains in dmesg about reset / probe failure that did not recur on the pre-upgrade kernel.

  • Host PCIe bus enumeration is intermittently missing one or more ConnectX / BlueField PFs across warm reboots.

DPU-side cold-power-cycle criteria (RShim no-progress, BFB-completed- but-no-Linux up, TMFIFO down, BF PFs visible but link severed) are operationally similar but live in NVIDIA's BlueField BSP / DOCA Platform Framework documentation, not this bundle. The agent routes DPU-side recovery questions to those docs per AGENTS.md ## Non-goals (bundle AGENTS.md#non-goals-questions-the-agent-should-recognize-and-refuse-politely) item 7.

Script hygiene for hardware-touching scripts the operator runs

When the answer to a hardware-safety scenario ends with the operator running a shell script (preflight capture, upgrade wrapper, rollback ladder), the agent's script-shaped guidance MUST cover three hygiene rules. These are not aesthetic preferences — each closes a common operational failure mode:

  • Hand log ownership back to the invoking user. Scripts that capture under sudo write logs as root; later non-sudo inspection by the same operator then fails with Permission denied. Every root-running script must end with chown -R "${SUDO_USER:-$USER}": "${SUDO_USER:-$USER}" <log-dir> (or the equivalent on the OS in scope) so the operator can read their own captures without a second sudo round-trip.

  • Probe shared-fd device readers BEFORE opening them. Single- reader character devices (the canonical case is /dev/rshim0/console on a host with RShim, but the rule generalises to any device that supports only one open reader) silently fail to capture when another process already holds them. The agent's script must run sudo fuser -v <device> and surface the holder before opening the device for read, and SHOULD warn that opening the device under cat will starve other readers while the script runs.

  • Exit-zero is never the success signal alone. An installer or burn tool that exits 0 while its own log contains ERR[<class>]: ... is NOT a successful run. Scripts must parse the captured log for the documented error-class prefix(es) the underlying tool emits and SHOULD return non-zero (or surface the finding under a distinct status code) when one is present. This is the universal-verification-contract ## step 5 — first-failure ladder rule (see AGENTS.md ## The universal verification contract (bundle AGENTS.md#the-universal-verification-contract)) applied to script-shaped outputs.

Per-artifact overlay pattern

Per-artifact skills (services, libraries, tools) carry their own ## Safety policy anchor. Those anchors overlay this meta- policy with artifact-specific safety; they do NOT redefine the cross-cutting rules above. The convention is:

A per-artifact skill's ## Safety policy MUST cross-link to this skill for the cross-cutting hardware-safety rules and MUST add only the artifact-specific safety overlays (e.g. a service- specific firmware-slot precondition, a library-specific validate-before-commit requirement, a tool-specific read-only-by-default stance). It MUST NOT restate the cross- cutting rules.

Skills that overlay this meta-policy with artifact-specific hardware safety are the in-bundle services, device-touching libraries, and hardware-touching tools whose own ## Safety policy adds the per-artifact preconditions on top of the meta- policy here. The canonical in-bundle overlays are:

  • Services (kubelet-standalone container deployments that touch device state): doca-argus/SKILL.md, doca-dms/SKILL.md, doca-firefly/SKILL.md, doca-urom-svc/SKILL.md.

  • Device-touching libraries: doca-flow/SKILL.md, doca-rdma/SKILL.md, doca-eth/SKILL.md, doca-pcc/SKILL.md, doca-rmax/SKILL.md.

  • Hardware-touching tools: doca-spcx-cc/SKILL.md, doca-pcc-counters/SKILL.md, doca-flow-tune/SKILL.md.

Each of those is an overlay; this skill is the meta-policy they share. Externally-productized analogs — doca-virtio-net, doca-snap, doca-hbn, BlueMan, DPF — are NOT in-bundle skills; their per-product safety policies live in the public product documentation reached through doca-public-knowledge-map ## Externally-productized DOCA software (doca-public-knowledge-map/SKILL.md#externally-productized-doca-software--not-in-this-bundle-but-here-is-where-to-route). The meta-policy in this skill still applies operationally (OOB console, preflight, maintenance window, rollback), but the artifact-specific preconditions for those products are owned by their public docs, not by this bundle.

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.

Needs: Needs Node.js

The author says: No DOCA install required to read this skill (it is an overlay loaded against any DOCA artifact skill); the validation steps within DO require a live DOCA install at /opt/mellanox/doca with a BlueField DPU or ConnectX NIC, plus out-of-band console reachability (BMC, RShim, or operator-managed console) for any link-breaking change.

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-hardware-safety · 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-hardware-safety.zip