Generated banner for Doca Pcc
Generated logo for Doca Pcc

Doca Pcc

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 host-side DOCA PCC work to load a CUSTOM Programmable Congestion Control algorithm onto a BlueField DPU — creating per-port `doca_pcc` contexts, loading a `dpacc`-compiled `doca_pcc_app` onto the `doca_dev` for the RoCE-bearing port, parameterizing it, walking triple-axis capability discovery (DOCA cap-query + DPA-capable BlueField + firmware custom-PCC slot enabled), or debugging `DOCA_ERROR_*` from `doca_pcc_*`. Trigger even without explicit "DOCA PCC" phrasing — implicit forms include "loading my own congestion control onto a BF port", "DOCA_ERROR_NOT_PERMITTED on algorithm load", "DOCA_ERROR_DRIVER when I attach my custom algorithm", "my custom rate-update isn't affecting RoCE traffic", or "load succeeds but no on-wire change". Refuse and route elsewhere for DPA-side algorithm-body design, the `pcc_counters` CLI, default factory PCC in ConnectX firmware, or setting up the RDMA / RoCE traffic — 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 guidance for developers implementing custom congestion control algorithms on NVIDIA BlueField DPUs. It focuses on the host-side lifecycle of the DOCA PCC library, including creating per-port contexts, loading DPACC-compiled algorithm images, parameterizing the PCC core, and attaching algorithms to RoCE-bearing ports. It covers the necessary environment preconditions, such as DPA-capable hardware and firmware-level custom-PCC slot enablement, and provides a framework for debugging common load-time and runtime errors.

What it does

  • Initializes doca_pcc contexts against specific BlueField devices.
  • Loads and attaches DPACC-compiled PCC algorithm images to RoCE-bearing ports.
  • Parameterizes and starts the PCC core to modulate traffic.
  • Validates triple-axis capability discovery (DOCA, DPA, and firmware slot).
  • Provides a taxonomy for debugging DOCA_ERROR codes related to PCC.
  • Routes users to appropriate documentation for DPA-side algorithm design and diagnostic CLI tools.

When to use it

  • When deploying a custom congestion control algorithm onto a BlueField DPU from the host.
  • When troubleshooting load-time errors like DOCA_ERROR_NOT_PERMITTED or DOCA_ERROR_DRIVER.
  • When verifying if a specific BlueField generation and firmware configuration supports custom PCC.
  • When debugging why a successfully loaded algorithm is not affecting on-wire RoCE traffic.
  • When designing host-side bindings to drive a pre-compiled PCC algorithm image.

Advantages

  • Provides a clear boundary between host-side integration and DPA-side algorithm development.
  • Includes a structured approach to verifying environment and firmware prerequisites.
  • Offers a systematic debugging ladder for common PCC-specific integration issues.
  • Ensures consistent usage of the DOCA PCC API across different language implementations.

Usage examples

“How do I deploy my custom congestion control algorithm onto a BlueField port carrying RoCE traffic?”
The agent guides you through the two-side-program model, the host-side load-and-attach workflow, and the necessary bring-up steps to bind your algorithm to the port.
“Why does my custom PCC load fail with DOCA_ERROR_NOT_PERMITTED?”
The agent helps verify if the firmware custom-PCC slot is enabled and checks the permission matrix to resolve the environment configuration issue.
“Can I use this library to read PCC counters?”
The agent clarifies that this skill is for custom algorithm integration and routes you to the pcc_counters CLI tool for runtime diagnostics.
“My algorithm loads successfully but does not affect RoCE traffic.”
The agent assists in verifying if doca_pcc_start() was called and ensures the algorithm is correctly attached to the active RoCE-bearing port.

Install

  1. Download the skill as a ZIP:

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

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

Documentation by NVIDIA

DOCA PCC

Examples

  • "Loading my own congestion control onto a BF port." — this is in scope. Stay on host-side doca_pcc + a DPACC-built doca_pcc_app; do not rewrite the algorithm body here.

  • "DOCA_ERROR_NOT_PERMITTED on algorithm load." — check the firmware custom-PCC slot and DPA exposure before changing the load call.

Instructions

Follow Loading order below. Open the tasks companion for configure / load / debug. Open the capabilities companion for the triple-axis cap query. Do not open every companion file.

Where to start: This skill assumes DOCA is already installed, the user's BlueField has a DPA processor that the host can see through DOCA, the BlueField firmware has the custom-PCC slot enabled, and the user is doing hands-on custom PCC work from the host side — i.e. using doca-pcc to load a DPA-side congestion control algorithm onto the BlueField, attach it to a port handling RDMA / RoCE traffic, and parameterize it from the host. 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 the host-side PCC API express on this version + this BlueField generation + this firmware. If the user has not installed DOCA yet, route to doca-setup/SKILL.md first; if the user is asking how to write the DPA-side congestion-control algorithm itself (the code that runs on the DPA processor, compiled by dpacc), that is a different scope — route via doca-public-knowledge-map/SKILL.md to the public DOCA PCC programming guide and to doca-dpa/SKILL.md for the host-side DPA lifecycle this skill builds on. If the user only wants to inspect PCC counters at runtime without writing a custom algorithm, that is the pcc_counters CLI tool — route via doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools); this skill is for custom algorithms only.

Example questions this skill answers well

