Generated banner for Doca Comch
Generated logo for Doca Comch

Doca Comch

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 Comch work on a host + BlueField pair — bringing up host ↔ DPU PCIe control-plane messaging, picking server (DPU) vs client (host) roles, choosing slow-path send-task / recv-callback vs fast-path producer / consumer, querying max-msg-size or max-clients capabilities, registering connection callbacks, or debugging DOCA_ERROR_* returns from the Comch API. Trigger even when the user does not explicitly mention "DOCA Comch" or "Comm Channel" (renamed in DOCA 2.5) — typical implicit phrasings include "send a control message from host to BlueField over PCIe", "DPU can't see the host representor", "DOCA_ERROR_NOT_PERMITTED on server_create", "DOCA_ERROR_AGAIN on task_send submit", "connect callback never fires", or "stream bulk data from a host driver to a DPU agent". Refuse and route elsewhere for installing DOCA itself, BFB / firmware bring-up, non-Comch DOCA libraries, or deploying Comch apps at scale — 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 provides specialized support for developers building applications that utilize the DOCA Comch library to exchange control or data messages between a host and a BlueField DPU over PCIe. It covers the full lifecycle of Comch development, including role selection (server vs. client), path optimization (slow-path vs. fast-path), connection management, and debugging API errors. The skill is designed to integrate with existing DOCA installations and provides structured workflows for configuring, building, and troubleshooting Comch-based communication channels.

What it does

  • Guides the initialization of Comch servers on DPUs and clients on hosts.
  • Assists in choosing between slow-path (task/callback) and fast-path (producer/consumer) communication modes.
  • Provides workflows for configuring connection callbacks and managing state transitions.
  • Helps debug DOCA_ERROR_* codes specific to the Comch API.
  • Explains how to query and set library capabilities like message sizes and client limits.
  • Maps Comch-specific terminology and versioning changes, such as the 2.5 rename from Comm Channel.

When to use it

  • When implementing PCIe control-plane messaging between a host and a BlueField DPU.
  • When debugging connection failures or representor visibility issues.
  • When optimizing data streaming performance using producer/consumer fast-paths.
  • When needing to understand the Comch error taxonomy and lifecycle requirements.
  • When developing language bindings that wrap the Comch C ABI.

Advantages

  • Provides clear, structured workflows for complex DPU-host communication tasks.
  • Offers specific guidance on performance optimization through path selection.
  • Ensures consistent handling of DOCA versioning and library-specific error codes.
  • Integrates seamlessly with standard DOCA development environments and tools.
  • Reduces development friction by providing clear paths for common configuration and debugging scenarios.

Usage examples

“Send a control message from host to BlueField over PCIe.”
The agent will guide you through selecting the appropriate server/client roles and implementing the necessary send/recv logic using the Comch API.
“Why is doca_comch_server_create returning DOCA_ERROR_NOT_PERMITTED?”
The agent will help you verify representor visibility and DPU-side permissions, routing to setup documentation if environment issues are detected.
“How do I stream bulk data from a host driver to a DPU agent with low CPU?”
The agent will direct you to the fast-path producer/consumer implementation workflow to ensure efficient data transfer.
“Is doca_comch_producer available in my DOCA version?”
The agent will check your installed version and confirm availability, providing guidance on whether to use the new API or the legacy slow-path.

Install

  1. Download the skill as a ZIP:

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

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

Documentation by NVIDIA

DOCA Comch

Examples

  • "Send a control message from host to BlueField over PCIe." — this is in scope. Pick server (DPU) vs client (host) and stay on the Comch send/recv path; do not fall back to TCP.

  • "Connect callback never fires." — check role, representor visibility, and the 2.5 rename overlay before rewriting the app as raw verbs.

Instructions

Follow Loading order below. Open the tasks companion for configure / modify / debug. Open the capabilities companion for slow-path vs fast-path and the 2.5 rename. Do not open every companion file.

Where to start: This skill assumes DOCA is already installed and the user is doing hands-on Comch work on a BlueField + host pair with DOCA. Open the tasks companion if the user wants to do something (configure / build / modify / run / test / debug); open the capabilities companion when the question is what can Comch express on this version. If the user has not installed DOCA yet, route to doca-setup/SKILL.md first. If the user is asking "is Comch even on this DOCA" because the docs they read mention doca-comm-channel, route to

