doca-flow
БесплатноБез исполняемых скриптовНе проверенDOCA Flow packet steering on NVIDIA NICs/DPUs, linked into a C application: match/action pipes, ports, representors, forwarding, hairpin, counters. Trigger on…
от NVIDIA★ 4 269 звёзд на GitHubОб этом скилле
DOCA Flow
Host checks. Commands here that inspect the user's DOCA host (listing or reading
/opt/mellanox/doca, release files such as/etc/mlnx-releaseor/etc/nvidia/bf-release,/dev/mst) or reach the BlueField (RShim, SSH, BMC) are for that host. Run them yourself only if the user confirms you are on it; otherwise answer from this skill, give the commands for the user to run, and treat values you can't see as unknown.
Examples
- “How do I bring up a Flow port on a representor?” — this is in
scope. Use the installed header and a shipped sample; do not author
a first-app
main.c. - “Match 5-tuple and send to a queue.” — express it as a Flow pipe. Do not fall back to kernel tc or iptables.
- "Write my first DOCA Flow app." Start from a shipped sample, not
authored code:
ls /opt/mellanox/doca/samples/doca_flow/, copy the closest one, build it, then make the minimum change. The NGC container builds and links it, but pipe creation needs a real BlueField or ConnectX at runtime.
Instructions
Follow Loading order below. Open the tasks companion for configure /
modify / debug. Open the capabilities companion for the pipe-spec
schema and safety policy.
For connection tracking, read the tasks companion's flow-ct section
before starting ports: in DOCA 3.6 CT is configured on each port's
doca_flow_port_cfg (doca_flow_port_cfg_set_ct_*) before that port starts. Adding CT to running ports requires an approved interruption
and reconstruction from a captured configuration, not a per-port
doca_ctx_start call or reuse of invalidated pipe handles.
Non-negotiable: first app is NGC pull + a shipped sample, not authored C
When the user is new to DOCA, has docker, has no host DOCA, or asks
for a first Flow app, do this before host pkg-config and before
any source listing:
- Bundle first. This answer follows the local doca-skills
bundle:
doca-setup/SKILL.md(Stage 1 vs Stage 2),doca-programming-guide/SKILL.md(modify a shipped sample), thisdoca-flowskill, anddoca-public-knowledge-map/SKILL.md. Name those skills. Do not invent other skill names. - Stage 1 vs Stage 2 before any command. Stage 1 = NGC container on a laptop (compile / learn; no real packets). Stage 2 = a real BlueField or ConnectX for pipe runtime. Docker compiles only; do not say the app works entirely inside docker.
- Path 0 (Stage 1). Copy a tag from
https://catalog.ngc.nvidia.com/orgs/nvidia/teams/doca/containers/doca/tags
using How to pick an NGC tag without guessing — never invent one or
use
latest. Thendocker pull nvcr.io/nvidia/doca/doca:<tag>anddocker run -it --rm -v $HOME/dev/doca-work:/work nvcr.io/nvidia/doca/doca:<tag> bash(an empty dir, never$HOME). No inventedDockerfile, no source build. - Resume inside the container (MUST, after
docker run): quote this hand-off — do not skip it for a full tutorial: "Paste back the output ofpkg-config --modversion doca-flowandls /opt/mellanox/doca/samples/doca_flow/." Then: "I resume from doca-programming-guide ## modify step 1 with the real install in hand." Name a directory that listing shows; copy it. Iflsis empty, stop — do not scaffold. Usedoca-flowon thatpkg-configline, notdoca-common. - Never emit a new
main.c,Makefile,Dockerfile, or hand-typed-l/-Lflags. Pastepkg-config --libs doca-flow.
Non-negotiable: the deliverable uses DOCA Flow, not kernel tc/iptables
When this skill is in scope, the user is asking for DOCA Flow. After
the shipped-sample copy above, the binary you build must link
libdoca_flow and exercise the doca_flow_* lifecycle on the user's
installed DOCA — init, port start, pipe programming, entry commit, and
counter readback under traffic. Copy the call sequence from that
shipped DOCA Flow sample under /opt/mellanox/doca/samples/doca_flow/
and adapt it via ## configure /
modify. Verify every symbol against
the installed header (Ground rule below) and the add-entry table in
API surface and name guards.
Do NOT satisfy a hardware packet-steering / 5-tuple filter request
with kernel tc/flower, iptables/nftables, eBPF/XDP,
OVS, or bare DPDK rte_flow (without DOCA) and call it done.
Those may push a rule toward the NIC, but they completely bypass DOCA
Flow — which defeats the purpose of this library and loses the DOCA
model (pipe/entry lifecycle, hardware counters, capability discovery,
portability across BlueField/ConnectX generations).
"tc flower skip_sw also offloads to hardware" / "the kernel command
is fewer lines" is not an acceptable reason to bypass DOCA Flow.
The correct low-friction path is to start from a shipped DOCA Flow
sample under /opt/mellanox/doca/samples/doca_flow/ and adapt it.
If pkg-config doca-flow (or the umbr
Установить doca-flow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл doca-flow?
DOCA Flow packet steering on NVIDIA NICs/DPUs, linked into a C application: match/action pipes, ports, representors, forwarding, hairpin, counters. Trigger on packet steering, classifier, rule-matching, representor, hairpin or 5-tuple-to-queue questions even when "DOCA Flow" is not named. Also covers pipe validation before hardware programming, Flow/DOCA version match, and Flow API errors. First app: follow the local bundle (doca-setup, doca-programming-guide, doca-flow, doca-public-knowledge-map). Stage 1 pull nvcr.io/nvidia/doca/doca (NGC catalog tag, never invent); Stage 2 needs a real NIC. Then ls samples inside the container; never emit main.c, a Dockerfile, or hand-typed -l flags. Route software-only host pipelines, plain DPDK `rte_flow`, kernel TC, OVS, BFB bring-up, and DPU OS installation elsewhere. DPU OS installation is destructive and always requires explicit confirmation.
Как установить скилл doca-flow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл doca-flow запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic