
DOCA Bench Extension
OfficialFreeEnhance doca-bench with custom plug-ins for specific workloads.
Free · Opens the source repo
What DOCA Bench Extension does
The DOCA Bench Extension skill is designed for developers and engineers who need to create custom plug-ins for the doca-bench benchmarking tool. This skill is particularly useful when the built-in workload modes of doca-bench do not adequately cover specific workload classes. By following the provided instructions, users can author, build, load, and debug their custom extensions, which are versioned shared libraries with specific C entry points marked as DOCA_EXPERIMENTAL.
To get started, users should consult the TASKS.md file, which outlines the necessary steps to configure, build, run, and test their extensions. The skill emphasizes a structured approach, ensuring that users can commit to the three-axis decision-making process that determines whether an extension is necessary. Furthermore, the CAPABILITIES.md file provides insights into what extensions can do that the built-in modes cannot, as well as the API surface available for developers.
This skill is targeted towards experienced AI agents and performance engineers who are already familiar with doca-bench and are looking to extend its capabilities. Users are expected to have a solid understanding of native build systems like Meson, shared library packaging on Linux, and the implications of using DOCA_EXPERIMENTAL APIs. It is not intended for those who can utilize existing built-in modes or for contributors modifying in-tree extensions.
When to use it
Use this skill when you need to create a custom benchmarking extension for `doca-bench` to cover specific workload classes.
When not to use it
This skill is not suitable for users who can benchmark their workloads using the built-in modes of `doca-bench` or for contributors working on the internal extension framework.
What you can build with it
Custom Workload Benchmarking
When standard `doca-bench` modes do not fit your workload, use this skill to create a custom extension.
Debugging Load Issues
If `doca-bench` fails to load your custom extension, this skill helps diagnose and resolve the issue.
Exploring API Capabilities
Use this skill to understand the capabilities of the `DOCA_EXPERIMENTAL` APIs for your custom benchmarking needs.
How to install DOCA Bench Extension
View source1. Install with the skills CLI
npx skills add nvidia/skills/doca-bench-extension --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by nvidiaDOCA Bench Extension
Where to start: This is a tool skill for the extension /
plug-in framework that augments
doca-bench — NOT a workload-shape
skill on its own. Open TASKS.md and start at
## configure to commit to the three-axis
decision (workload class is genuinely outside doca-bench's
built-in modes × extension API surface fits × parent-tool
co-load is acceptable), then ## build for
how a custom extension is compiled and laid out, then
## run for how doca-bench discovers and
invokes the extension, then ## test for the
smoke-before-bulk loop the agent applies to every new
extension. Open CAPABILITIES.md when the
question is what an extension can do that built-in
doca-bench modes cannot, what the extension API surface
looks like in broad strokes (the DOCA_EXPERIMENTAL C entry
points the shipped reference exposes), how the
build / registration / discovery flow works, or how the
extension's lifetime is bounded by the parent doca-bench
invocation. If doca-bench itself is the question, route to
doca-bench. If the question is
"which built-in doca-bench mode do I pick?", that is also
doca-bench — extensions are the
exit ramp for workloads built-in modes do not cover.
Example questions this skill answers well
- "My workload class is
<X>— doesdoca-benchmeasure it natively, or do I need an extension?" — the extension-vs-built-in decision question. The agent walks the user back todoca-bench's built-in mode inventory FIRST and only routes to the extension framework when no built-in mode applies. - "I want to benchmark a CUDA / GPU-side workload that
drives DOCA GPUNetIO RX and TX queues. Where do I start?
Is there a reference extension I can copy?" — the agent
surfaces the shipped
doca_bench_cudaextension under/opt/mellanox/doca/tools/bench_extension/doca_bench_cuda/as the reference exemplar and walks the operator through its API surface and build shape. - "How does
doca-benchactually discover and load my custom extension at runtime? Is it a versioned shared library? What does my entry-point need to look like?" — the build / registration / discovery flow question. The agent walks the Meson-built shared library shape, the versioning, and the parent-tool's runtime discovery path (which the agent does NOT invent from memory — the shipped extension'smeson.buildand the public DOCA Bench documentation ondocs.nvidia.comare the source of truth). - "The API headers I have are marked
DOCA_EXPERIMENTAL. What does that mean for my extension's stability across DOCA releases? Am I going to have to rebuild it every release?" — the experimental-surface and version compatibility question. - "Once I build my extension, what is the cheapest possible
smoke I can run before pointing my real workload at it?
How do I know
doca-benchactually loaded it, called into it, and that the call returned the data the parent tool expected?" — the smoke-before-bulk question. - "My custom extension builds, but
doca-benchsays it cannot find / load / call it. Where do I look first?" — the layered-debug question that distinguishes build-failures, load-failures, registration-mismatches, and runtime-call-failures.
Audience
Experienced AI agents and platform / performance engineers
who already use doca-bench for
the built-in workload modes and now have a workload class
that the built-in modes do not cover. Readers are expected
to be comfortable with native build systems (Meson, in this
codebase), shared-library packaging on Linux, and the
DOCA_EXPERIMENTAL API stability contract. If the user
asks about GPU-side benchmarking via the shipped
doca_bench_cuda reference extension, the reader is also
expected to be familiar with DOCA GPUNetIO and CUDA toolchain
basics — those domains live in their own skills, not here.
This skill is NOT for:
- operators who can express their workload with one of
doca-bench's built-in modes — that isdoca-bench; - operators who want to benchmark a different DOCA primitive (Flow, Comch, RMAX) via that primitive's own measurement tool — route to that tool;
- contributors authoring or modifying the in-tree extensions themselves (this skill is for external operators consuming the framework, not for internal DOCA contributors).
Language scope
A doca-bench extension surfaces as:
- A versioned shared library on Linux (
.sowithsoversionmatching the DOCA release), built via thedoca-bench-extensionMeson rules in the shipped/opt/mellanox/doca/tools/bench_extension/meson.buildand the per-extension subdirectory (the reference exemplar isdoca_bench_cuda/). - A small set of
DOCA_EXPERIMENTAL-marked C entry points that the parentdoca-benchinvokes — i.e. the API surface declared in the extension's header file. The shippeddoca_bench_cuda/doca_bench_cuda.his the reference for what that surface shape looks like in practice (*_init,*_device_query,*_device_synchronize, and per-workload kernel-start entry points such as*_start_nop_kernel,*_start_eth_recv_kernel,*_start_eth_send_kernel,*_start_eth_bidir_kernel). - A set of per-workload settings structs that the
parent passes through (e.g. the reference exemplar's
doca_bench_cuda_kernel_settings,doca_bench_cuda_eth_rx_kernel_settings,doca_bench_cuda_eth_tx_kernel_settings,doca_bench_cuda_eth_bidir_kernel_settingscarry block counts, threads-per-block, RX / TX queues, buffer address / mkey / size, a stop flag, and a stats pointer).
The skill itself is Markdown. The user's extension source is whatever language the workload requires (C / C++ / CUDA in the reference case). The agent does NOT prescribe a language beyond what the shipped reference demonstrates.
When to load this skill
Load doca-bench-extension when ANY of the following is
true:
- the user explicitly mentions
doca-bench-extension, thedoca_bench_cudareference extension, thedoca_bench_cuda_implshared library, or any of theDOCA_EXPERIMENTALextension entry points; - the user has confirmed (via
doca-bench TASKS.md ## configure) that none ofdoca-bench's built-in workload modes measures the class they want, and an extension is the exit ramp; - the user wants to copy / extend the shipped
doca_bench_cudareference into a custom GPU-side workload extension; - the user is debugging why
doca-benchcannot find / load / call a custom extension they built.
Co-load this skill with:
doca-bench(the parent tool — ALWAYS co-loaded; extensions only have value as plug-ins intodoca-bench);doca-version(theDOCA_EXPERIMENTALsurface is versioned with DOCA; the extension'ssoversionis the DOCAsoversion; the four-way version match applies);doca-gpunetiowhen the extension is GPU-side and uses GPUNetIO RX / TX queues like the reference exemplar (route the GPUNetIO semantics there, not here);doca-debuganddoca-setupfor the env-side debug ladder (driver, firmware, CUDA toolkit, dynamic linker).
Do NOT load this skill when the user's workload fits a
doca-bench built-in mode — extensions add cost (build
toolchain, version churn, the experimental-surface
contract); the built-in modes are always the first answer to
try.
What this skill provides
Three companion files in this directory, each owning a different question shape:
SKILL.md— this file. Audience, scope, loading order, related skills. Routes everything else.CAPABILITIES.md— what an extension can do that the built-in modes cannot, what the API surface looks like in broad strokes, how the build / registration / discovery flow works, what versions it ships in (including theDOCA_EXPERIMENTAL-stability overlay on top ofdoca-version), the layered error taxonomy, observability, and the safety policy overlay.TASKS.md— the procedural verbs (configure,build,run,test,debug, etc.) plus adoca-bench-extension-specific command appendix and the agent-sideuseworkflow that consumes the captured extension run.
The combined skill teaches an AI agent to drive the
extension-author-and-wire-in class of doca-bench
questions: confirm an extension is needed at all; locate
the shipped reference exemplar
(/opt/mellanox/doca/tools/bench_extension/doca_bench_cuda/); copy
its build + API surface shape; build a versioned shared
library that matches the DOCA release; smoke that the
parent doca-bench actually loads it; diagnose layered
failures when it does not.
What this skill deliberately does not ship
- Inventory of
doca-bench's built-in workload modes. That belongs todoca-bench. This skill is the exit ramp for what the built-in modes do not cover; it does not duplicate the parent's mode inventory. - Invented
DOCA_EXPERIMENTALentry-point names beyond what the shipped reference declares. The shippeddoca_bench_cuda/doca_bench_cuda.hon the user's install is the reference for what the surface shape looks like; the agent does not assert other extensions exist with specific signatures. - A canonical "right" extension layout. The shipped
doca_bench_cudareference IS the canonical layout; rewriting it here would drift from the source of truth. The agent points the operator at the shipped tree and walks the operator through adapting it. - A documented runtime discovery mechanism the agent
invents. The exact mechanism
doca-benchuses to locate and load extensions (search path, naming convention, registration call) lives in the public DOCA Bench documentation ondocs.nvidia.comand the installeddoca-benchbinary. The agent points the operator there rather than asserting a mechanism from memory. - DOCA GPUNetIO programming details. When the
extension is GPU-side (as the reference exemplar is),
the GPUNetIO RX / TX queue semantics live in
doca-gpunetio; this skill cross-links rather than duplicates. - CUDA toolchain installation guidance. Route to the
public NVIDIA CUDA Toolkit documentation on
docs.nvidia.com; this skill does not duplicate it. - Library-internal
doca-benchinvocation details unrelated to extensions. The parent's CLI flags, pipeline shapes, and built-in workload classes belong todoca-bench.
Loading order
When a doca-bench-extension question arrives:
- Confirm DOCA is installed AND
doca-benchis reachable on the user's install — if not, route todoca-setup; - Confirm none of
doca-bench's built-in modes covers the workload class — if any of them does, route back todoca-bench TASKS.md ## configureand stop. Extensions are the exit ramp, not the first answer; - Read
CAPABILITIES.mdto commit to the three-axis decision and walk the reference exemplar's API surface shape; - Read
TASKS.mdand walk## configure → ## build → ## run → ## test → ## debugin that order; do NOT start with## runwithout the build precondition step.
Related skills
Cross-link conventions follow the bundle's relative path
contract from tools/<X>/:
doca-bench— the parent tool. ALWAYS co-loaded. Extensions are plug-ins intodoca-bench; they do not replace it, they do not have a standalone CLI, they do not measure anything without the parent invoking them. Every question on this skill presupposes the parent.doca-version— theDOCA_EXPERIMENTALsurface is versioned with DOCA; the extension'ssoversionmatches the DOCA release per the shippedmeson.build. The four-way version match applies; rebuilding the extension across DOCA upgrades is the rule, not the exception.doca-gpunetio— when the extension is GPU-side and uses GPUNetIO RX / TX queues like the referencedoca_bench_cuda. Route the GPUNetIO semantics there.doca-setup— DOCA install posture (doesdoca-benchexist? does thedoca_bench_cuda_implreference library exist? is the CUDA toolchain installed when needed?).doca-debug— the cross-cutting debug ladder for env-side issues (dynamic linker, library search path, CUDA driver / toolkit, firmware).doca-public-knowledge-map— routing to the public DOCA Bench / DOCA GPUNetIO pages ondocs.nvidia.comand the release notes for the documented extension lifecycle / discovery mechanism.doca-structured-tools-contract— the agent's detect → prefer → fall back → report contract for the structured helpers (doca-env --json,doca-capability-snapshot,version-matrix.json) the build / load preconditions rely on.doca-hardware-safety— the canonical hardware-safety meta-policy thatCAPABILITIES.md ## Safety policyoverlays. Extensions are external code loaded intodoca-bench; the safety implications of loading experimental code into a benchmark that touches the dataplane / device are real.
This skill assumes the user has built shared libraries on Linux before and knows what a Meson build is. Background material on those topics belongs in the toolchain docs, not in this skill.
Frequently asked questions about DOCA Bench Extension
Similar skills
Heap Snapshot Analysis
Investigate V8 heap snapshots for memory issues.
VS Code Performance Workflow
Automate performance investigations in VS Code.
Memory Leak Audit
Prevent memory leaks with effective coding patterns.
CPU Profile Analysis
Analyze V8 and Chrome performance profiles for optimization.
Chat Performance Testing
Benchmark and validate chat UI performance in VS Code.
Vercel React Best Practices
Optimize your React and Next.js applications for performance.