The CLASSES of PCC 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 deploy my own custom congestion control algorithm onto a BlueField port carrying RDMA / RoCE traffic?" — worked example: "load a small DPA-side PCC algorithm and attach it to the BlueField port that handles my RoCE traffic". Answered by the two-side-program model + the host-side load-and-attach workflow in

    Capabilities and modes

    • the bring-up steps in

    configure.

  • "Does this BlueField + firmware actually allow a custom PCC algorithm, and which PCC features does my DOCA install expose?" — worked example: "my host has a BlueField and the default factory PCC works; can I drop in a custom algorithm instead?". Answered by the triple-axis precondition rule (BlueField generation must carry a DPA, firmware must have the custom-PCC slot enabled, doca_pcc_cap_* against the active doca_devinfo must agree) in

    Capabilities and modes

    • the env-precondition checklist in

    configure step 1.

  • "Why does my custom PCC fail with DOCA_ERROR_NOT_PERMITTED even though I have doca_dev access?" — worked example: "the BlueField firmware in this host has the custom-PCC slot disabled". Answered by the permission matrix in

    Safety policy

    • the firmware-side env fix in

    configure step 1.

  • "Is this doca-pcc library the right tool for what I want, or do I want the default firmware PCC or the pcc_counters CLI?" — worked example: "I just want to read PCC counters without touching the algorithm". Answered by the path-selection rule in

    Capabilities and modes

    • the deferred-topic boundaries in

    Deferred topic boundaries

    which route to doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools) for the counter tool.

  • "Is the host-side PCC API I'm reading about on my installed DOCA?" — worked example: "is the host-side load helper I see in the docs available against the DOCA + DPACC versions on this host?". Answered by the version-compatibility overlay in

    Version compatibility

    which cross-links the canonical detection chain in doca-version/SKILL.md and adds the PCC-specific DOCA must match DPACC overlay inherited from doca-dpa/SKILL.md.

  • "What does this DOCA_ERROR_* from a doca_pcc_* call mean and which layer caused it?" — worked example: "DOCA_ERROR_DRIVER on the host-side algorithm-load call — is it DOCA, the firmware-side custom-PCC slot, or the DPACC- produced image?". Answered by the PCC 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 consuming the DOCA PCC library from the host side — code that calls doca_pcc_* to stand up the per-port context, load the dpacc-produced doca_pcc_app image, attach it to the RoCE-bearing BlueField port, parameterize it, start it, and observe runtime reports. It is not for NVIDIA developers contributing to DOCA PCC, nor the place to learn how to write the DPA-side algorithm body (route via doca-public-knowledge-map/SKILL.md to the public PCC / DPA / DPACC guides).

Language scope. DOCA PCC ships as a host-side C library (pkg-config module doca-pcc). The DPA-side algorithm is a separate translation unit dpacc compiles into the PCC algorithm image — no FFI escape hatch. A Rust / Go / Python host-side wrapper driving doca_pcc_* is still useful; the skill keeps its guidance language-neutral.

When to load this skill

Load this skill when the user is doing hands-on DOCA PCC work from the host side for a custom congestion control algorithm. Concretely:

  • Initializing a doca_pcc against a doca_dev that maps to the BlueField port carrying the RDMA / RoCE traffic to be controlled.

  • Loading the dpacc-produced doca_pcc_app algorithm image into the doca_pcc context.

  • Parameterizing the algorithm and starting the doca_pcc Core context so it begins affecting RoCE traffic on the port.

  • Checking which PCC features the active doca_devinfo supports via doca_pcc_cap_* — BlueField generations and firmware revisions differ on permitting a custom PCC algorithm.

  • Debugging a DOCA_ERROR_* from doca_pcc_* — disambiguating firmware custom-PCC slot disabled vs device cannot do custom PCC vs image incompatible vs plain doca_dev access denied.

  • Designing non-C host-side bindings that drive a separately dpacc-built algorithm image — the env-precondition and capability rules still apply.

Do not load this skill for general DOCA orientation, DOCA / DPACC install, the DPA-side programming model itself, the factory PCC algorithm shipped in ConnectX firmware (firmware- only, no host-side code), or the pcc_counters diagnostic CLI. For those, route through doca-public-knowledge-map/SKILL.md to the matching upstream guide.

What this skill provides

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

  • the capabilities companion — what the host-side PCC API can express on this version + this BlueField generation + this firmware: the per-PCC-instance doca_pcc context, the loaded doca_pcc_app algorithm image produced by dpacc, the attach-to-port semantics that bind the algorithm to the RDMA / RoCE traffic it will control, the capability-query surface (doca_pcc_cap_*), the PCC error taxonomy mapped onto the cross-library DOCA_ERROR_* set, the observability surface (host-side reports plus the public PCC counter tool reachable via doca-public-knowledge-map), and the safety policy that gates env preconditions (DPA-capable BlueField, firmware-level custom-PCC slot enabled, matched DOCA + DPACC versions, algorithm image and host-side expectations agree).

  • the tasks companion — step-by-step workflows for the six in-scope PCC 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 where DOCA is already installed at the standard location, a BlueField with a DPA processor is physically present and visible to the host, the BlueField firmware has the custom-PCC slot enabled, the DPACC compiler is installed at a version matched to the DOCA install per the DOCA Compatibility Policy, and the user already knows how (at least at a sketch level) to write the DPA-side PCC algorithm that dpacc will compile. It does not cover installing DOCA, installing the DPACC compiler, or flipping firmware-level configuration — those paths go 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 PCC application source code or DPA-side algorithm source, in any language. The verified PCC source is the shipped C + DPA-side samples at /opt/mellanox/doca/samples/doca_pcc/. 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 PCC-specific overrides in

    modify.

  • A specific congestion control algorithm. This library loads an algorithm the user supplies; it does not define one. The agent must refuse to invent algorithm bodies and must route any "what algorithm should I write" question to the public DOCA PCC programming guide and the user's own domain expertise — that is a research question, not an API question.

  • Standalone build manifests (meson.build, CMakeLists.txt, …) parked inside the skill. The agent constructs the build manifest in the user's project directory against the user's installed DOCA + DPACC compiler, where pkg-config --modversion doca-pcc and the installed dpacc are the two sources 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.

  • pcc_counters tool surface. That CLI is a separate artifact (the pcc_counters.sh script installed at /opt/mellanox/doca/tools/pcc_counters.sh) with its own page; routing lives in doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools). Conflating it with the library is the most common PCC first-app design error.