Version compatibility

for the 2.5 rename.

Example questions this skill answers well

The CLASSES of Comch 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.

  • "How do I bring up a Comch channel between host and DPU?" — worked example: "server side on the DPU, client side on the host, exchange a first control message". Answered by the role-selection + lifecycle workflow in

    configure +

    Capabilities and modes

    server-vs-client table.

  • "How do I move bulk data over Comch with low CPU?" — worked example: "stream a 64 KiB chunk every 100 µs from the host driver to a DPU agent". Answered by the producer / consumer fast-path described in

    Capabilities and modes

    • the channel-setup workflow in

    configure

    step 4, with the "slow-path vs fast-path" selection rule.

  • "What is the maximum message size I can send?" — worked example: "can I send a 4 MiB control message in one shot?". Answered by the capability-query rule (doca_comch_cap_get_max_msg_size) in

    Capabilities and modes

    • the property-set workflow in

    modify.

  • "Why doesn't the DPU side see the representor?" — worked example: "doca_comch_server_create returns DOCA_ERROR_NOT_PERMITTED on a freshly imaged BlueField". Answered by the representor + permission overlay in

    Safety policy

    • the env-prep checklist in

    configure step 1, which

    routes representor-side env questions to doca-setup/SKILL.md.

  • "Is this Comch capability on my installed DOCA version?" — worked example: "is doca_comch_producer in DOCA 2.6.0, or do I still need the old slow-path API?". Answered by the version-compatibility overlay in

    Version compatibility,

    which cross-links the canonical detection chain in doca-version/SKILL.md and adds the Comch-specific 2.5 rename rule.

  • "What does this DOCA_ERROR_* from a Comch call mean and which layer caused it?" — worked example: "DOCA_ERROR_AGAIN on submitting a doca_comch_task_send via doca_task_submit". Answered by the Comch overlay on the cross-library taxonomy in

    Error taxonomy

    • the layered ladder in

    debug that escalates to

    doca-debug/SKILL.md.

Audience

This skill serves external developers building applications that consume the DOCA Comch library — i.e., users whose code calls doca_comch_* (directly in C/C++, or through FFI/bindings from another language) to exchange control or data messages between a host process and a BlueField agent over PCIe. It is not for NVIDIA developers contributing to DOCA Comch itself.

Language scope. DOCA Comch ships as a C library with pkg-config module name doca-comch. The shipped samples are written in C. C and C++ consumers are the canonical case; the worked examples in the tasks companion assume that path. Other-language consumers (Rust, Go, Python, …) consume the same *.so through FFI or language-specific bindings; the skill's contribution in that case is to keep the role-split, lifecycle, capability-discovery, permission, and error-taxonomy guidance language-neutral, and to route the agent to the public C ABI as the authoritative surface that any wrapper will eventually call.

When to load this skill

Load this skill when the user is doing hands-on DOCA Comch work, in any language. Concretely:

  • Initializing a doca_comch_server on the DPU side or a doca_comch_client on the host side, on a representor or PCIe address the host can reach.

  • Configuring at least one of: a recv callback for slow-path messages, a producer for fast-path outbound data, a consumer for fast-path inbound data, before doca_ctx_start().

  • Reading or setting comch properties via doca_comch_set_* and doca_comch_cap_get_* — max message size, max number of clients (server side), producer / consumer queue sizing.

  • Establishing a connection between the two sides and reacting to connection-state transitions via the connection callbacks registered before start.

  • Choosing between the slow-path (send-task / recv-callback, message-oriented, lower throughput, single-call simplicity) and the fast-path (producer / consumer, asynchronous, much higher throughput, two-context setup).

  • Debugging a DOCA_ERROR_* returned from a Comch call (lifecycle vs. permission vs. capability vs. would-block) and the connection state machine across the host / DPU pair.

  • Designing or extending non-C bindings (Rust, Go, Python, …) that wrap the Comch C ABI — for the lifecycle, role-split, permission, and capability rules the wrapper must honor.

