DOCA DMA
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
- "Memcpy a host buffer to BlueField without using the CPU." —
this is in scope. Use the shipped DMA sample and doca_dma_task_memcpy.
- "Copy returns NOT_PERMITTED on first submit." — check mmap
permissions and doca_dma_cap_* before changing the task type.
Instructions
Follow Loading order below. Open the tasks companion for configure /
build / run. Open the capabilities companion for the memcpy task
and path-selection vs RDMA. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed
and the user is doing hands-on DMA work on a BlueField /
ConnectX / host with DOCA. 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 DMA express on this version. If the user has not
installed DOCA yet, route to
doca-setup/SKILL.md first. If the user is
not sure DMA is even the right library — the data has to traverse
the network, or the flow is small messages between two processes —
read the path-selection rule in
Capabilities and modes
before configuring anything.
Example questions this skill answers well
The CLASSES of DMA 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 bring up a DOCA DMA context and copy a buffer
between host and DPU?"** — worked example: *"copy a 64 KiB
buffer from host memory to DPU memory in one task, starting from
the shipped DMA Copy reference application"*. Answered by the
lifecycle + memcpy-task workflow in
## configure +
## Capabilities and modes
task-type table.
- "How big a buffer can I memcpy in one task on this device?" —
worked example: *"can I copy 16 MiB in a single
doca_dma_task_memcpy"*. Answered by the capability-query rule
(doca_dma_cap_task_memcpy_get_max_buf_size, plus
_get_max_buf_list_len for scatter-gather) in
## Capabilities and modes
- the discovery step in
## configure.
- "What permissions do my source and destination mmaps need?" —
worked example: *"my memcpy task returns
DOCA_ERROR_NOT_PERMITTED on the first submit"*. Answered by the
source / destination permission matrix in
## Safety policy
- the permission checklist in
## test.
- **"Should I use DOCA DMA or DOCA RDMA / Comch / a plain CPU
memcpy for this copy?"** — worked example: *"I have a 1 MiB copy
that has to go from a host process to a DPU process; do I want
DMA or Comch fast-path". Answered by the "when to use DMA"*
vs "when not to" path-selection bullet in
## Capabilities and modes