Loading order

  1. Read this skill first to confirm the user's question is in scope (host-side custom PCC work, not DPA-side algorithm design and not the counter tool).

  2. For the PCC capability matrix, the two-side-program model, the doca_pcc per-instance context, the loaded doca_pcc_app algorithm image, the attach-to-port semantics, the triple-axis precondition rule, the env-precondition policy, the error taxonomy, the observability surface, and the 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 DOCA version-handling rules (with the PCC overlay that DOCA must match the DPACC compiler), and doca-public-knowledge-map/SKILL.md whenever the right answer is "look it up in the public DOCA PCC programming guide, the public DPA / DPACC guides, the pcc_counters tool guide, or in the on-disk install layout" rather than "PCC host-side-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 PCC public guide is at https://docs.nvidia.com/doca/sdk/DOCA-PCC/index.html; the pcc_counters diagnostic CLI lives under the DOCA Tools umbrella as a companion surface rather than a redefined artifact here.

  • doca-dpa/SKILL.md — the host-side DPA control library that PCC depends on conceptually: the custom PCC algorithm is DPA-side code, compiled by the DPACC compiler, and the host-side doca-pcc Core lifecycle follows the same shape as the doca-dpa Core lifecycle. The agent loads doca-dpa alongside this skill when the user has DPA-level questions (kernel-launch model, DPA-side libraries) that PCC is layered on top of.

  • doca-rdma/SKILL.md — the library whose traffic the custom PCC algorithm is controlling. The custom PCC algorithm affects RDMA / RoCE flows on the attached BlueField port; if the user has not yet set up RDMA / RoCE traffic on that port, there is nothing for the algorithm to act on, and doca-rdma is the skill that brings that traffic up.

  • doca-setup/SKILL.md — env preparation, install verification, DPACC compiler install / verification, BlueField firmware configuration (including the custom-PCC slot enable), and the I have no install yet path with the public NGC DOCA container. This skill assumes its preconditions are satisfied AND that DPACC is installed at a version that matches DOCA AND that the firmware-level custom-PCC slot is enabled.

  • doca-version/SKILL.md — canonical DOCA version-handling rules. This skill's ## Version compatibility cross-links the four-way match rule and adds the PCC-specific DOCA-and-DPACC must match overlay per the DOCA Compatibility Policy (inherited from doca-dpa/SKILL.md).

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

  • doca-debug/SKILL.md — the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). PCC-specific debug (custom-PCC slot not enabled in firmware, DPACC + DOCA version skew, algorithm image rejected as incompatible with the device, a loaded algorithm producing no on-wire change because doca_pcc_start() was never called or the attached port carries no RoCE traffic) overlays on top of that ladder.

"It loads but nothing changes on the wire" is a host-side question. A successful load is not a live algorithm: doca_pcc_start() is the moment it goes live on the port, and PCC only modulates RoCE traffic that already exists on the doca_dev the doca_pcc was created against. Settle both here and do not audit the DPA-side algorithm body: that is doca-dpa/SKILL.md's surface, and reports firing already proves the body runs — what is unproven is that it is bound and live. Ordered checks in

debug.

Files

CAPABILITIES.md

DOCA PCC capabilities, version overlay, errors, observability, safety

Where to start: Pick the H2 anchor that matches your question (host-side doca_pcc context / loaded algorithm image / attach-to-port semantics / triple-axis capability discovery / env preconditions / errors) and read that section end-to-end. The tables in each section are the load-bearing content; the prose around them is interpretation.

Read this file when the loader sent you here from SKILL.md. For the how of executing each pattern (the verbs configure / build / modify / run / test / debug), jump to TASKS.md. For the canonical DOCA version-handling rules that this skill layers a PCC overlay on top of, see doca-version/SKILL.md. For the host-side DPA lifecycle this skill conceptually inherits (custom PCC algorithms are DPA-side code), see doca-dpa/SKILL.md.

Pattern overview

Every PCC question this skill teaches resolves into one of SIX patterns. The patterns are CLASSES — they apply across every DOCA PCC release and every host + BlueField + DPACC + firmware combination.