Do not load this skill for general DOCA orientation, install of DOCA itself, or non-Comch library questions. For those, use doca-public-knowledge-map/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 Comch-specific material lives in two companion files:

  • the capabilities companion — what Comch can express on this version: the server vs client role split, the slow-path send-task / recv-callback surface, the producer / consumer fast-path surface, the capability-query surface (doca_comch_cap_get_*), the Comch error taxonomy (mapped onto the cross-library DOCA_ERROR_* set), the observability surface (connection state callbacks, task completion callbacks), and the safety policy that gates representor and permission decisions.

  • the tasks companion — step-by-step workflows for the six in-scope Comch verbs: configure, build, modify, run, test, debug. Plus a Deferred task verbs block that points out-of-scope questions at the right next skill.

The skill assumes a host + BlueField pair where DOCA is already installed at the standard location and the user has the privileges their public install profile expects (in particular, sudo on the DPU side to see the host representor). 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 Comch application source code, in any language. The verified Comch source code is the shipped C samples at /opt/mellanox/doca/samples/doca_comch/<name>/. The agent's job is to route the user to those files and prescribe a minimum-diff modification on them via the universal modify-a-sample workflow in doca-programming-guide/SKILL.md, layered with the Comch-specific overrides in

    modify.

  • Standalone build manifests (meson.build, CMakeLists.txt, Cargo.toml, …) 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-comch is the source of truth.

  • 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 Comch capability matrix, role split, slow-path / fast-path surfaces, permission policy, error taxonomy, observability, and safety policy, see the capabilities companion.

  3. For step-by-step workflows — configure, build, modify, run, test, debug — see the tasks companion.

Both companion files cross-link to each other, doca-version/SKILL.md for the canonical version-handling rules, and 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 "Comch-specific guidance".

  • 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. The Comch URL slug is DOCA-Comch (DOCA 2.5+), not doca-comm-channel.

  • doca-setup/SKILL.md — env preparation, install verification, representor visibility checks, and the I have no install yet path with the public NGC DOCA container. This skill assumes its preconditions are satisfied.

  • doca-version/SKILL.md — canonical DOCA version-handling rules. This skill's ## Version compatibility cross-links the four-way match rule and adds the Comch-specific 2.5 rename overlay.

  • doca-structured-tools-contract/SKILL.md — the bundle's structured-tools precedence rule (detect / prefer / fall back / report). The Command appendix in the tasks companion honors this contract.

  • 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 universal lifecycle, the cross-library DOCA_ERROR_* taxonomy, and the program-side debug order. This skill layers Comch specifics on top.

  • doca-debug/SKILL.md — the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). Comch-specific debug (lifecycle violations, representor visibility, slow-path vs fast-path queue-full symptoms) overlays on top of that ladder.

Files

TASKS.md

DOCA Comch workflows

Where to start: The verbs run configure → build → modify → run → test → debug. Skip ahead only when the user is already past a verb. The ## test verb is an iterative loop (sample → first modify → smoke test → narrow → loop back), not a one-shot pass — see the eval-loop overlay in ## test below.

Read this file when the loader sent you here from SKILL.md. For the Comch capability surface, role split, slow-path / fast-path tables, capability-query rules, error taxonomy, observability, and safety policy, see CAPABILITIES.md. For the cross-library DOCA patterns layered under everything below (the universal lifecycle, the cross-library DOCA_ERROR_* taxonomy, the modify-a-shipped- sample workflow), see doca-programming-guide/SKILL.md.

Each verb below describes the shape of the workflow, not a copy-paste recipe. The agent's job is to walk the user through the steps in order, verifying preconditions before recommending the next call.

DOCA 3.5 field notes

Known behaviours on DOCA 3.5; check them before debugging further:

  • doca_ctx_start() returns DOCA_ERROR_IN_PROGRESS for the Comch client and consumer. That is an asynchronous start, not a failure: keep calling doca_pe_progress() until the context state callback reports DOCA_CTX_STATE_RUNNING. Code that treats the return value as an error exits too early.

  • Start the BlueField server first. A client with no server fails with a firmware code instead of a reason (Failed to create devx object with syndrome=0xe5300 ... Client registration failed).

  • Run the BlueField side as root. Without it, opening the representor fails with the misleading representor devices are available only on DPU, do not run on Host, even on the DPU.

configure

