Doca Gpunetio
NVIDIAOfficialCreated by NVIDIA
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides specialized support for developers building applications that use the DOCA GPUNetIO library. It focuses on the integration between host-side C/C++ code and device-side CUDA kernels, specifically for scenarios involving GPU-initiated networking on BlueField DPU or ConnectX NIC environments. The skill covers the lifecycle of GPU-visible network queues, persistent kernel design, memory registration, and capability verification across both DOCA and CUDA layers.
What it does
- Assists in wiring CUDA kernels to doca_gpu_eth_rxq and doca_gpu_eth_txq handles.
- Guides the setup of per-CUDA-device doca_gpu contexts.
- Provides patterns for persistent CUDA kernels that process packets directly from NIC queues.
- Supports dual capability checking using DOCA cap-query and cudaGetDeviceProperties.
- Details the registration of cudaMalloc pools via doca_buf_arr_create_*.
- Helps diagnose and debug DOCA_ERROR_* codes specific to the GPUNetIO API.
When to use it
- When developing applications that require direct packet processing on an NVIDIA GPU.
- When troubleshooting GPUNetIO setup failures like DOCA_ERROR_DRIVER or missing nvidia_peermem.
- When verifying compatibility between specific DOCA versions and CUDA toolkit versions.
- When implementing the GPU Packet Processing reference application pattern.
- When needing to resolve errors during the initialization of GPU-visible network queues.
Advantages
- Provides a clear, structured approach to complex GPU-NIC integration tasks.
- Ensures adherence to the DOCA Compatibility Policy for hardware and software versions.
- Offers a systematic debugging framework for layered DOCA and CUDA errors.
- Maintains a clean separation between GPUNetIO logic and general DOCA or CUDA programming.
Usage examples
- “How do I get a CUDA kernel to receive packets directly from the NIC?”
- The agent provides the persistent-kernel pattern and the GPU-side bring-up workflow to link a doca_gpu_eth_rxq to your CUDA kernel.
- “Why does my GPUNetIO setup fail with DOCA_ERROR_NOT_SUPPORTED?”
- The agent guides you through checking environment preconditions, specifically verifying if nvidia_peermem is loaded and GPUDirect RDMA is enabled.
- “Can I run GPUNetIO on this GPU?”
- The agent instructs you to perform a dual capability check using DOCA cap-query and cudaGetDeviceProperties to confirm hardware support.
- “How do I move data between CUDA-allocated buffers and a DOCA queue?”
- The agent explains the process of using cudaMalloc for buffer pools and registering them with DOCA via doca_buf_arr_create_* before starting the context.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/doca-gpunetio/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip doca-gpunetio.zip -d .agents/skills
Documentation by NVIDIA
DOCA GPUNetIO
Examples
"CUDA kernel reading packets directly from the NIC." — this is in scope. Stay on
doca_gpu_eth_rxq/_txqand the persistent kernel; do not rewrite it as host-CPU Ethernet."DOCA_ERROR_DRIVER on doca_gpu_create." — check CUDA device match and dmabuf /
nvidia-peermemregistration before changing queue type.
Instructions
Follow Loading order below. Open the tasks companion for configure / build / run. Open the capabilities companion for GPU vs host path selection. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed,
the CUDA toolkit is installed and matched to the DOCA install, and
the user is doing hands-on GPUNetIO work — i.e. wiring a DOCA
network queue into a CUDA kernel on an NVIDIA GPU. 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 GPUNetIO express on this version + this GPU. If the user has
not installed DOCA yet, route to
doca-setup/SKILL.md first; if the user has
not set up the underlying Ethernet RX/TX queues yet, that is a
DOCA Ethernet question — route to
doca-eth/SKILL.md.
Example questions this skill answers well
The CLASSES of GPUNetIO 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 get a CUDA kernel to receive packets directly from the NIC?" — worked example: "persistent kernel on one GPU reads packets from a
doca_gpu_eth_rxqbuilt on top of a representordoca_eth_rxqand counts them per-flow". Answered by the persistent-kernel pattern inCapabilities and modes
the GPU-side bring-up workflow in
configure.
"Can I run GPUNetIO on this GPU?" — worked example: "my host has one Ampere card and one Turing card; which one supports GPU-initiated networking?". Answered by the dual capability-discovery rule (DOCA cap-query AND
cudaGetDevicePropertiesagainst the CUDA device ordinal) inCapabilities and modes
the device-enumeration step in
configure.
"Why does my GPUNetIO setup fail with
DOCA_ERROR_NOT_SUPPORTEDeven though doca-eth came up fine?" — worked example: "nvidia_peermemis not loaded so GPUDirect RDMA is unavailable". Answered by the env preconditions in ## Safety policythe env checklist in
configure step 1.
"How do I move data between CUDA-allocated buffers and a DOCA queue?" — worked example: "use
cudaMallocfor the receive buffer pool and register it with DOCA viadoca_buf_arr_create_*before starting the context". Answered by the CUDA-allocatorDOCA-registration overlay in
Safety policy
the buffer-prep step in
configure step 4.
"Is the GPUNetIO API I'm reading about on my installed DOCA + CUDA combination?" — worked example: "is the persistent-kernel helper available with the CUDA toolkit version I have?". Answered by the version-compatibility overlay in
Version compatibility
which cross-links the canonical detection chain in
doca-version/SKILL.mdand adds the GPUNetIO-specific DOCA must match CUDA overlay."What does this
DOCA_ERROR_*from a GPUNetIO call mean and which layer caused it?" — worked example: "DOCA_ERROR_DRIVERondoca_gpu_*_create— is it DOCA, CUDA, or the underlying doca-eth queue?". Answered by the GPUNetIO 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 building applications
that consume the DOCA GPUNetIO library — i.e., users whose code
calls doca_gpu_* from host C/C++ to stand up the per-GPU
context and the GPU-visible queue handles, and whose CUDA kernel
(.cu translation unit) uses those handles from device code to
submit / receive packets. The canonical target shape is the GPU
Packet Processing reference application: a CUDA persistent
kernel on an NVIDIA GPU that polls a GPU-visible RX queue and
processes packets in-place on the GPU. It is not for NVIDIA
developers contributing to DOCA GPUNetIO itself.
Language scope. DOCA GPUNetIO ships as a C / CUDA library
with pkg-config module name doca-gpunetio. The host-side API
is C; the device-side API is CUDA C++ used inside a .cu
kernel. The shipped samples and the GPU Packet Processing
reference application are written in C + CUDA C++ (NVIDIA's
choice). Other-language consumers are limited in practice — the
device-side API has no FFI escape hatch because the kernel must
be a CUDA translation unit — but a Rust / Go / Python host-side
wrapper that drives the host-side doca_gpu_* setup and
launches a CUDA kernel built separately is still useful, and the
skill keeps the lifecycle, capability-discovery, env-precondition,
and error-taxonomy guidance language-neutral.
When to load this skill
Load this skill when the user is doing hands-on DOCA GPUNetIO work, in any host language plus CUDA. Concretely:
Initializing a
doca_gpuagainst a specific CUDA device ordinal on a host with one or more NVIDIA GPUs.Creating a GPU-visible queue handle (
doca_gpu_eth_rxq,doca_gpu_eth_txq) on top of an existingdoca_eth_rxq/doca_eth_txqfrom DOCA Ethernet, and passing the handle into a CUDA kernel for device-side use.Writing or modifying the persistent CUDA kernel that drains the GPU-visible RX queue in a long-running loop (the canonical GPU Packet Processing shape).
Allocating GPU buffers via
cudaMallocand registering them with DOCA via thedoca_buf_arr_create_*family beforedoca_ctx_start().Checking which GPUNetIO features are supported on the active
doca_devinfo(DOCA cap-query family) AND on the candidate CUDA device (cudaGetDevicePropertiesand CUDA-driver-version checks).Debugging a
DOCA_ERROR_*returned from a GPUNetIO call — in particular disambiguating DOCA capability missing from CUDA device too old fromnvidia_peermemnot loaded from CUDA driver + DOCA version skew.Designing host-side bindings for non-C languages that drive a CUDA kernel they built separately — the env-precondition and capability-discovery rules in this skill still apply.
Do not load this skill for general DOCA orientation, install
of DOCA or the CUDA toolkit, the underlying DOCA Ethernet queue
setup, or non-GPUNetIO library questions. 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 GPUNetIO-specific material lives in two companion files:
the capabilities companion — what GPUNetIO can express on this version
this GPU: the
doca_gpuper-device context, the GPU-visible RX / TX queue handles layered on doca-eth, the persistent CUDA-kernel pattern as the default usage shape, the capability-query surface (the doca-ethdoca_eth_rxq_cap_is_type_supported/doca_eth_rxq_cap_get_*family indoca_eth_rxq.h, plus the matchingdoca_eth_txq_cap_*family, on the DOCA side, pluscudaGetDevicePropertieson the CUDA side), the GPUNetIO error taxonomy mapped onto the cross-libraryDOCA_ERROR_*set, the observability surface (CUDA-side counters + DOCA-side per-task completion), and the safety policy that gates env preconditions (CUDA + DOCA version match, dmabuf ornvidia-peermemregistration).
the tasks companion — step-by-step workflows for the six in-scope GPUNetIO verbs:
configure,build,modify,run,test,debug. Plus a## rollbackoverlay (GPUNetIO-specific five-step teardown that signals the persistent kernel to drain, unregisters GPU buffers in reverse-register order, and leaves the parent doca-eth queue intact) and the 5-phase universal debug-loop instantiation appended to## debug. Plus aDeferred task verbsblock 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, an NVIDIA GPU is physically present, the CUDA
toolkit is installed and its version is matched to the DOCA
install per the DOCA Compatibility Policy, and the underlying
DOCA Ethernet RX/TX queues are already configured (this skill
sits on top of doca-eth, not below it). It does not cover
installing DOCA or the CUDA toolkit — that path goes through
doca-setup/SKILL.md.
What this skill deliberately does not ship
This skill is agent guidance, not a samples or templates bundle. To keep the boundary clean, it deliberately does not contain — and pull requests should not add:
Pre-written DOCA GPUNetIO application source code or CUDA kernel source, in any language. The verified GPUNetIO source is the shipped C + CUDA samples at
/opt/mellanox/doca/samples/doca_gpunetio/and the GPU Packet Processing reference application. 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 GPUNetIO-specific overrides inmodify.
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 + CUDA toolkit, wherepkg-config --modversion doca-gpunetio,pkg-config --modversion doca-common, andnvcc --versionform the version gate.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.
For the GPUNetIO capability matrix, the
doca_gpuper-device context, the persistent-kernel pattern, the dual capability query, the env-precondition policy, the error taxonomy, the observability surface, and the 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 (with the GPUNetIO overlay that DOCA
must match CUDA), and
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public DOCA
GPUNetIO guide, the DOCA Compatibility Policy, the CUDA toolkit
docs, or the on-disk install layout" rather than
"GPUNetIO-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 GPUNetIO public guide is at https://docs.nvidia.com/doca/sdk/DOCA-GPUNetIO/index.html; the GPU Packet Processing reference application is reachable from there. The CUDA toolkit and DOCA Compatibility Policy links live in the same routing table.doca-setup/SKILL.md— env preparation, install verification, CUDA toolkit install / verification, and the I have no install yet path with the public NGC DOCA container. This skill assumes its preconditions are satisfied AND that CUDA is installed at a version that matches DOCA.doca-version/SKILL.md— canonical DOCA version-handling rules. This skill's## Version compatibilitycross-links the four-way match rule and adds the GPUNetIO-specific DOCA-and-CUDA must match overlay per the DOCA Compatibility Policy.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 GPUNetIO specifics on top.doca-debug/SKILL.md— the cross-cutting debug ladder (install / version / build / link / runtime / program / driver). GPUNetIO-specific debug (CUDA + DOCA version skew,nvidia_peermemmissing, persistent-kernel silent hangs, CUDA-allocator + DOCA-registration mismatches) overlays on top of that ladder.
DOCA Ethernet is GPUNetIO's mandatory companion library: GPU-visible
RX / TX queue handles are layered on top of doca_eth_rxq /
doca_eth_txq from DOCA Ethernet. For the underlying queue setup,
route to doca-eth/SKILL.md.
Files
- ATTRIBUTION.mdAdded by AutoGineer897 B
- BENCHMARK.md9.9 KiB
- CAPABILITIES.md23.9 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md14.5 KiB
- SKILLCARD.yaml2.7 KiB
- TASKS.md34.2 KiB
- evals/evals.json2.4 KiB
- skill-card.md5.3 KiB
- skill.oms.sig5.1 KiB
LICENSE
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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 at /opt/mellanox/doca on Linux (Ubuntu 22.04/24.04 or RHEL/SLES) with a BlueField DPU or ConnectX NIC. Reads the local install via `pkg-config doca-gpunetio`. Requires an NVIDIA GPU with CUDA toolkit (matched to DOCA per the DOCA Compatibility Policy) and GPU memory registered via dmabuf (or the legacy nvidia-peermem fallback) for GPUDirect RDMA; some samples need an InfiniBand-capable RNIC. 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-gpunetio · 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-gpunetio.zip