PatternWhen it applies (class shape)Where the substance lives
1. Walk the two-side-program model firstEvery custom PCC deployment has TWO translation units (host-side using doca-pcc + DPA-side algorithm compiled by dpacc); they are coupled by the algorithm entry points and by the parameter shape the host sets## Capabilities and modes two-side-program rule + TASKS.md ## configure step 2
2. Create the per-PCC-instance doca_pcc contextOne doca_pcc Core context per BlueField port whose RDMA / RoCE traffic the custom algorithm is meant to control## Capabilities and modes per-instance-context rule + TASKS.md ## configure step 4
3. Load the PCC algorithm image and attach it to the portdoca_pcc_app is the loaded image of the user's DPACC-compiled DPA-side algorithm; loading it into the doca_pcc and starting the context attaches it to the port the doca_dev represents## Capabilities and modes app + attach tables + TASKS.md ## configure step 5
4. Honor triple-axis preconditions: BlueField generation, firmware custom-PCC slot, DOCA + DPACC versionAn older BlueField may not expose the DPA at all; a newer one may expose the DPA but have the firmware-level custom-PCC slot disabled; a matched BlueField + firmware combo may still fail at load if DOCA + DPACC are skewed## Safety policy env-precondition matrix + TASKS.md ## configure step 1
5. Choose doca-pcc only when a CUSTOM algorithm is neededThe default factory PCC in ConnectX firmware does not need this library; the pcc_counters CLI does not either; the library is for custom algorithms only## Capabilities and modes path-selection rule + ## Deferred topic boundaries
6. Diagnose a PCC errorMap DOCA_ERROR_NOT_SUPPORTED / _NOT_PERMITTED / _INVALID_VALUE / _BAD_STATE / _DRIVER to a root cause without leaving the PCC layer prematurely## Error taxonomy + TASKS.md ## debug

Two cross-cutting rules apply to every pattern above, both defined in ## Capabilities and modes: the two-side-program model (host loads, parameterizes and starts; the DPA-side algorithm executes — a proposal that the host “compute the rate-update directly” has the model wrong) and triple-axis capability discovery (DOCA cap-query + DPA exposure + firmware custom-PCC slot — quoting one or two axes misses the “the doc page says custom PCC exists but doca_pcc_* returns DOCA_ERROR_NOT_PERMITTED” cases).

Capabilities and modes

The two orthogonal selection axes for any custom-PCC design from the host side are which BlueField port whose RDMA / RoCE traffic the algorithm controls (doca_pcc per doca_dev that maps to a DPA-capable BlueField with the firmware custom-PCC slot enabled) and which PCC algorithm image (the doca_pcc_app produced by dpacc from the user's DPA-side algorithm source) the host is going to load. Choose both before writing any host-side load code, then drill into the relevant capability-query.

Two-side-program model — the host side and the DPA side.

SideWhat runs thereToolchainWhat this skill covers
Host sideC / C++ (or any language that can FFI a C library) using doca-pcc to load / parameterize / start / stop the custom PCC algorithm and to observe what it reports backHost system compiler + pkg-config doca-pccAll of ## Capabilities and modes / ## Error taxonomy / ## Observability / ## Safety policy below
DPA sideThe custom congestion-control algorithm body that runs on the BlueField DPA processor and affects RDMA / RoCE flows on the attached port; the user's source compiled by dpacc into the binary embedded in the host executable as a doca_pcc_appdpacc (DPACC compiler) — same compiler as doca-dpa/SKILL.md, and the same shape of compile stepThis skill names the DPA side and routes via doca-public-knowledge-map/SKILL.md to the public DOCA PCC programming guide and the companion DPA / DPACC guides; it does not redefine the DPA-side API surface or design any specific algorithm body

The agent's rule: when the user asks "what should my algorithm compute", that is a domain question (research / workload tuning), NOT an API question — route via doca-public-knowledge-map/SKILL.md to the public DOCA PCC programming guide and to the user's own congestion-control expertise. When the user asks "how do I load my algorithm from the host and attach it to a port", that is this skill's scope. Two distinct questions; two distinct surfaces.

Path selection — custom PCC vs default firmware PCC vs counter CLI. Before any doca-pcc setup, the agent must confirm doca-pcc is even the right artifact:

User intentRight artifactWhy this skill is / isn't it
Default firmware PCC works; just want it onNone of this skill — firmware-side knobs only; route via doca-public-knowledge-map/SKILL.mddoca-pcc only loads custom algorithms; firmware-shipped algorithms run without it
Want to inspect PCC counters at runtime, no algorithm changepcc_counters CLI — a separate diagnostic tool; route via doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools)The counter tool is read-only inspection; doca-pcc is a control / load library. They share a name prefix but are different artifacts
Need a CUSTOM congestion control algorithm; researching a new algorithm; tuning to a specific workloaddoca-pcc library (this skill) — load a DPACC-compiled custom algorithm onto a BlueField portThis is the only path doca-pcc is designed for; if none of the rows above match, stay here

The per-PCC-instance doca_pcc context — one per BlueField port the host is driving.

ObjectLifetimeWhat it ownsKey calls
doca_pccPer BlueField port the host is driving a custom PCC algorithm on; created against a doca_dev that maps to a DPA-capable BlueField port with the firmware custom-PCC slot enabledThe DOCA-side bookkeeping for that PCC instance, the registration of the loaded PCC algorithm image, and the host-side observability for what the running algorithm reports backPCC-specific doca_pcc_create / configure / doca_pcc_start / doca_pcc_stop / doca_pcc_destroy; doca_pcc_cap_* for what this device + firmware combo actually supports. A doca_pcc is not a doca_ctx