Goal: stand up a Comch channel between a host process and a DPU process, with both sides aware of which path (slow / fast) they will use, before any production message flows.

Steps the agent should walk the user through:

  1. Confirm the env preconditions. The DPU side must see the host representor; the host side must see the BlueField PCIe address. Per the permission matrix in CAPABILITIES.md ## Safety policy, walk ls /sys/class/net/ on the DPU and lspci | grep Mellanox on the host BEFORE any object-creation call. If either is missing, route to doca-setup TASKS.md ## configure (doca-setup/TASKS.md#configure) — this is an env problem, not a code problem.

  2. Pick the role per side. DPU = server, host = client. Per the role table in CAPABILITIES.md ## Capabilities and modes, Comch is asymmetric — there is no symmetric peer-to-peer mode. Sketch the call sequence per side before writing code.

  3. Run capability discovery against the active doca_devinfo. For the slow-path: doca_comch_cap_get_max_msg_size. For the fast-path: doca_comch_consumer_cap_is_supported, doca_comch_producer_cap_is_supported. For the server: doca_comch_cap_get_max_clients. Quote the queried values back to the user; do not assume from prior installs.

  4. Choose the path per side. Slow-path only, fast-path only, or both. Per the slow-vs-fast table in CAPABILITIES.md ## Capabilities and modes, the agent's rule: bulk data → fast-path; control plane → slow-path; first-app → start with slow-path, add fast-path only after slow-path is green end-to-end.

  5. Register the connection callbacks at the right point in the lifecycle. On the server, the connection callbacks are registered with doca_comch_server_event_connection_status_changed_register (server-only — the client has no connection-event register and tracks state via its context state / task callbacks), plus, if using slow-path, the recv callback. The register requires the context to be idle (after _create, before doca_ctx_start()); callbacks registered after start are silently ignored by the library, and the agent must surface this.

  6. Start the context via doca_ctx_start() and progress the PE (doca_pe_progress) until the server connection callback reports CONNECTED and the client context-state callback reports its running state. The client has no connection-event callback. If either side does not reach its documented signal within the application/sample deadline, route to ## debug ladder step 1 (lifecycle / connection).

For the canonical DOCA universal lifecycle that underlies steps 2-6, see doca-programming-guide TASKS.md ## configure (doca-programming-guide/TASKS.md#configure). This skill adds the Comch overlay; do not re-explain the lifecycle here.

build

Goal: compile a Comch-using consumer against the user's installed DOCA, with pkg-config as the source of truth for include + link flags.

The build pattern for any DOCA C/C++ consumer is fully documented in doca-programming-guide TASKS.md ## build (doca-programming-guide/TASKS.md#build). This skill carries only the Comch-specific overlay:

