doca-devemu

작성자: nvidia

사용자가 BlueField DPU에서 DOCA 디바이스 에뮬레이션을 직접 다룰 때 이 스킬을 사용하세요 — 호스트가 실제 장치로 인식하는 커스텀 에뮬레이션 PCIe 디바이스를 노출하는 작업입니다…

npx skills add https://github.com/nvidia/skills --skill doca-devemu

DOCA Device Emulation

Where to start: This skill assumes DOCA is already installed on the host AND on the BlueField, the user is doing hands-on emulated-PCIe-device work from the DPU side (writing the backend that the host's kernel driver will talk to over the emulated PCIe surface), and the user knows which CLASS of emulated device they want to build. Open TASKS.md if the user wants to do something (configure / build / modify / run / test / debug); open CAPABILITIES.md when the question is what can Device Emulation express on this DOCA version + this BlueField generation + this firmware. If the user has not installed DOCA yet, route to doca-setup first. Before anything else, the agent must route the user to the right sub-library — DOCA Device Emulation is an umbrella that covers PCI Generic (raw PCIe device emulation), virtio-net (emulated virtio network device), and virtio-fs (emulated virtio filesystem device); each sub-library has its own context, its own pkg-config module, and its own capability surface. The sub-library selection rule lives in CAPABILITIES.md ## Capabilities and modes. If the user wants a packaged solution rather than a library (e.g. "I want NVMe SNAP on my host without writing the backend myself", or "I want a managed virtio-net daemon"), route via doca-public-knowledge-map to the DOCA SNAP Service / DOCA Virtio-net Service guides — those services are built on top of this library and are a different artifact than what this skill covers.

Audience

This skill serves external developers building applications that consume the DOCA Device Emulation library — i.e., users whose DPU-side code calls doca_devemu_pci_*, doca_devemu_virtio_*, or doca_devemu_vfs_* (directly in C / C++, or through FFI / bindings from another language) to expose an emulated PCIe device to the host that the host's existing kernel drivers can drive as if it were a real PCIe peripheral. It is not for NVIDIA developers contributing to DOCA Device Emulation itself, and it is not the right artifact for users who want a packaged emulated-device daemon they do not have to write the backend for (the DOCA SNAP Service and the DOCA Virtio-net Service are the packaged options that build on top of this library).

Language scope. DOCA Device Emulation ships as a C library; this skill covers three sub-libraries end-to-end. Select the exact installed pkg-config module for the user's emulation class (see the sub-library selection table in CAPABILITIES.md ## Capabilities and modes). The shipped samples under /opt/mellanox/doca/samples/doca_devemu/ are written in C. C and C++ consumers are the canonical case and the worked examples in TASKS.md assume that path. Other-language consumers (Rust, Go, Python, …) consume the same *.so files through FFI or language-specific bindings; the skill's contribution in that case is to keep the sub-library selection, umbrella lifecycle, capability-discovery, permission, and error-taxonomy guidance language-neutral, and to route the agent to the public C ABI as the authoritative surface that any wrapper will eventually call.

When to load this skill

Load this skill when the user is doing hands-on DOCA Device Emulation work from the DPU side, in any language. Concretely:

  • Deciding which Device Emulation sub-library (PCI Generic, virtio-net, virtio-fs) the user needs — the umbrella selection question is this skill's load-bearing first move.
  • Initializing the per-sub-library DOCA Core context on the DPU (one context per emulated device per sub-library) and configuring the doorbell / DMA primitives the host's PCIe driver will interact with.
  • Reading per-sub-library capability surface via the doca_devemu_pci_cap_*, doca_devemu_virtio_cap_*, or doca_devemu_vfs_cap_* query families against the active doca_devinfo BEFORE assuming a particular feature bit or device characteristic is available.
  • Choosing between writing the backend with doca-devemu yourself and adopting a packaged service (DOCA SNAP Service / DOCA Virtio-net Service) that already wraps this library.
  • Debugging a DOCA_ERROR_* returned from a doca_devemu_* call — in particular disambiguating firmware-level emulation type not enabled from BlueField generation does not support this sub-library at all from DPU-side process lacks privilege from host-side kernel driver did not bind.
  • Designing or extending non-C bindings (Rust, Go, Python, …) that wrap one of the device-emulation sub-libraries — for the sub-library selection, umbrella lifecycle, capability- discovery, permission, and error-taxonomy rules the wrapper must honor.

Do not load this skill for general DOCA orientation, install of DOCA itself, the host-side kernel driver for the emulated device class (virtio-net / virtio-blk / virtio-fs kernel drivers ship with the host kernel and are not part of DOCA), the packaged SNAP / Virtio-net services (they are separate artifacts with their own service guides), or for standard NIC behavior on the BlueField data path (use doca-flow + doca-eth instead — Device Emulation is for custom emulated devices, not for shaping the BlueField's built-in NIC personality).

What this skill provides

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

  • CAPABILITIES.md — what Device Emulation can express on this version + this BlueField generation + this firmware: the umbrella architecture (host sees an emulated PCIe device; DPU runs the backend), the sub-library selection rule (PCI Generic vs virtio-net vs virtio-fs), the per- sub-library Core context shape, the doorbell / DMA primitives that bridge host ↔ DPU, the per-sub-library capability-query family (doca_devemu_*_cap_*), the per-sub-library pkg-config module name, the Device Emulation error taxonomy mapped onto the cross-library DOCA_ERROR_* set, the observability surface, the library-vs-packaged-service path-selection rule, and the safety policy that gates env preconditions (DPU-side privileges, BlueField firmware-level emulation type enablement, BlueField generation actually supporting the emulation class).
  • TASKS.md — step-by-step workflows for the six in-scope Device Emulation verbs: configure, build, modify, run, test, debug. Plus a Deferred task verbs block that points out-of-scope questions at the right next skill.

The skill assumes a host + BlueField pair where DOCA is already installed at the standard location on both sides, the BlueField firmware has the emulation type the user wants to build enabled, the user has the privileges their public install profile expects (in particular, sudo on the DPU side to perform PCIe-level emulation), and the host kernel ships the standard driver for the emulated device class the user is building. It does not cover installing DOCA, flipping firmware-level configuration, or installing host-side kernel drivers — those paths go through doca-setup.

Loading order

  1. Read this SKILL.md first to confirm the user's question is in scope (custom emulated PCIe device built on the doca-devemu library, not the packaged SNAP / Virtio-net services, not the host-side kernel driver, not standard NIC behavior).
  2. For the umbrella architecture, the sub-library selection rule (PCI Generic vs virtio-net vs virtio-fs), the per- sub-library Core context shape, the doorbell / DMA primitives, the per-sub-library capability-query rule, the per-sub-library pkg-config modules, the library-vs- packaged-service path-selection rule, the error taxonomy, the observability surface, and the safety policy, see CAPABILITIES.md.
  3. For step-by-step workflows — configure, build, modify, run, test, debug — see TASKS.md.

Both companion files cross-link to each other, doca-version for the canonical DOCA version-handling rules (with the Device Emulation overlay that the chosen sub-library's pkg-config module plus the firmware-level emulation slot plus the doca_devemu_*_cap_* query are all part of "is this emulation supported here"), and doca-public-knowledge-map whenever the right answer is "look it up in the public DOCA Device Emulation umbrella guide, the per-sub-library guide linked from it, the DOCA SNAP / Virtio-net Service guide, or in the on-disk install layout" rather than "Device Emulation- specific guidance".

Example questions this skill answers well

See references/details.md.

What this skill deliberately does not ship

See references/details.md.

Related skills

See references/details.md.

nvidia의 다른 스킬

compileiq-debug
nvidia
무언가 잘못되었을 때 사용: Search()가 멈추거나, 모든 평가가 INVALID_SCORE를 반환하거나, 점수가 개선되지 않거나, 모든 설정이 동일한 숫자를 반환하거나, ptxas 오류 등이 발생할 때
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
compileiq-validate-result
nvidia
검색이 완료된 후, 속도 향상을 청구하거나 ACF를 발송하기 전에 사용합니다. dump_results CSV를 로드하고, 상위 K개 후보(단일 목표)를 추출합니다…
changelog-audit
nvidia
릴리스 전에 Warp CHANGELOG.md를 감사합니다: 누락된 항목 복구, 사용자 영향별 정렬, 항목 언어 다듬기, 줄 바꿈, (릴리스 브랜치 모드) 비교 업데이트…
maintain-dynamic-plugins
nvidia
NeMo Relay 동적 플러그인 로더, 매니페스트, Rust 네이티브 SDK, gRPC 워커 프로토콜, Python 워커 SDK, 문서, 테스트 및 릴리스 워크플로 커버리지를 유지 관리합니다.
dgx-diagnose
nvidia
일반적인 DGX Station GB300 문제 진단 — CUDA 충돌, 잘못된 GPU 타겟팅, vLLM/SGLang 컨테이너 버그, MIG 상태 문제, NVLink/Fabric Manager 오류,…