A host driving custom PCC on more than one BlueField port needs one doca_pcc per port — there is no "global PCC context". The agent must ask which BlueField port (which doca_dev, mapping to which physical port handling the user's RDMA / RoCE traffic) the user intends to control before recommending any doca_pcc_* call.

The loaded PCC algorithm image (doca_pcc_app) — the output of dpacc made visible to the host.

ObjectLifetimeWhat it representsKey calls
doca_pcc_appLoaded into a doca_pcc before that doca_pcc is started; replaced only by destroying the parent doca_pcc and creating a new oneThe DPA-side congestion-control algorithm binary dpacc produced from the user's DPA-side source, embedded into the host executable at link time, and now addressable on the DPA processor that the BlueField port belongs to via the host-side DOCA Core lifecycleImage-load helpers exposed by the host-side PCC API; the entry-point set in the loaded image is the set of algorithm-side callbacks the user marked in their DPA-side source that dpacc compiled

The agent's rule: the host's view of "which custom PCC algorithm is running on this port" is exactly the set of entry points in the loaded doca_pcc_app. If the user is "trying to attach an algorithm whose entry points aren't in the image", that is a build-side question — go back to ## build and to the DPACC guide via doca-public-knowledge-map/SKILL.md, not a host-side load-call fix.

Attach-to-port semantics — the algorithm binds to a BlueField port carrying RDMA / RoCE.

SurfaceWhat it doesWhy the agent must surface it explicitly
doca_dev selection at doca_pcc createThe doca_dev the doca_pcc is created against is the BlueField port whose RDMA / RoCE traffic the custom algorithm will affectA custom PCC algorithm with no RDMA / RoCE traffic on its attached port has nothing to do. If the user has not stood up RDMA / RoCE on this port, route to doca-rdma/SKILL.md FIRST; PCC only modulates existing traffic
Starting the doca_pcc contextdoca_pcc_start() is the moment the loaded algorithm becomes live on the port; before this point the algorithm is loaded but inert. (The doca_pcc is NOT a doca_ctx — it has its own doca_pcc_create / _start / _stop / _destroy lifecycle and no doca_pcc_as_ctx.)Stopping the doca_pcc (doca_pcc_stop) reverts the port to whatever the firmware's default PCC behavior is (or no PCC, depending on the firmware). The agent must surface this transition explicitly — "I started the program but my flows look unchanged" is almost always a "the start hasn't been called" or "there's no RDMA / RoCE traffic on this port to affect" bug

Triple-axis capability discovery — the only rule. Before deploying any custom PCC algorithm, run ALL THREE of: a DOCA cap-query against the active doca_devinfo, confirm the BlueField generation actually exposes the DPA processor (the algorithm runs on the DPA), AND confirm the BlueField firmware has the custom-PCC slot enabled. Any axis missing the support fails the deployment.

AxisWhat to callWhy the agent must ask
DOCA sideThe doca_pcc_cap_* family against the active doca_devinfo for the BlueField port the host is driving. In DOCA 3.5, also query the device-side declaration limits with the doca_pcc_dev_get_* limit getters in the public PCC header (counter sum limit, max threads per counter set) before declaring resourcesPCC-side compatibility of custom-algorithm load with this device + this DOCA install is device-conditional; do not assume the capability is on every BlueField + DOCA combo
BlueField generation + DPA presencepkg-config --modversion doca-pcc agrees with doca_caps --version; the user's BlueField is on a generation that carries a DPA processor (older generations may not). This is the same hardware axis as doca-dpa CAPABILITIES.md ## Capabilities and modes (doca-dpa/CAPABILITIES.md#capabilities-and-modes)A BlueField without DPA hardware will fail the cap query no matter how recent the DOCA install is. Surface that distinction so the user does not chase a software upgrade for a hardware gap
Firmware-level custom-PCC slotThe BlueField firmware's custom-PCC slot must be enabled before any host-side load call. This is a firmware configuration knob set via the env-side firmware tools, not via doca-pcc itself — route to doca-setup/SKILL.mdA BlueField whose firmware does not enable the custom-PCC slot will reject load calls with DOCA_ERROR_NOT_PERMITTED even if DOCA and DPA capability queries are happy; this is a firmware-side fix, not a code change

Device-side declaration workflow (DOCA 3.5). The public PCC header adds a declaration stage that must be completed before doca_pcc_start(). The host declares the device-side resource layout with the doca_pcc_dev_declare_* family: number of counter groups, number of histograms, threads per counter set, per-algorithm parameter and counter counts, and slot-to-algorithm bindings. Histogram IDs are registered per algorithm with doca_pcc_dev_algo_register_hist_ids, counter types are set with doca_pcc_dev_set_counter_type, and the declared user memory is committed with doca_pcc_dev_user_declare_memory. The public PCC header is the authoritative source for the exact call order and required arguments; do not guess the sequence from function names alone.

Histograms are declared with a mode from the DOCA_PCC_DEV_HISTOGRAM_MODE_* family in the public PCC header. The family selects linear, exponential, or free histogram binning; the histogram init entry point takes the mode, edges, bin count, port, target app, counter group ID, histogram ID, and description. The same header defines the doca_pcc_dev_histogram_* lifecycle entry points for enable, disable, clear, update, and description retrieval.

Configuration shape. Mandatory preconditions before any doca_pcc_start(): the doca_pcc context must be created (via doca_pcc_create) against a doca_dev that maps to a DPA-capable BlueField port whose firmware has the custom-PCC slot enabled; the PCC algorithm image (doca_pcc_app) compiled by dpacc must be loaded into the doca_pcc; the device-side declaration workflow from the public PCC header must be completed (declare counter groups, histograms, threads per counter set, per-algorithm parameter/counter counts, histogram IDs, counter types, slot bindings, and user-declared memory); the algorithm's host-side parameters (whatever knobs the algorithm exposes) must be set; the doca_pcc_cap_* queries and the doca_pcc_dev_get_* limit getters must agree the deployment is supported on this combo. Optional configurations (algorithm parameter retunes, observability queue sizing) are program-side tunables that ride on top of the same cap-query rule.

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 PCC-specific overlay is:

  • DOCA must match the DPACC compiler per the DOCA Compatibility Policy. The DPACC compiler is the build-time component that turns the user's DPA-side PCC algorithm source into the binary embedded in the host executable as a doca_pcc_app; the host-side runtime that loads it is doca-pcc. Mismatched DOCA + DPACC versions fail at link time (missing symbols on either side) or at load time (DOCA_ERROR_DRIVER or DOCA_ERROR_INVALID_VALUE from the host-side load call) in ways that look like hardware bugs but are version-skew bugs. This is the same overlay doca-dpa CAPABILITIES.md ## Version compatibility (doca-dpa/CAPABILITIES.md#version-compatibility) documents for DPA itself, because the custom PCC algorithm is DPA-side code. The agent must surface BOTH pkg-config --modversion doca-pcc AND the installed dpacc version, cross-check them against the DOCA Compatibility Policy at https://docs.nvidia.com/doca/sdk/doca-compatibility-policy/index.html, and route any disagreement to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) before any PCC-layer diagnosis. Per the cross-cutting cap-query rule in doca-version CAPABILITIES.md ## Observability (doca-version/CAPABILITIES.md#observability), the doca_pcc_cap_* query against the active doca_devinfo is the runtime authority for "is this custom PCC deployment supported on this hardware + this DOCA install + this firmware", and the four-way-match check (doca-pcc.pc plus doca-common.pc plus the matching DPACC) per doca-version CAPABILITIES.md ## Version compatibility (doca-version/CAPABILITIES.md#version-compatibility) catches the DOCA upgraded but DPACC didn't partial-install pattern before it surfaces as a load failure.

  • DOCA 3.5 expanded the public API surface. The 3.5 release added the doca_pcc_dev_* declaration, histogram, and counter families, the doca_pcc_* thread and log families, and the DOCA_PCC_DEV_HISTOGRAM_MODE_* constants. Code written against the pre-3.5 API must be recompiled against the 3.5 public headers; code that uses the new declaration/histogram/counter calls requires DOCA 3.5 or later and will not link or load on older DOCA. Treat the presence or absence of these families as a version signal: a build that references the new families is a 3.5+ build, and a 3.5 library paired with pre-3.5 headers (or vice versa) is the same version-skew failure class as the DPACC mismatch above. The authoritative declarations are in the doca-pcc public headers shipped with the component; do not infer the API from older documentation.

Error taxonomy

PCC-specific overlays on the cross-library DOCA_ERROR_* taxonomy. The cross-library taxonomy itself lives in doca-programming-guide CAPABILITIES.md ## Error taxonomy (doca-programming-guide/CAPABILITIES.md#error-taxonomy); the rows below are the PCC surface meaning that the agent must disambiguate before falling back to the cross-library response.

ErrorPCC context where it shows upPCC-specific cause
DOCA_ERROR_NOT_SUPPORTEDdoca_pcc create / start; doca_pcc_cap_* family; first algorithm-load callThe BlueField in this host does not support custom PCC algorithms at all — typically because the BlueField generation is too old or the BlueField does not have a DPA processor exposed to the host (which custom PCC requires, since the algorithm runs on the DPA). Run the matching doca_pcc_cap_* against the active doca_devinfo; surface BOTH which DOCA version is installed AND which BlueField generation the host sees. Do not paper over with a retry.
DOCA_ERROR_NOT_PERMITTEDdoca_pcc create / start; algorithm-load callEither the standard doca_dev access is missing (the user / process cannot open the target doca_dev — same baseline as every other DOCA library), OR — and this is the PCC-specific case the agent MUST surface — the BlueField firmware does not have the custom-PCC slot enabled. The two look identical at the doca-pcc API surface and the fix is different: doca_dev access is a host-OS / group-membership fix per doca-setup ## Safety policy (doca-setup/CAPABILITIES.md#safety-policy); the firmware-level custom-PCC slot is a firmware-side enable per doca-setup/SKILL.md. The agent must check the firmware-side enable BEFORE concluding "this is a permission problem".
DOCA_ERROR_INVALID_VALUEAlgorithm-load call; algorithm-parameter set callsEither the loaded algorithm image is incompatible with the target device (the image was built for a different BlueField generation, or against a different DOCA install), or a host-side algorithm parameter is out of the range the algorithm advertises. Re-check the build provenance of the doca_pcc_app against this host's DOCA + DPACC versions; re-read the DPA-side algorithm's parameter shape. Do not adjust the parameter value blindly without confirming the parameter range.
DOCA_ERROR_BAD_STATEAny doca_pcc_* call before the doca_pcc is started or after it is stopped; teardown ordering between the loaded doca_pcc_app and the parent doca_pccLifecycle violation. The most common case is calling host-side parameter or observability helpers before doca_pcc_start(), or destroying the doca_pcc while the loaded doca_pcc_app is still being referenced. Walk the universal Core lifecycle in doca-programming-guide CAPABILITIES.md ## Capabilities and modes (doca-programming-guide/CAPABILITIES.md#capabilities-and-modes); reverse the configure order on teardown.
DOCA_ERROR_DRIVERdoca_pcc create; algorithm-load call when DOCA + DPACC versions are skewed; first start when the firmware-side custom-PCC slot is in a transitional stateThe PCC driver layer reported failure to DOCA. Most common cause is a DOCA + DPACC version mismatch per the DOCA Compatibility Policy; second most common is the algorithm image was built against a different DOCA install than the host runtime; third is a firmware-side custom-PCC slot that is enabled but in a transitional state (e.g. firmware was reconfigured but the BlueField has not been reset since). Route to doca-setup ## debug (doca-setup/TASKS.md#debug) layer 5 (driver) AND to doca-version TASKS.md ## debug (doca-version/TASKS.md#debug) for the version-skew side.

The agent's rule: never recommend a retry loop on DOCA_ERROR_* without first identifying which of the rows above is the cause. None of the PCC errors above want a retry — every row points at investigation (env / firmware / version / lifecycle / two-side-program signature mismatch), not at retry.

Observability

PCC observability surface is two-sided: there is a host-side observability surface (what the running algorithm reports back to the host through the host-side doca-pcc API, the DOCA logger, cap-query snapshots, and the PCC log file path get/set APIs doca_pcc_log_file_get / doca_pcc_log_file_set) AND an infrastructure-side observability surface (the pcc_counters diagnostic CLI documented in the public DOCA Tools umbrella reachable via doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools) plus the DPA-side developer tools inherited from doca-dpa CAPABILITIES.md ## Observability (doca-dpa/CAPABILITIES.md#observability)). The agent must reach for both, not just one — a custom PCC algorithm that loads cleanly but produces no visible change in RDMA / RoCE traffic is almost always visible on one of the infrastructure-side tools.

Three primary signals the agent should reach for:

  1. Host-side reports surfaced by the running algorithm. Whatever observability the host-side doca-pcc API exposes (algorithm-defined report stream, per-event callbacks, status counters) is the first place to look when the user reports "the algorithm loaded but I'm not sure it's doing anything". Missing expected reports can result from the host PE not being progressed, no DPA-side report-emission path, or a host report queue that is not drained and becomes full. Check those in that order before attributing the issue to the algorithm body. As of DOCA 3.5, the host-side API also exposes explicit PCC log file path control through doca_pcc_log_file_get and doca_pcc_log_file_set; the developer must use these to direct PCC logs to a known file and to retrieve the current path before collecting logs, rather than relying only on the generic DOCA logger settings.

  2. Capability snapshot at configure time. The output of doca_pcc_cap_* against the active doca_devinfo together with the installed pkg-config --modversion doca-pcc and the installed dpacc version is the baseline of "what the library + the hardware + the firmware + the DPACC compiler said was possible" before any algorithm was loaded. Save it; if a runtime call later returns DOCA_ERROR_NOT_SUPPORTED or DOCA_ERROR_NOT_PERMITTED the diff against this baseline is the bug.

  3. Infrastructure-side counter tool + DPA-side developer tools (route via doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools)). When the host-side surface shows the algorithm is loaded and reports look fine but the user's RDMA / RoCE traffic shows no change in congestion behavior, the pcc_counters CLI is the diagnostic the agent should route to for read-only inspection of PCC counters at the port. For DPA-side hangs (the algorithm body is running but stuck), the DPA-side developer tools named in doca-dpa CAPABILITIES.md ## Observability (doca-dpa/CAPABILITIES.md#observability) apply. The agent must NAME the existence of these tools and route the user there; the per-tool surface is out of scope for this skill.