SlotValueWhy it matters
pkg-config module namedoca-comch on installs ≥ 2.5; doca-comm-channel on installs < 2.5 (renamed; see CAPABILITIES.md ## Version compatibility)Wrong module name = pkg-config: Package 'doca-comch' was not found on an old install, or "the API I'm reading about isn't here" on the legacy install.
Include flagspkg-config --cflags doca-comchResolves to headers under $(pkg-config --variable=includedir doca-common) for the comch subset
Link flagspkg-config --libs doca-comchPulls in whatever pkg-config --libs resolves on this install (do not predict the -l<name> form by hand — .so basenames use underscores, .pc names use hyphens, and pkg-config is the only correct translator)
Companion librariesdoca-argp for argument parsing (if the consumer uses the standard DOCA arg style); doca-rdma only if the consumer also uses RDMA (Comch does not require it)Adding unnecessary companion libs bloats the link line and obscures real partial-install issues

For non-C consumers (Rust, Go, Python), the wrapper consumes libdoca_comch.so through FFI; the build-time version visibility goes through the language's own FFI generator (e.g. bindgen against the comch headers). The role-split and capability-discovery rules still apply — the wrapper consumes a *.so that has its own runtime version per doca-version CAPABILITIES.md ## Version compatibility (doca-version/CAPABILITIES.md#version-compatibility).

modify

Goal: take the closest-fitting shipped Comch sample and apply a minimum diff to make it match the user's intent, without rewriting from scratch.

The universal modify-a-shipped-sample workflow is in doca-programming-guide TASKS.md ## modify (doca-programming-guide/TASKS.md#modify); this skill provides the Comch-specific slot fill.

SlotValueSource
Sample tree/opt/mellanox/doca/samples/doca_comch/<name>/Confirmed by ls /opt/mellanox/doca/samples/doca_comch/; one subdirectory per shipped sample
Pick the closest sampleMatch the user's intent (server vs client; slow-path vs fast-path; one-shot vs streaming) to a sample whose code shape already matchesPer the path-selection table in CAPABILITIES.md ## Capabilities and modes
Identify the modify surfaceThe connection callbacks; the recv-callback body (slow-path); the producer-submit body (fast-path); the message payload structThese are the in-place edit points; do not introduce a new translation unit unless the sample is being split for clarity
Re-validate against capabilitiesRe-run the doca_comch_cap_* queries from ## configure step 3 against the modified configuration — message size growth, client-count growth, transport change all flip a capability boundaryPer the cross-cutting rule in doca-version CAPABILITIES.md ## Observability (doca-version/CAPABILITIES.md#observability), the cap query is the runtime authority
Keep the build manifest unchangedThe sample's existing meson.build already wires pkg-config doca-comch; do not switch to a hand-rolled Makefile for "simplicity" — it removes the version-check railPer the build slot table in ## build

The agent's anti-pattern alert: a "clean rewrite" from scratch is almost always slower to first green than a minimum-diff modify on a shipped sample, and removes the user's ability to bisect against a known-good baseline.

run

Goal: execute the built program and confirm both sides reach CONNECTED before any production traffic.

Steps the agent should walk the user through:

  1. Start the DPU side first (the server). It must be listening on the representor before the host-side client tries to connect. The connection callback firing as CONNECTED on the server side is the "server is ready" signal; do not infer from the absence of an error log.

  2. Start the host side (the client). The client's connection context-state callback reaching its documented running state, followed by the first successful task callback, is the "channel is up" signal; do not invent a client connection-event callback.

  3. Send a smoke message — one slow-path send-task with a small payload; verify the recv callback fires on the peer with the expected payload. If using fast-path, send one producer transfer with a small batch; verify the consumer callback fires.

  4. Stop in reverse order. Client first (graceful disconnect surfaces in the server's connection callback as DISCONNECTED), then server. Tearing down the server first while the client is still connected produces a noisy _CONNECTION_RESET on the client side that masks unrelated bugs in subsequent runs.

For the runtime version + LD_LIBRARY_PATH cross-checks that underlie "the program built but does nothing", see doca-version TASKS.md ## run (doca-version/TASKS.md#run).

test

Goal: prove a Comch consumer is correct end-to-end, on the user's installed DOCA + device + permissions, before claiming the "build a first Comch app" journey is done.

This is a loop, not a one-shot pass. Each iteration narrows either the path being exercised, the message size, or the connection-state assumption. The loop terminates when the user reports a single-message smoke + a multi-message run both work AND the connection state machine has been observed transitioning through CONNECTED → DISCONNECTED cleanly.

Iteration shape:

  1. Single-message slow-path smoke. Server up, client up, one send-task, recv callback fires. If yes, advance. If no, to ## debug ladder.

  2. Multi-message slow-path. Loop 100 send-tasks with doca_pe_progress() between submits; confirm every completion callback fires. Catches missing-progress bugs.

  3. Disconnect / reconnect. Stop the client; confirm the server's connection callback fires DISCONNECTED. Re-start the client; confirm CONNECTED fires again. Catches connection state-machine assumptions that work for the first connect but not subsequent ones.

  4. Fast-path smoke (if used). Single producer transfer → consumer callback; then 100 transfers. The fast-path can pass slow-path while still failing here because the consumer queue sizing is independent.

  5. Cross-version run (if the user has multiple installs): re-run steps 1-4 on each install; quote the version per doca-version TASKS.md ## configure (doca-version/TASKS.md#configure) in the report.

Eval-loop overlay — why this is a loop, not a one-shot pass:

Iteration triggerWhat it looks likeWhat changes next iteration
Single-message smoke passed; multi-message hungSend queue depth too small OR doca_pe_progress() missingRe-narrow to the progress / queue-depth axis; widen depth via _set_max_num_tasks
Slow-path passed; fast-path consumer never firesConsumer not attached / not progressed; fast-path producer wrote into a queue with no consumer readerConfirm doca_comch_consumer_create + _progress; do not assume slow-path patterns transfer
First connect succeeded; reconnect failed with BAD_STATEConnection objects not torn down before re-connectWalk the connection-event-callback teardown; the disconnected connection needs explicit destroy before the new accept
Producer submit returns AGAIN after 100 successful submitsConsumer is not draining at the same rateThis is a flow-control problem in the app, not a Comch bug; the agent must surface the rate gap, not paper over with retries
Same code passes on host A, fails on host BDifferent DOCA version or different representor permissionRe-run ## configure step 1 (env preconditions) + doca-version TASKS.md ## test (doca-version/TASKS.md#test) four-way match on host B

Loop termination: run the smoke sweep once and permit at most one single-variable correction followed by one rerun. If that second sweep is still non-green, stop regardless of whether the symptom changed; escalate to doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug) with the captured trace + version state as evidence.

debug

Goal: when a Comch session fails, isolate the cause to a single layer before recommending any code change.

The cross-library debug ladder lives in doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug). Walk through it in order — install → version → build → link → runtime → program → driver. This skill provides the Comch overlay at the runtime and program layers.

