Every DOCA program has the same skeleton: find a device, register memory, submit async tasks, poll for completion. Learn the five objects and you can read any DOCA sample.
You have the layers. Now the shape of the code. DOCA Core is small on purpose — a handful of objects that every library reuses. This lesson is the "APIs" answer from your mission: not every function, but the mental model that makes the functions obvious.core
| Object | Role |
|---|---|
doca_dev | Discover a hardware acceleration unit and query what it can do |
doca_mmap / doca_buf / _inventory | Register memory once, then hand the HW zero-copy buffers over it |
doca_ctx | A configured, started instance of a library — you submit tasks to it |
| task → event | One async unit of work; its completion comes back as an event |
doca_pe (Progress Engine) | The thing you poll to advance tasks and receive completions |
Nearly every DOCA program — any library — follows this skeleton. Read the shape, not the exact function names:
DOCA offloads the data path to hardware and tells you when it's done. You don't call-and-block — you submit work and poll the progress engine. That async, zero-copy pattern is what keeps it at line rate.core
Each library is a kind of ctx with its own task types, on top of the same Core:
| Library | Accelerates |
|---|---|
DOCA Flow | Hardware packet steering as "pipes" — match & act at line rate |
DOCA RDMA | Remote direct memory access transfers |
DOCA GPUNetIO | A CUDA kernel driving the NIC directly (GPU-initiated networking) |
DOCA Comch | Control channel between host and DPU |
DOCA DMA / Compress | Copy / (de)compress via hardware engines |
DOCA App Shield | Agentless host process introspection (the "Argus" of the BlueField track) — DPU-only |
Because they share Core, learning one library teaches you the others: swap the
ctx and the task types; the device/memory/PE scaffolding is identical.
NVIDIA's DOCA Core page (objects + progress engine) and the DOCA Programming Guide. Open one sample (e.g. DMA) and find the five objects in it.