For cross-cutting observability primitives (--sdk-log-level, the DOCA_LOG_LEVEL env var, the trace build flavor) see doca-debug CAPABILITIES.md ## Observability (doca-debug/CAPABILITIES.md#observability). For the install-tree observability (logger names, package layout, sample tree) 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.

PCC's safety surface is env-precondition-driven AND two-side-program-driven AND firmware-configuration-driven. The three most common PCC first-app failures are (1) the host's BlueField generation does not expose a DPA processor to the host at all; (2) the BlueField firmware does not have the custom-PCC slot enabled; and (3) the host-side load call and the DPA-side algorithm image disagree because one side was rebuilt while the other was not. The agent's job is to verify all three before any host-side load call, not after the first DOCA_ERROR_DRIVER.

The env-precondition matrix the agent must walk for any new host-side custom PCC setup:

PreconditionWhat must be trueHow the agent verifiesWhere to fix
BlueField with a DPA processor visible to the hostThe host's doca_dev enumeration includes a BlueField whose generation carries a DPA processor and whose mode exposes that DPA to the host (since the custom PCC algorithm runs on the DPA)doca_pcc_cap_* against the active doca_devinfo; cross-check with doca_caps --list-devs; confirm BlueField mode via the env-side BlueField checks. Same hardware axis doca-dpa CAPABILITIES.md ## Safety policy (doca-dpa/CAPABILITIES.md#safety-policy) documentsdoca-setup/SKILL.md for the env-side BlueField mode; this is not a code fix in the host-side PCC program
BlueField firmware has the custom-PCC slot enabledThe BlueField firmware must be configured to permit a custom (non-factory) PCC algorithm to be loaded; this is a firmware-side knob, not a host-side library callVia the env-side firmware configuration tools — the agent must NAME this precondition explicitly even though the exact firmware tool sits in doca-setup/SKILL.md. A successful doca_dev open with no PCC features in doca_pcc_cap_* can also mean that the BlueField lacks DPA exposure or does not support custom PCC; run the full triple-axis discovery to disambiguatedoca-setup/SKILL.md for the firmware-side enable; the BlueField typically needs a reset after the slot is flipped before the new state takes effect
DOCA install paired with a matching DPACC compilerpkg-config --modversion doca-pcc and the installed dpacc are at versions the DOCA Compatibility Policy lists as compatiblepkg-config --modversion doca-pcc; check the installed dpacc version; cross-check against the DOCA Compatibility Policy. Same overlay doca-dpa CAPABILITIES.md ## Safety policy (doca-dpa/CAPABILITIES.md#safety-policy) documentsdoca-setup/SKILL.md for the install-side; route to doca-version/SKILL.md for the four-way-match check
Standard DOCA doca_dev accessThe user / process can open the target doca_dev for the BlueField port — same baseline DOCA access rule as every other DOCA library; typically requires sudo or membership in the host's standard mlnx-style groupThe DOCA doca_dev enumeration succeeds for the target device; if it does not, that is an env-side problemdoca-setup/SKILL.md for the env-side; do not modify the program
Host-side parameter shape matches DPA-side algorithmThe host-side parameter set calls match the parameter shape (count, sizes, types) the DPA-side algorithm in the loaded doca_pcc_app actually exposesRe-read the DPA-side algorithm source and compare with the host-side parameter calls; if the DPA-side source changed, rebuild the PCC algorithm image via dpacc AND rebuild the host executable that embeds itProgram-layer fix on the two sides together; do not patch only one side
Single small-algorithm smoke succeeded before complex algorithmsA trivial PCC algorithm (no-op rate-update, or a pass-through that emits a single report) loads and runs end-to-end on this exact host + this exact image + RDMA / RoCE traffic actually flowing on the attached port, before any sophisticated algorithm is attemptedWalk the smoke step in TASKS.md ## test step 1; a smoke that fails identifies env-side or firmware-side or two-side-program gaps cheaply, before any algorithm design effort is wastedDiagnose the smoke failure first; do NOT scale a broken smoke into a complex algorithm design