Layer 5 (runtime) — Comch overlay.

  • The connection callback never firing is almost always a representor / PCIe visibility issue, not a Comch code issue. Confirm the env-side preconditions per ## configure step 1 before any code change.

  • DOCA_ERROR_AGAIN on submit means queue-full/backpressure. Progress the PE to drain completions before one bounded resubmit. If it recurs while completions are being drained, surface a producer/consumer rate gap; do not claim progress was necessarily absent and do not hide the gap behind a retry loop.

  • A "server seems up; client hangs at start" pattern is most often that the server-side accept slot is occupied — the device's per-server cap from doca_comch_cap_get_max_clients(devinfo) is reached because a previous client did not cleanly disconnect (leaked connection object on the server side). The cap is a device capability, not a user-settable knob, and the public Comch API provides no live-connection enumeration call. Use the application's own connection registry to identify and destroy a connection object only when that registry exists and proves which object is stale. Otherwise stop and report that selective cleanup is unavailable. A planned server-process restart destroys every connection and is allowed only after showing that blast radius and obtaining explicit operator confirmation; never invent a "raise the limit" setter or prune an unverified object.

Layer 6 (program) — Comch overlay.

  • Slow-path vs fast-path conflation: submitting a slow-path send-task on the producer context returns BAD_STATE. Walk the user's path-selection (per the slow-vs-fast table in CAPABILITIES.md ## Capabilities and modes) before any other diagnosis.

  • Lifecycle order: configure → start → CONNECTED callback → use → stop → destroy. Out-of-order returns BAD_STATE. The most common case is submitting before the connection callback reports CONNECTED.

  • Message-size overflow: a slow-path send-task with a payload bigger than doca_comch_cap_get_max_msg_size(devinfo) returns INVALID_VALUE. The fix is to fragment at the app layer or switch to the fast-path producer; not to raise the cap (it is device-bound).

Once the layer is identified, route to the matching debug verb on the matching skill: install / build / link / driver to doca-setup ## debug (doca-setup/TASKS.md#debug); version to doca-version ## debug (doca-version/TASKS.md#debug); cross-cutting runtime to doca-debug ## debug (doca-debug/TASKS.md#debug); program-layer Core-context patterns to doca-programming-guide TASKS.md ## debug (doca-programming-guide/TASKS.md#debug).

Deferred task verbs

