Doca Dpdk Bridge
NVIDIAOfficialCreated by NVIDIA
- Skill
- Tool integration
- Automation and integrations
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The doca-dpdk-bridge skill provides guidance for developers maintaining existing DPDK-based packet-processing applications who wish to layer DOCA functionality, such as DOCA Flow hardware steering, onto their existing infrastructure. It focuses on the interop layer, enabling the binding of DPDK port IDs to DOCA devices and the conversion between DPDK mbufs and DOCA buffers. This skill is intended for in-place integration rather than fresh DOCA-native development, ensuring that developers can leverage DOCA accelerators while preserving their established DPDK data-plane logic.
What it does
- Maps DPDK port IDs to DOCA devices using doca_dpdk_port_probe and doca_dpdk_port_as_dev.
- Facilitates conversion between DPDK rte_mbuf and DOCA doca_buf structures.
- Provides an error taxonomy for debugging bridge-specific issues and cross-library failures.
- Validates version compatibility between the installed DPDK and DOCA SDK environments.
- Offers workflows for configuring, building, and testing bridge-enabled applications.
- Defines the selection criteria for choosing between the bridge approach and native DOCA-eth.
When to use it
- You have an existing DPDK application and need to add DOCA Flow rules for hardware offload.
- You need to make a DPDK port visible to the DOCA SDK.
- You are moving packets between DPDK mbufs and DOCA buffers within your fastpath.
- You are troubleshooting DOCA_ERROR_* codes occurring during bridge-related calls.
- You need to verify if your current DPDK and DOCA versions are a supported matched pair.
Advantages
- Allows incremental adoption of DOCA features without a full data-plane rewrite.
- Maintains compatibility with existing DPDK-based packet processing logic.
- Provides clear guidance on the bridge-vs-native trade-off for project planning.
- Includes structured debugging paths for complex cross-library interactions.
Usage examples
- “How do I add DOCA Flow to my DPDK app?”
- The agent will guide you to bind your existing DPDK port using doca_dpdk_port_probe and explain how to layer DOCA Flow steering rules without modifying your core data-plane.
- “How do I make a DPDK port visible to DOCA?”
- The agent provides the mapping workflow between your rte_eth_dev port ID and the required doca_dev object.
- “DOCA_ERROR_NOT_FOUND on port registration.”
- The agent will help you check the DPDK/DOCA matched-pair version compatibility and verify your port registration sequence.
- “Should I use doca-dpdk-bridge or doca-eth?”
- The agent will apply the path-selection rule to determine if you should integrate with your existing DPDK app or migrate to a native DOCA-eth implementation.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/doca-dpdk-bridge/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-dpdk-bridge.zip -d .agents/skills
Documentation by NVIDIA
DOCA DPDK Bridge
Examples
"How do I add DOCA Flow to my DPDK app?" — this is in scope. Bind the DPDK port with
doca_dpdk_port_probe; do not rewrite the data-plane as nativedoca-eth."DOCA_ERROR_NOT_FOUND on port registration." — check the DPDK/DOCA matched-pair window before changing the probe call.
Instructions
Follow Loading order below. Open the tasks companion for configure / probe / debug. Open the capabilities companion for port binding and mbuf conversion. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed,
DPDK is already installed, the user has an existing DPDK
application, and they want to add DOCA capabilities to it
in-place (most commonly DOCA Flow for hardware steering)
without migrating the data-plane to DOCA-native APIs. 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
the bridge can express on this version. If the user has not
installed DOCA yet, route to
doca-setup/SKILL.md first. If the user is
starting fresh (no DPDK code yet) and just wants line-rate
packet I/O against DOCA, route to
doca-eth/SKILL.md instead — the bridge exists
for the interop case, not the start-fresh case.
How to use this skill. Read this file, then search the companion file
for the ## <name> heading the question needs and read that whole section.
Answer completely from it, quoting only its symbols and commands. Do not
browse docs; use the entry points in doca-public-knowledge-map. Give
environment checks as commands for the user's DOCA host. For out-of-scope
requests, name the skill that owns them and stop.
Example questions this skill answers well
The CLASSES of DOCA DPDK Bridge 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.
"I have a DPDK app — how do I add DOCA Flow rules to it without rewriting the data-plane?" — worked example: "my packet-processing app already drives mbufs through
rte_eth_*ports; I want to install DOCA Flow steering rules on those ports for HW offload". Answered by the bridge-vs-native selection rule inCapabilities and modes
the port-handover workflow in
configure step 3.
"How do I make a DPDK port visible to DOCA?" — worked example: "I have a DPDK port id from
rte_eth_dev_*; how does DOCA see it". Answered by the DPDK-port-id ↔doca_devmapping (doca_dpdk_port_probe/doca_dpdk_port_as_dev) inCapabilities and modes
bridge-objects table + the binding workflow in
configure step 4.
"How do I move packets between DPDK mbufs and DOCA bufs?" — worked example: "DPDK delivers an
rte_mbufto my fastpath; I want a DOCA library to operate on the payload". Answered by the mbuf ↔ DOCA-buf conversion shape inCapabilities and modes
the conversion-step workflow in
modify.
"Is the bridge even installed and is its DPDK compatible with my DOCA?" — worked example: "
pkg-config --exists doca-dpdk-bridgereturns failure on a host that has DPDK separately installed". Answered by the version-coupling rule inVersion compatibility
the cap-check workflow in
configure step 1.
"Should I be using
doca-dpdk-bridgeordoca-eth?" — worked example: "new project; I have not committed to DPDK yet". Answered by the path-selection table inCapabilities and modes
bridge-vs-native row + the deferred-verbs note in
Deferred task verbs.
"What does this
DOCA_ERROR_*from a bridge call mean and which layer caused it?" — worked example: "DOCA_ERROR_NOT_FOUNDon a port-registration call after the DPDK port came up cleanly". Answered by the bridge overlay on the cross-library taxonomy inError taxonomy
the layered ladder in
debug that escalates to
doca-debug/SKILL.md.
Audience
This skill serves external developers who already maintain a
DPDK-based packet-processing application — i.e., users whose
data-plane already drives rte_eth_* ports and rte_mbuf
buffers — and who want to add DOCA capabilities (most
commonly hardware steering via DOCA Flow) by linking the bridge
into the same process. It is not for users starting a fresh
DOCA-native project (route to doca-eth/SKILL.md)
and not for users running pure DPDK with no interest in DOCA
(no skill in this bundle applies). It is also not for NVIDIA
developers contributing to DOCA DPDK Bridge itself.
Language scope. DOCA DPDK Bridge ships as a C library with
pkg-config module name doca-dpdk-bridge (the agent must
confirm the spelling against the user's install via
pkg-config --exists doca-dpdk-bridge; some DOCA releases use a
slightly different module name and the agent must not guess).
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, …)
typically do not use this bridge — DPDK itself is C-shaped, and
a non-C DPDK app is rare; if the user is in that minority, the
skill's contribution is to keep the port-handover, capability,
permission, and error-taxonomy guidance language-neutral and
route them to the public C ABI as the authoritative surface.
When to load this skill
Load this skill when the user is doing hands-on DOCA DPDK Bridge work, in any language. Concretely:
The user has an EXISTING DPDK application (their data-plane already drives
rte_eth_dev_*ports andrte_mbufbuffers), and they want to layer DOCA on top — adding DOCA Flow rules, feeding packets into a DOCA accelerator (Compress, AES-GCM, …), or wiring a DOCA service into the same process.The user needs to bind a DPDK port id to a
doca_dev(viadoca_dpdk_port_probe/doca_dpdk_port_as_dev) so DOCA Core / DOCA Flow can operate on the same physical port.The user needs to convert between DPDK mbufs and DOCA-bufs at the data-plane boundary, and is asking about the conversion helpers and their cost.
The user is debugging a
DOCA_ERROR_*returned from a bridge call (lifecycle vs. permission vs. capability vs. DPDK-port-not- registered vs. mbuf-conversion-failed) and the layered DPDK ↔ DOCA stack underneath.The user is hitting cross-version pain: their DPDK install and their DOCA install are not the matched pair the bridge expects.
The user is asking "native
doca-ethordoca-dpdk-bridge?" and the agent needs the path-selection rule.
Do not load this skill for general DOCA orientation, install
of DOCA itself, fresh DOCA-native packet I/O (use
doca-eth/SKILL.md), flow-rule programming on
its own (use doca-flow/SKILL.md), host ↔ DPU
control messaging (use doca-comch/SKILL.md),
or RDMA data movement (use doca-rdma/SKILL.md).
For DOCA documentation orientation, 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 bridge- specific material lives in two companion files:
the capabilities companion — what the DOCA DPDK Bridge can express on this version: the bridge-vs-native selection rule (when to use
doca-dpdk-bridgevs nativedoca-eth), the bridge-object surface (DPDK-port-id ↔doca_devmapping, thedoca_dpdk_mempoolmbuf ↔ DOCA-buf conversion), the capability-query surface (the singledoca_dpdk_cap_is_rep_port_supported), the bridge error taxonomy (mapped onto the cross-libraryDOCA_ERROR_*set), the observability surface (DPDK-side counters + DOCA-side PE events), and the safety policy that gates the matched-pair DPDK ↔ DOCA version coupling, the EAL-must-be-up precondition, and DPDK-side privileges.the tasks companion — step-by-step workflows for the six in-scope bridge verbs:
configure,build,modify,run,test,debug. Plus aDeferred task verbsblock that points out-of-scope questions at the right next skill, and aCommand appendixof the recurring commands the agent reaches for.
The skill assumes a host or BlueField where DOCA AND DPDK are
already installed at the standard locations and the user has the
privileges their public install profile expects (typically sudo
or mlnx-group membership for DOCA, plus the DPDK-side
privileges to mount hugepages, bind PCIe ports, and open the
target rte_eth device). It does not cover installing DOCA —
that path goes through doca-setup/SKILL.md;
it does not cover installing or learning DPDK itself — that
belongs in upstream DPDK documentation reachable via
doca-public-knowledge-map/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 DPDK Bridge application source code, in any language. The verified bridge source code is the bridge usage inside the shipped C DOCA Flow samples at
/opt/mellanox/doca/samples/doca_flow/(e.g.flow_common.c, which callsdoca_dpdk_port_probe()/doca_dpdk_port_as_dev()), plus the canonical reference applications that pair DPDK + DOCA Flow (seedoca-public-knowledge-map/SKILL.mdfor the reference-applications index). 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 indoca-programming-guide/SKILL.md, layered with the bridge-specific overrides inmodify.
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 + DPDK, wherepkg-config --modversion doca-dpdk-bridgeandpkg-config --modversion libdpdkare the source of truth.A
samples/,bindings/, orreference/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
Read this skill first to confirm the user's question is in scope (existing DPDK app + wants DOCA on top — not fresh).
For the bridge capability matrix, the bridge-vs-native selection rule, port-handover surface, capability-query rules, error taxonomy, observability, and safety policy, see the capabilities companion.
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,
doca-eth/SKILL.md for the start-fresh path that
is the bridge's deliberate alternative,
doca-flow/SKILL.md for the steering library
that is the most common reason to use this bridge in the first
place, 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 "bridge-specific
guidance".
Related skills
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 bridge URL slug isDOCA-DPDK-Bridge. Reference applications that pair DPDK + DOCA Flow (the canonical adopters of this bridge) are reachable from the same map's reference- applications index.doca-setup/SKILL.md— env preparation, install verification, hugepage mounts (DPDK requirement), port-state checks (devlink dev show,ip link), permission and group-membership requirements for opening adoca_devAND for binding PCIe ports under DPDK. This skill assumes its preconditions are satisfied.doca-version/SKILL.md— canonical DOCA version-handling rules. This skill's## Version compatibilitycross-links the four-way match rule and adds only the bridge-specific overlay (DPDK ↔ DOCA matched-pair coupling).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 canonicalpkg-config+ meson build pattern, the universal modify-a-shipped-sample first-app workflow, the universal lifecycle, the cross-libraryDOCA_ERROR_*taxonomy, and the program-side debug order. This skill layers bridge specifics on top.doca-eth/SKILL.md— the alternative path for users starting fresh: pure DOCA-native queue I/O viadoca_eth_rxq/doca_eth_txqwith no DPDK in the picture. The bridge exists because migrating an existing DPDK app todoca-ethis often the wrong tradeoff; for a new project with no DPDK lock-in,doca-ethis the right choice.doca-flow/SKILL.md— the steering library that is the most common reason a DPDK app reaches for this bridge. The bridge binds a DPDK port id to adoca_dev; DOCA Flow programs steering rules onto thatdoca_dev. The two libraries are designed to compose.doca-debug/SKILL.md— the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). Bridge-specific debug (DPDK ↔ DOCA version drift, port-not-registered symptoms, mbuf-conversion failures) overlays on top of that ladder.
Files
- ATTRIBUTION.mdAdded by AutoGineer906 B
- BENCHMARK.md9.9 KiB
- CAPABILITIES.md22.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md15.0 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md33.2 KiB
- evals/evals.json3.1 KiB
- skill-card.md5.2 KiB
- skill.oms.sig5.1 KiB
TASKS.md
DOCA DPDK Bridge 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 (bridge
install probe → DPDK preconditions → single-rule smoke → multi-
rule run → cross-version), not a one-shot pass — see the
eval-loop overlay in ## test below. Every workflow below
assumes the interop case: the user has an EXISTING DPDK app
and wants to add DOCA libraries on top. If the user is starting
fresh (no DPDK code yet), the right answer is not this skill —
route to doca-eth/SKILL.md and stop here.
Read this file when the loader sent you here from
SKILL.md. For the bridge capability surface,
bridge-vs-native path selection, port-handover and
mbuf-conversion shape, 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.
For the steering library that is the most common reason to use
this bridge, see doca-flow/SKILL.md. For the
matched-pair DPDK ↔ DOCA version coupling that this skill
overlays on top of the canonical four-way match, see
doca-version/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.
configure
Goal: bind an already-running DPDK port id to an opened
doca_dev (the bridge's DPDK-port-id ↔ DOCA-device association),
with both the DPDK side and the DOCA side aware of their
lifecycle responsibilities, before any DOCA library (most
commonly DOCA Flow) is asked to operate on that doca_dev.
Steps the agent should walk the user through, in order:
Confirm the bridge is installed and the DPDK ↔ DOCA pair is consistent. Per the precondition matrix in
CAPABILITIES.md ## Safety policyand the version overlay inCAPABILITIES.md ## Version compatibility, run three pkg-config probes BEFORE writing any code:pkg-config --exists doca-dpdk-bridge(the bridge is present on this DOCA install — if it returns failure, runls /opt/mellanox/doca/infrastructure/lib/pkgconfig/ | grep -i dpdkbefore claiming the bridge is missing, because some releases use a slightly different module name);pkg-config --modversion doca-dpdk-bridgeagrees withdoca_caps --version(no partial-install drift); andpkg-config --modversion libdpdkfalls within the compatibility window the bridge expects. Quote all three to the user. Disagreement on the third probe is the canonical “the bridge loads but every operation returns confusing errors” failure mode and must be surfaced before any code change — route todoca-version TASKS.md ## debug(doca-version/TASKS.md#debug) layer 2.Confirm this is the interop case, not the migration case. Per the bridge-vs-native path-selection table in
CAPABILITIES.md ## Capabilities and modes, the bridge is the right answer only when the user has an EXISTING DPDK app. Ask explicitly: “is there already DPDK code that drivesrte_eth_*ports in this codebase?” If the answer is no, stop here and route todoca-eth/SKILL.md; the bridge is not the right starting point for fresh DOCA-native packet I/O.Verify the DPDK runtime preconditions on the user's host. Per the precondition matrix in
CAPABILITIES.md ## Safety policy, four DPDK-side conditions must already be true before the first bridge call: hugepages are mounted (cat /proc/meminfo | grep Hugereports non-zero free pages); the target PCIe port is bound under DPDK (dpdk-devbind.py --status);rte_eal_initis called by the user's app; andrte_eth_dev_startsucceeded on the target port id. The agent does NOT walk DPDK setup itself — defer the env-side fix to upstream DPDK docs reachable viadoca-public-knowledge-map/SKILL.mdand the shared hugepage / mlx5 env preconditions todoca-setup TASKS.md ## configure(doca-setup/TASKS.md#configure).Open the DOCA-side device and bind it to the DPDK port. Per the bridge-objects table in
CAPABILITIES.md ## Capabilities and modes, open adoca_devagainst the same physical device (DOCA-side privileges via sudo ormlnx-group membership), then establish the DPDK-port-id ↔doca_devassociation: if the DPDK port has not been probed yet, calldoca_dpdk_port_probe(doca_dev, devargs)to attach it; if the user already has a DPDK port id, calldoca_dpdk_port_as_dev(port_id, &dev)to resolve itsdoca_dev(anddoca_dpdk_get_first_port_id()/doca_dpdk_get_port_ids()go from adoca_devto its DPDK port id(s)). There is nodoca_dpdk_porthandle — thedoca_devis the DOCA-side identity, and DPDK keeps owningrte_eth_devstart / stop / queue config. The agent must walkdoca_dpdk.hunder $(pkg-config --variable=includedir doca-common) for the exact signatures on this DOCA release rather than quote them from memory.Run capability discovery against the active
doca_devinfoBEFORE requesting representors. Per the capability-query rule inCAPABILITIES.md ## Capabilities and modes, the bridge exposes a single device-capability query:doca_dpdk_cap_is_rep_port_supported()on the activedoca_devinfo(call with root privileges) tells you whether the device supports representors fordoca_dpdk_port_probe(). There is nodoca_dpdk_*_cap_*family — do not invent per-conversion or per-offload cap symbols;doca_dpdk.hitself is the authority on the rest of the surface. Quote the queried value back to the user; do not assume from prior installs.Start the DOCA context that will use the bound device. Pass the
doca_devto the DOCA library that needs it (DOCA Flow is the canonical adopter; seedoca-flow TASKS.md ## configure(doca-flow/TASKS.md#configure)), then calldoca_ctx_start()on the DOCA side and progress the PE (doca_pe_progress). The DPDK side stays running throughout — the bridge does not stop the DPDK port. For the canonical DOCA universal lifecycle that underlies the DOCA-side calls, seedoca-programming-guide TASKS.md ## configure(doca-programming-guide/TASKS.md#configure); this skill adds only the bridge overlay (steps 2-5 above).
build
Goal: compile a bridge-using consumer against the user's
installed DOCA AND the user's installed DPDK, with pkg-config
as the source of truth for include + link flags on BOTH sides.
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 bridge-specific overlay — note that
the bridge is the one library in the bundle where the link line
spans TWO independent pkg-config namespaces (DOCA and DPDK), and
both must agree with the installed runtime:
| Slot | Value | Why it matters |
|---|---|---|
pkg-config module name (DOCA side) | doca-dpdk-bridge on the user's install — confirm with pkg-config --exists doca-dpdk-bridge; if it returns failure, run `ls /opt/mellanox/doca/infrastructure/lib/pkgconfig/ | grep -i dpdk` before claiming the bridge is missing, because some DOCA releases use a slightly different module name |
pkg-config module name (DPDK side) | libdpdk from the user's DPDK install | The bridge's link line depends on DPDK symbols; without libdpdk on the line the build fails at link time with unresolved rte_* references |
| Include flags | pkg-config --cflags doca-dpdk-bridge libdpdk | Resolves DOCA-side headers under $(pkg-config --variable=includedir doca-common) AND DPDK-side headers wherever DPDK is installed |
| Link flags | pkg-config --libs doca-dpdk-bridge libdpdk | Pulls 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) on the DOCA side plus the DPDK shared libs (-lrte_*) on the DPDK side |
| Companion libraries | doca-flow if the consumer programs steering on the bound doca_dev (the common adopter); doca-argp for argument parsing if the consumer uses the standard DOCA arg style. Do not add other DOCA libraries unless the consumer actually calls them | Adding unnecessary companion libs bloats the link line and obscures real partial-install issues |
| Build-time version anchors | pkg-config --modversion doca-dpdk-bridge AND pkg-config --modversion libdpdk — record BOTH in the build log | Cross-version build / runtime mixing breaks per CAPABILITIES.md ## Version compatibility; the DPDK side is a frequent source of mismatch |
For non-C consumers (Rust, Go, Python), DPDK itself is a C-shaped
library and a non-C DPDK app is rare; if the user is in that
minority, the build-time concern is the same — the FFI wrapper
must see both libdoca_dpdk_bridge.so and librte_*.so at the
same versions the bridge was built against. The role-split and
capability-discovery rules from ## configure still
apply per the runtime version rule in
doca-version CAPABILITIES.md ## Version compatibility (doca-version/CAPABILITIES.md#version-compatibility).
modify
Goal: take the closest-fitting shipped DOCA Flow sample that already uses the bridge (or the closest reference application that pairs DPDK + DOCA Flow) and apply a minimum diff to make it match the user's intent, without rewriting from scratch and without inventing a build manifest of your own.
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 bridge-specific slot fill — the slots
the agent must elicit from the user before recommending any
code-level edit:
| Slot | What the agent asks the user | Bridge-specific consideration |
|---|---|---|
| 1. Starting sample | Which DOCA Flow sample under /opt/mellanox/doca/samples/doca_flow/ that already drives the bridge (e.g. ones using flow_common.c, which calls doca_dpdk_port_probe() / doca_dpdk_port_as_dev())? Or which reference application that already pairs DPDK + DOCA Flow (per the reference-applications index in doca-public-knowledge-map/SKILL.md)? | Pick the closest adopter shape — bridge + DOCA Flow vs bridge + DOCA accelerator — to the user's intent. The sample tree is C; a “clean rewrite” in another language is almost always slower to first green |
| 2. Port-handover code | Are you wiring a new DPDK port id into the bridge, or reusing the sample's port-handover code as-is? | The doca_dpdk_port_probe() / doca_dpdk_port_as_dev() binding and the doca_dev open are the load-bearing edits. Do NOT change the DPDK port's start / stop / queue-config calls — those stay owned by the DPDK side. The bridge associates a port id with a doca_dev; it does not transfer ownership of the port |
| 3. Conversion sites | Where in the data plane are rte_mbuf ↔ doca_buf conversions actually needed? | Per the mbuf-conversion rule in CAPABILITIES.md ## Capabilities and modes, convert at the boundary, NOT in the inner loop. If the diff puts a conversion call on every packet of a high-rate path, surface the cost before recommending the edit — the user often actually wants DOCA Flow steering installed once and DPDK to keep delivering already-steered packets, with no per-packet conversion |
| 4. Capability re-validation | Did the diff start requesting representors on the probe that the program did not assume before? | Re-run doca_dpdk_cap_is_rep_port_supported() from ## configure step 5 against the active doca_devinfo; the device cap is the authority, not the prior install's |
| 5. Build manifest | Are you keeping the sample's existing meson.build, or hand-rolling a Makefile? | Keep the sample's manifest. It already wires pkg-config doca-dpdk-bridge libdpdk and pins both versions; switching to a hand-rolled build removes the version-check rail per ## build and re-opens the DPDK ↔ DOCA mismatch failure mode |
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. On this stack the bisection has to cross TWO version surfaces (DOCA AND DPDK), which makes guessing especially expensive — the known-good sample anchors both.
run
Goal: execute the bridge-using program end-to-end and confirm
the DPDK port reaches DOCA AND that one trivial DOCA-library
operation works on the bound doca_dev, before any
production traffic.
Steps the agent should walk the user through:
Bring up the DPDK side first. The user's existing DPDK app starts as it normally does —
rte_eal_init, port configure,rte_eth_dev_start. Confirm the DPDK port is live BEFORE the DOCA side is started (rte_eth_stats_geton the port or whatever stats path the DPDK app already plumbs reports the port up; rx / tx counters increment under expected traffic). If the DPDK side is not live, the bridge binding may resolve but the first DOCA operation returnsDOCA_ERROR_BAD_STATEper the lifecycle row inCAPABILITIES.md ## Error taxonomy.Capture the structured log. Set
DOCA_LOG_LEVEL=tracefor the first run (seedoca-debug CAPABILITIES.md ## Observability(doca-debug/CAPABILITIES.md#observability)); the bridge calls and the underlying DOCA Core lifecycle transitions appear on stderr. For DPDK's own logging surface (rte_log,--log-level), the upstream DPDK docs are the authority — route viadoca-public-knowledge-map/SKILL.md; the agent must not paraphrase DPDK log knobs.Send one trivial DOCA-library operation through the bridge handle. For the canonical adopter (DOCA Flow): one trivial flow rule that matches a wide pattern (prefer a count-only rule; a drop rule only on an isolated test port the user has approved, never on a port carrying production traffic) installed on the
doca_devbound to the DPDK port, with verification that the rule is programmed (a Flow-side validate / counter read perdoca-flow TASKS.md ## configure(doca-flow/TASKS.md#configure)). Per the smoke-before-scale-up rule inCAPABILITIES.md ## Safety policy, this single-rule smoke is non-negotiable: a failure here narrows cleanly to DPDK-side, bridge-handover, or DOCA-side; a failure at scale-up without the smoke pass is a much harder bisection across the two version surfaces.Tear down in the right order. Per the lifecycle table in
CAPABILITIES.md ## Safety policy, reverse the configure order: stop / destroy the DOCA contexts first, then release the bridge binding, then stop the DPDK port and clean up EAL. Out-of-order teardown surfaces as either DOCA-sideDOCA_ERROR_BAD_STATEor DPDK- side errors and masks the next run's first-failure signal.
For the runtime version + LD_LIBRARY_PATH cross-checks that
underlie “the program built but does nothing” (especially the
DPDK side, which is a frequent source of mismatch), see
doca-version TASKS.md ## run (doca-version/TASKS.md#run).
test
Goal: prove a bridge consumer is correct end-to-end, on the user's installed DOCA + installed DPDK + device + permissions, before claiming the “add DOCA to my DPDK app” journey is done.
This is a loop, not a one-shot pass. Each iteration narrows either the install / version surface (DOCA-side or DPDK-side), the port-handover, the conversion-site set, or the single-library smoke shape. The loop terminates when either (a) the user's intended DOCA library composes cleanly with the existing DPDK app at the rate they care about, or (b) the agent has narrowed the failure cause to a layer outside the bridge (DPDK app itself, driver, firmware, env) and escalated to the matching skill.
Iteration shape:
Install + version re-check. Re-run the three pkg-config probes from
## configurestep 1 plusdoca_caps --version. The DPDK ↔ DOCA pair is the most common failure mode and the cheapest one to detect — quote all four numbers back. If they disagree, that is the answer; fix the install perdoca-version TASKS.md ## debug(doca-version/TASKS.md#debug) and re-loop. Do not move to step 2 with a mismatched pair.DPDK-side precondition re-check. Walk the four DPDK-side conditions from
## configurestep 3 (hugepages, devbind, EAL up, port started). A silent bridge handle (no error, but the DOCA library never sees packets) is almost always a DPDK-side gap, not a bridge bug — the DPDK-side counters from## runstep 1 are the first thing to read.Single-rule smoke. As in
## runstep 3 — one trivial DOCA Flow rule (or one trivial accelerator submission) on the bounddoca_dev, with verification. If yes, advance. If no, narrow: a bridge-callDOCA_ERROR_*narrows per## debug; a DPDK-side counter that stops incrementing after the rule is installed narrows to the steering itself — route todoca-flow TASKS.md ## debug(doca-flow/TASKS.md#debug).Multi-rule / multi-conversion run. Once single-rule is green, scale to the user's actual rule set (or actual per-packet conversion shape) and confirm every expected operation completes. Catches sizing / queue-depth gaps that the single-rule smoke does not exercise. The PE (
doca_pe_progress) must be driven at the rate of submits per the cross-library rule indoca-programming-guide CAPABILITIES.md ## Capabilities and modes(doca-programming-guide/CAPABILITIES.md#capabilities-and-modes).Cross-version / cross-host run (if the user has multiple installs). Re-run steps 1-4 on each install; quote both the DOCA version AND the DPDK version per
doca-version TASKS.md ## test(doca-version/TASKS.md#test) on each host. The bridge fails differently on each pair, so “works on host A, fails on host B” without quoted versions on both sides is an unactionable report.
Eval-loop overlay — why this is a loop, not a one-shot pass:
| Iteration trigger | What it looks like | What changes next iteration |
|---|---|---|
| pkg-config probes pass but every bridge call returns confusing errors | Bridge loads; first DOCA Flow / accelerator call returns DOCA_ERROR_NOT_SUPPORTED or DOCA_ERROR_BAD_STATE with no obvious code-side cause | The DPDK ↔ DOCA matched-pair window per CAPABILITIES.md ## Version compatibility is the prime suspect. Re-check pkg-config --modversion libdpdk against the bridge headers; do not patch around with retries |
| Single-rule smoke passes; multi-rule run drops completions | Rule installs succeed; under load completions stop firing | The PE is not being progressed at the rate of submits, OR the bridge's per-port queue sizing is at its default. Drive doca_pe_progress() between submits; do not assume slow-path patterns transfer to scale-up |
| Bridge binding is in place but no packets ever reach the DOCA library | No DOCA_ERROR_*, no completions, DPDK-side counters increment normally | A steering / port-attachment gap — the DOCA Flow rule has not actually been programmed on the doca_dev bound to this DPDK port. Route to doca-flow TASKS.md ## debug (doca-flow/TASKS.md#debug); this is NOT a bridge error |
DOCA_ERROR_INVALID_VALUE on every conversion call | Mbuf ↔ DOCA-buf conversion always fails | The mbuf points outside any registered doca_mmap, or the conversion target buffer is too small. Walk the conversion preconditions in CAPABILITIES.md ## Capabilities and modes; the fix is at the buffer-management layer, not the inner-loop call |
| Same code passes on host A, fails on host B | One host has a different DPDK version, a different DOCA version, or a different doca_dev permission | Re-run steps 1-2 on host B + four-way match per doca-version TASKS.md ## test (doca-version/TASKS.md#test); the bridge's failure shape is per-host because the matched pair is per-host |
Loop termination: stop iterating once two consecutive iterations
do not change the picture — the cause is below the bridge (DPDK
app code, kernel driver, firmware, env). Escalate to
doca-debug TASKS.md ## debug (doca-debug/TASKS.md#debug)
with the captured trace + version state (BOTH DOCA and DPDK
sides) as evidence.
debug
Goal: when a bridge session fails — whether by DOCA_ERROR_*
return, silent DOCA library on top of a working DPDK port, or
matched-pair version drift — 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 bridge
overlay at the version, runtime, and program layers; the
DPDK side overlays on all of them and is a frequent source of mismatch.
Layer 2 (version) — bridge overlay.
The four-way match in
doca-version CAPABILITIES.md ## Version compatibility(doca-version/CAPABILITIES.md#version-compatibility) becomes a FIVE-way match on this skill: addpkg-config --modversion libdpdkagainst the bridge's expected DPDK window perCAPABILITIES.md ## Version compatibility. Disagreement here is the canonical “the bridge loads but every operation returns confusing errors” failure; surface it before any code change.pkg-config --exists doca-dpdk-bridgereturning failure is not always “the bridge is not installed” — some DOCA releases use a slightly different module name. Confirm vials /opt/mellanox/doca/infrastructure/lib/pkgconfig/ | grep -i dpdkbefore claiming the bridge is missing.
Layer 5 (runtime) — bridge overlay.
A silent bridge binding (resolves cleanly, no
DOCA_ERROR_*, but the DOCA library never sees packets) is almost always a DPDK-side precondition gap or a steering / port-attachment gap, not a bridge code issue. Read the DPDK-side counters per## runstep 1 BEFORE any code change. If DPDK counters are zero, the problem is upstream of the bridge (DPDK app, env). If DPDK counters increment but the DOCA library still does not see packets, route the steering side todoca-flow TASKS.md ## debug(doca-flow/TASKS.md#debug).DOCA_ERROR_NOT_PERMITTEDfrom a bridge create / open call is the inherited DPDK + DOCA privilege set perCAPABILITIES.md ## Error taxonomy. Confirm BOTHidformlnx-group membership AND the DPDK- side hugepage / devbind preconditions before recommending a code change; route the env fix todoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug).DOCA_ERROR_DRIVERfrom any bridge call that crosses into the kernel mlx5 driver: capturedmesg | tailandmlxconfig -d <pcie> qand route todoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug); the layer below DOCA + DPDK is the suspect, not the bridge program.
Layer 6 (program) — bridge overlay.
Lifecycle order across the DPDK ↔ DOCA seam (per
CAPABILITIES.md ## Safety policy): DPDK side up → DOCAdoca_devopened → bridge port registered → DOCAdoca_ctx_start(). Out-of-order returnsDOCA_ERROR_BAD_STATEfrom the DOCA side; the most common case is registering the DPDK port with the bridge beforerte_eth_dev_startsucceeded. The DPDK side has to be live first.DOCA_ERROR_NOT_FOUNDon port-registration / handle-acquire is a wrong DPDK port id, a port not bound under DPDK, or a port id from a different EAL instance — NOT a bridge bug. Confirm the user'srte_eth_dev_get_port_by_nameor DPDK port enumeration result before modifying any bridge call.DOCA_ERROR_NOT_SUPPORTEDafter the cap query returned true is a strong signal the DPDK ↔ DOCA matched-pair window has drifted at runtime — return to layer 2. Do not invent a code workaround; the cap query is not lying, the matched pair is.
Once the layer is identified, route to the matching debug verb
on the matching skill: install / build / link / driver to
doca-setup TASKS.md ## debug (doca-setup/TASKS.md#debug);
version (DOCA side AND DPDK side) to
doca-version TASKS.md ## debug (doca-version/TASKS.md#debug);
steering to
doca-flow TASKS.md ## debug (doca-flow/TASKS.md#debug);
cross-cutting runtime to
doca-debug TASKS.md ## 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 (DOCA side). Installing DOCA, choosing packages, post-install verification,
pkg-configwiring — defer todoca-setup/SKILL.mdand 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.install / learn DPDK itself. Installing DPDK, mounting hugepages, binding PCIe ports, learning the DPDK programming model, choosing a DPDK release — out of scope. DPDK is its own upstream project; this skill treats DPDK as a precondition and routes the user to upstream DPDK docs via
doca-public-knowledge-map/SKILL.md.migrate to native
doca-eth. Rewriting the user's DPDK data-plane todoca_eth_rxq/doca_eth_txq— out of scope here, and almost always the wrong tradeoff for a working DPDK app per the bridge-vs-native rule inCAPABILITIES.md ## Capabilities and modes. For fresh DOCA-native projects with no DPDK lock-in, route todoca-eth/SKILL.md.deploy. Deploying DPDK + DOCA applications at scale across many hosts / BlueFields, Kubernetes operator workflows for line-rate data planes — out of scope for this skill.
firmware burn / reset / kernel driver install. Installing
mlx5_core, burning new ConnectX firmware, modifyingmlxconfigparameters that require a reset — out of scope. Route todoca-setup TASKS.md ## debug(doca-setup/TASKS.md#debug) layer 5 (driver), then to the upstream MLNX OFED / firmware documentation reachable throughdoca-public-knowledge-map/SKILL.md.
Command appendix
Every command below is cross-cutting on DOCA DPDK Bridge — 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. The bridge is unusual in this bundle because every row reads BOTH the DOCA side AND the DPDK side; do not skip the DPDK column when reporting back.
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:
Probe for the matching structured helper FIRST (
doca-env --jsonfor version + devices + libraries + drivers + hugepages in one shot;doca-capability-snapshotfor per-device capability flags;version-matrix.jsonfor “available since” lookups).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>”.If the probe fails, fall back to the manual command in the row. Report “falling back to manual chain”.
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 bydoca-version/SKILL.md.
| Command (worked example) | Owning step | Class of question it answers | What healthy output looks like |
|---|---|---|---|
pkg-config --exists doca-dpdk-bridge && echo present | ## configure step 1; ## build slot 1 | Is the bridge module present on this DOCA install (and under this spelling)? | present. Empty / non-zero exit = either the bridge is not installed on this DOCA, or the module name in this release differs — confirm via the ls row below before claiming the bridge is missing |
| `ls /opt/mellanox/doca/infrastructure/lib/pkgconfig/ | grep -i dpdk` | ## configure step 1; ## debug layer 2 | If pkg-config --exists doca-dpdk-bridge fails, what is the bridge module actually called in this DOCA release? |
pkg-config --modversion doca-dpdk-bridge | ## configure step 1; ## build slot 6 | What is the build-time DOCA DPDK Bridge 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 --modversion libdpdk | ## configure step 1; ## build slot 6; ## debug layer 2 | What DPDK version is installed on this host, and does it fall within the bridge's matched-pair window? | A semver string; the agent quotes it against the bridge's installed headers / docs declared window. Disagreement = the canonical “the bridge loads but every operation returns confusing errors” failure; do not assume “latest DPDK works” |
pkg-config --cflags --libs doca-dpdk-bridge libdpdk | ## build | What include + link flags does the linker need for a bridge consumer? | DOCA-side includes resolve under $(pkg-config --variable=includedir doca-common); libs include whatever pkg-config --libs doca-dpdk-bridge resolves (do not predict the -l<name> form by hand); DPDK-side includes resolve under the user's DPDK install; libs include the -lrte_* set |
ls /opt/mellanox/doca/samples/doca_flow/ | ## modify slot 1 | Which DOCA Flow samples ship in this install (the bridge API has no samples dir of its own — it is used inside the DOCA Flow samples, e.g. flow_common.c), and which is the closest starting point? | A list of DOCA Flow sample directories; pick one whose adopter shape (bridge + Flow steering) is closest. Empty = the user's install does not ship DOCA Flow samples; route to the reference-applications index in doca-public-knowledge-map/SKILL.md |
dpdk-devbind.py --status | ## configure step 3; ## debug layer 5 | Is the target PCIe port bound under DPDK? | The target port appears under the Network devices using DPDK-compatible driver section. Anything else means the port is not on the DPDK side and the bridge cannot see it |
| `cat /proc/meminfo | grep Huge` | ## configure step 3; ## debug layer 5 | Are hugepages mounted on this host (DPDK precondition)? |
doca_caps --list-devs | ## configure step 4; ## debug layer 5 | Which devices on this host can be opened as a doca_dev and used as the DOCA side of the bridge binding? | One row per visible device with PCIe address; the device the DPDK port is bound to must appear here |
| `dmesg | tail -n 40` (requires sudo) | ## debug layer 7 | What did the kernel / driver log around the last bridge call? |
DOCA_LOG_LEVEL=trace ./<binary> | ## run step 2 | What did the structured DOCA logger emit for the first failing bridge call? | A trace-level line on every DOCA Core lifecycle transition and every bridge call. Silence after a bridge call = the DOCA-side PE is not progressed; DPDK-side silence in addition = the DPDK app is not running |
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 bridge-specific rows (every one of which
reads BOTH the DOCA side and the DPDK side) 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) with a BlueField DPU or ConnectX NIC attached, plus a separate DPDK install whose version falls within the bridge's matched-pair window. Reads the user's local install via `pkg-config doca-dpdk-bridge` and `pkg-config libdpdk`, 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-dpdk-bridge · 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 or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download doca-dpdk-bridge.zip