Do not partial-rebuild one side. A host-side rebuild against a new DOCA install with the PCC algorithm image still built by an old dpacc, or a DPA-side rebuild without rebuilding the host that embeds it, fails PCC in non-obvious ways: the host load call may succeed and the algorithm may silently misbehave on the wire or return DOCA_ERROR_DRIVER at load. The fix is to rebuild both sides against the matched DOCA + DPACC versions per the DOCA Compatibility Policy, not to silence the error.

Lifecycle ordering is PCC-aware. The loaded doca_pcc_app must be released BEFORE the parent doca_pcc is destroyed; stop the instance with doca_pcc_stop, release the loaded app, destroy the instance with doca_pcc_destroy, then close the doca_dev. Do not use doca_ctx_stop or doca_ctx_destroy for this object. Out-of-order teardown surfaces as DOCA_ERROR_BAD_STATE on subsequent calls and may also leave the BlueField port with a half-configured custom PCC state that the firmware has to recover from on the next start — the agent must surface this ordering explicitly.

This skill does not define an algorithm. doca-pcc loads a congestion control algorithm the user supplies; it does not implement one. When the user asks "what algorithm should I write", the agent must refuse to invent an algorithm body and must route the user to the public DOCA PCC programming guide via doca-public-knowledge-map/SKILL.md and to the user's own congestion-control domain expertise.