The following verbs are out of scope for this skill but are commonly asked in the same conversations. Route them as follows so the agent does not invent guidance:

  • install. Installing DOCA, choosing packages, post-install verification, pkg-config wiring — defer to doca-setup/SKILL.md and to the install-tree layout in doca-public-knowledge-map ## Layout of an installed DOCA package (doca-public-knowledge-map/SKILL.md#layout-of-an-installed-doca-package). This skill assumes DOCA is already installed.

  • deploy. Deploying Comch-using applications at scale (many host processes per BlueField, Kubernetes operator workflows with sidecar BlueField agents) — out of scope for this skill.

  • manage / monitor. Multi-tenant Comch fan-out, telemetry shipping over Comch — covered partially by the operations guidance in doca-public-knowledge-map/SKILL.md; operator workflows are out of scope for this bundle.

  • firmware burn / reset. Comch depends on the underlying ConnectX firmware and BlueField BFB; if the user's debug ladder lands on a driver-layer issue, the fix is via mlxconfig / mlxfwreset / re-imaging the BFB, all of which belong to the env-side skill rather than this one.

Command appendix

Every command below is cross-cutting on DOCA Comch — it answers a recurring class of question that comes up in the verbs above. The agent should treat the class as load-bearing; the worked example is a single instance. Run-as user is the unprivileged user unless noted. Sudo is called out per row.

Infra-aware preamble (every row below). Per the bundle's detect → prefer → fall back → report contract documented in doca-structured-tools-contract ## The agent behavior contract (doca-structured-tools-contract/SKILL.md#the-agent-behavior-contract), the agent should:

  1. Probe for the matching structured helper FIRST (doca-env --json for version + devices + libraries + drivers + hugepages in one shot; doca-capability-snapshot for per-device capability flags; version-matrix.json for "available since" lookups).

  2. If the probe succeeds, the structured tool's output is the authoritative answer and the agent SHOULD NOT also run the manual command in the row below. Report "using structured <tool>".

  3. If the probe fails, fall back to the manual command in the row. Report "falling back to manual chain".

  4. The schemas the structured tools emit are defined in doca-structured-tools-contract ## Schemas (doca-structured-tools-contract/SKILL.md#schemas); the version-handling semantics (four-way match, NGC, headers-win) are owned by doca-version/SKILL.md.

Command (worked example)Owning stepClass of question it answersWhat healthy output looks like
pkg-config --modversion doca-comch## configure step 1; ## build slot 1What is the build-time DOCA Comch version?A semver string matching doca_caps --version. Disagreement = partial install (route to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) layer 2)
pkg-config --cflags --libs doca-comch## buildWhat include + link flags does the linker need?Trust whatever pkg-config --cflags --libs produces on this install. Do not hardcode either the -I include path or the -l<name> flag form — both can drift between DOCA install profiles and DOCA majors; the on-disk .so basenames use underscores, while the .pc package names use hyphens, and pkg-config is the only thing that resolves both correctly. Hand-crafted -l lines silently break when DOCA upgrades.
ls /opt/mellanox/doca/samples/doca_comch/## modifyWhich Comch samples ship in this install, and which is the closest starting point?A list of sample directories named after the role + path pattern they demonstrate
ls /sys/class/net/ (DPU side)## configure step 1Which host representors are visible to the DPU?One entry per representor (PF / VF / SF) the host has surfaced
`lspcigrep Mellanox` (host side)## configure step 1Which BlueField PCIe addresses are reachable from the host?
mlxconfig -d <pcie> q INTERNAL_CPU_MODEL (sudo)## configure step 1What mode is this BlueField in (SmartNIC / DPU / switch)?A single matching mode line; Comch requires the host ↔ DPU pair to agree
`dmesgtail -n 40` (sudo)## debug layer 7What did the kernel / driver log around the last Comch call?
DOCA_LOG_LEVEL=trace ./<binary>## run step 3What did the structured DOCA logger emit for the first failing call?A trace-level line on every lifecycle transition and every task submission. Silence after submission = PE not progressed

For commands shared across libraries (pkg-config --modversion, doca_caps, cat /opt/mellanox/doca/applications/VERSION, DOCA_LOG_LEVEL) the cross-library overlay is in doca-debug TASKS.md ## Command appendix (doca-debug/TASKS.md#command-appendix); this table adds the Comch-specific rows on top.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

The author says: Requires DOCA SDK installed at /opt/mellanox/doca on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) on a host + BlueField pair (the Comch channel runs over the RoCE/IB protocol, not the TCP/IP stack). Reads the user's local install via `pkg-config doca-comch` (legacy `doca-comm-channel` on installs <2.5) and inspects /opt/mellanox/doca/{lib,include,samples,applications}. 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-comch · 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-comch.zip