doca-bench-extension

Author, build, and debug custom doca-bench plug-in extensions for uncovered workload classes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When none of doca-bench's built-in workload modes can measure your workload, you must author a custom extension — a versioned shared library with DOCA_EXPERIMENTAL-marked C entry points — and getting the build, registration, loading, and debugging right is error-prone. This Skill guides agents through that entire extension lifecycle using the shipped doca_bench_cuda reference exemplar.

Core Features & Use Cases

  • Extension decision and design: Confirms whether a workload genuinely requires an extension versus a built-in doca-bench mode, then walks the API surface shape (entry points, settings structs, accounting structs, stop_flag lifetime contract) using the shipped doca_bench_cuda reference.
  • Build and version management: Guides Meson-based builds of versioned shared libraries whose soversion matches the running DOCA release, including the DOCA_EXPERIMENTAL rebuild-on-upgrade rule.
  • Layered debugging: Diagnoses failures across seven layers — build, load, registration, runtime call, and version mismatches — with a smoke-before-bulk testing discipline.
  • Use Case: A performance engineer needs to benchmark a CUDA GPUNetIO RX/TX kernel that no built-in doca-bench mode covers; the Skill walks them through copying the reference exemplar, adapting its entry points, building the .so, and running a no-op smoke before scaling up.

Quick Start

Ask your agent to help you benchmark a workload that no built-in doca-bench mode covers by authoring a custom extension based on the shipped doca_bench_cuda reference.

Frequently Asked Questions about doca-bench-extension

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

FAQPage Schema
How do I benchmark a workload that no built-in doca-bench mode covers?

Author a custom doca-bench extension: a versioned shared library exposing DOCA_EXPERIMENTAL C entry points that doca-bench loads at runtime. Start by copying the shipped doca_bench_cuda reference under /opt/mellanox/doca/tools/bench_extension/ and adapting its API surface shape.

How do I benchmark a CUDA GPUNetIO RX/TX kernel with doca-bench?

Use the shipped doca_bench_cuda reference extension, which drives GPUNetIO RX/TX queues from CUDA kernels with per-workload settings structs and a stop_flag lifetime contract. If your workload matches its nop/eth-recv/eth-send/eth-bidir kernels, you can use it directly without writing a new extension.

Why can't doca-bench find or load my custom extension .so?

Load failures usually come from an soversion mismatch with the running DOCA release, the library not being on the dynamic linker's search path, or an architecture/ABI mismatch. Check the SONAME with readelf -d, run ldd on the library, and confirm it was built against the same DOCA release's headers.

Do I need to rebuild my doca-bench extension after a DOCA upgrade?

Yes. The extension API is marked DOCA_EXPERIMENTAL, so the surface may change across releases without a deprecation window, and the library's soversion must match the running DOCA so_version. Rebuilding against the new release's headers and re-running the smoke tests is the rule on every DOCA upgrade.

When should I use a built-in doca-bench mode instead of an extension?

Always check the built-in mode inventory first — extensions are the exit ramp only when no built-in mode measures your workload class. Extensions add real cost: a build toolchain, version churn across DOCA releases, and the experimental API stability contract.

Why does my GPU extension kernel hang during benchmarking?

The most common cause is the stop_flag never being set by the parent, so the CUDA kernel runs forever and recovery requires a GPU reset. Every long-running extension kernel must respect the parent-set stop signal, and OOB reset access is a non-negotiable precondition for GPU-side extensions.