Deferred topic boundaries

This skill scopes itself to the host-side doca-pcc library for custom PCC algorithms. Adjacent topics the agent will get asked but should route elsewhere:

  • DPA-side congestion-control algorithm design itself (the algorithm body that runs on the DPA processor, the per-event entry-point set, the DPA-side memory model the algorithm uses, congestion-control theory) — outside this skill. Route to the public DOCA PCC programming guide and the DPACC compiler guide via doca-public-knowledge-map/SKILL.md; this skill assumes the user has the DPA-side algorithm and is asking how to load and attach it from the host.

  • pcc_counters diagnostic CLI (the real artifact is the pcc_counters.sh script installed at /opt/mellanox/doca/tools/pcc_counters.sh) — a separate artifact with its own public page; route via doca-public-knowledge-map ## DOCA tools (doca-public-knowledge-map/SKILL.md#doca-tools). It is read-only inspection; this skill is control + load. Conflating the tool with the library is the single most common PCC first-app design error.

  • Default factory PCC algorithm shipped in ConnectX firmware — does not need this library. Configuration of the factory PCC is a firmware-side concern; route via doca-public-knowledge-map/SKILL.md.

  • Generic DPA workloads that are not congestion control — doca-dpa/SKILL.md (see SKILL.md ## Related skills).

  • DPA developer tools (the DPA debugger, the DPA process-state inspector, the DPA statistics tool) — named in ## Observability for routing, but the per-tool surface lives in the public DPA Tools umbrella via doca-public-knowledge-map/SKILL.md.

  • DPACC compiler internals (flags, target options, how the host + DPA split-build is wired) — out of scope. Route to the public DOCA DPACC Compiler guide via doca-public-knowledge-map/SKILL.md.

  • RDMA / RoCE traffic bring-up, Core context internals, the cross-cutting DOCA_ERROR_* taxonomy and the cross-cutting debug ladder — owned by doca-rdma, doca-programming-guide and doca-debug; see SKILL.md ## Related skills. A doca-pcc deployment with no RDMA / RoCE traffic on the attached port is a pre-flight gap, not a doca-pcc bug. This skill's ## debug carries the PCC overlay for layers 5-7 (firmware custom-PCC slot, two-side-program parameter-shape mismatch).

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 whose DPA processor is exposed to the host AND whose firmware has the custom-PCC slot enabled. Also requires the DPACC compiler installed at a version matched to DOCA per the DOCA Compatibility Policy. Reads the user's local install via `pkg-config doca-pcc` 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-pcc · 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-pcc.zip