DOCA Erasure Coding
Examples
- "A disk failed; can I rebuild from parity?" — this is in
scope if the layout is Reed-Solomon N+K. Query
doca_ec_cap_*
before sizing recover.
- "One data block changed; refresh parity without re-encoding."
— use the update task. Do not route this to replication or
network FEC.
Quick answer: capability check and sample choice
Before writing code, query the device: doca_ec_cap_task_create_is_supported,
doca_ec_cap_task_update_is_supported or doca_ec_cap_task_recover_is_supported
for the task you need, then doca_ec_cap_get_max_block_size and
doca_ec_cap_get_max_buf_list_len to size blocks. Start from the shipped sample
for that task under /opt/mellanox/doca/samples/doca_erasure_coding/ (copy it;
never edit the installed one). Use the update task to refresh parity for a
changed block instead of re-encoding everything.
Instructions
Follow Loading order below. Open the tasks companion for configure /
recover / debug. Open the capabilities companion for create /
recover / update and matrix policy. Do not open every companion file.
Where to start: This skill assumes DOCA is already installed and
the user is doing hands-on erasure-coding 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 DOCA Erasure Coding express on this version. If the
user has not installed DOCA yet, route to
doca-setup/SKILL.md first. If the user is
asking "should I even use erasure coding here, or just replicate
the data?", the path-selection rule in
Capabilities and modes
is the first stop — erasure coding is a storage-resilience
primitive (RAID-6 / distributed file system parity / object-storage
erasure-coded buckets), not a network primitive and not a
replication substitute.
How to use this skill. Read this file, then search the companion file
for the ## <name> heading the question needs and read that whole section.
Answer completely from it, quoting only its symbols and commands. Do not
browse docs; use the entry points in doca-public-knowledge-map. Give
environment checks as commands for the user's DOCA host. For out-of-scope
requests, name the skill that owns them and stop.
Example questions this skill answers well
The CLASSES of DOCA Erasure Coding 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.
- "Should I offload this erasure coding to DOCA, or do it on the
CPU — or just replicate the data instead?" — worked example:
"I am writing a distributed object store that wants RAID-6-like
resilience across 12 disks; is doca-erasure-coding the right
primitive, or should I just keep three copies?". Answered by
the path-selection table in
Capabilities and modes
- the "when NOT to use doca-erasure-coding" bullets in
Safety policy.
- "Does my device support the EC task type, block size, N+K
layout, and matrix type I want?" — worked example: "is
doca_ec_task_create on this BlueField, what is the maximum
block size, what is the cap on N+K, and does the device
advertise a Vandermonde Reed-Solomon matrix?". Answered by
the per-task + matrix + size capability-query rule
(doca_ec_cap_task_create_is_supported,
_task_recover_is_supported, _task_update_is_supported,
_task_galois_mul_is_supported — the 4th public task on the
EC accelerator, doca_ec_cap_get_max_block_size,
doca_ec_cap_get_max_buf_list_len, and per-variant
doca_ec_matrix_create() constructor success — the public
header does NOT ship a doca_ec_cap_get_matrix_* family) inCapabilities and modes
configure.
- "One source block changed — do I have to recompute all the
parity from scratch?" — worked example: "I have 8 data + 4
parity blocks on disk; one data block was just rewritten. How
do I express the parity update without re-running the full
encode?". Answered by the
doca_ec_task_update row in the
task-type table inCapabilities and modes
- the update-vs-re-encode rule in
Safety policy
- the modify-from-sample slot for switching between create and
update tasks in
modify.
- "K of my N+K blocks went missing — how do I reconstruct
them?" — worked example: "a disk failed; the 8 data blocks
are intact but 2 of the 4 parity blocks are gone; can DOCA
recover them?". Answered by the
doca_ec_task_recover row in the task-type table inCapabilities and modes
- the recover smoke (encode → drop a block → recover → bit-compare)
in ## test.
- "What permissions does the source / destination mmap need?" —
worked example: "my
doca_ec_task_create returns
DOCA_ERROR_NOT_PERMITTED". Answered by the permission matrix
in ## Safety policy
- the mmap-set-permissions checklist in
test.
- "Is this DOCA Erasure Coding API available on my installed
DOCA version?" — worked example: "is
doca_ec_task_update in
the DOCA I have installed, or do I have to recompute parity from
scratch?". Answered by the version-compatibility overlay inVersion compatibility,
which cross-links the canonical detection chain in
doca-version/SKILL.md and adds the
EC-specific "discover per-task support + matrix type via cap
query" bullets.
- "What does this
DOCA_ERROR_* from an EC call mean and which
layer caused it?" — worked example: "DOCA_ERROR_INVALID_VALUE
on doca_ec_task_create_allocate_init with block_size = 4 MiB".
Answered by the EC overlay on the cross-library taxonomy inError taxonomy
debug that escalates to
doca-debug/SKILL.md.
Audience
This skill serves external developers building applications that
consume the DOCA Erasure Coding library — i.e., users whose code
calls doca_ec_* (directly in C/C++, or through FFI/bindings from
another language) to offload Reed-Solomon erasure coding onto a
BlueField DPU or ConnectX accelerator. It is not for NVIDIA
developers contributing to DOCA Erasure Coding itself.
The canonical fit is distributed storage: RAID-6-style block
layouts, distributed file system parity, object-storage
erasure-coded buckets, and any data-durability workload where the
N data + K redundancy block model lets the system tolerate K
simultaneous block losses without data loss. The skill keeps the
agent oriented to that domain: erasure coding is operationally
distinct from pure replication (which keeps M whole copies) and
from RAID-6 the disk layout (which is one specific instance of
the N=k, K=2 case); confusing them produces wrong recommendations.
Language scope. DOCA Erasure Coding ships as a C library with
pkg-config module name doca-erasure-coding. The shipped samples
are written in C. C and C++ consumers are the canonical case and
the worked examples in the tasks companion assume that path. Other-language
consumers (Rust, Go, Python, …) consume the same *.so through
FFI or language-specific bindings; the skill's contribution in
that case is to keep the lifecycle, capability-discovery,
permission, error-taxonomy, and create-vs-recover-vs-update
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 Erasure
Coding work, in any language. Concretely:
- Initializing a
doca_ec context on a doca_dev and configuring
at least one task type (doca_ec_task_create,
doca_ec_task_recover, and/or doca_ec_task_update) before
doca_ctx_start().
- Choosing between the create task (encode N data blocks into
K redundancy blocks), the recover task (reconstruct up to K
missing blocks given the surviving subset), and the update
task (incrementally update redundancy blocks when one source
block changes — much cheaper than re-encoding from scratch).
- Picking the coding parameters: matrix type / coding scheme
(typically Vandermonde or Cauchy for Reed-Solomon), N (number
of data blocks), K (number of redundancy blocks), and block
size (all blocks the same size).
- Setting permissions on
doca_mmap correctly for the source
buffers — data blocks for create, data + parity for recover —
(DOCA_ACCESS_FLAG_LOCAL_READ_ONLY at minimum) and the
destination buffers — redundancy blocks for create, recovered
blocks for recover, updated parity for update —
(DOCA_ACCESS_FLAG_LOCAL_READ_WRITE).
- Sizing blocks against
doca_ec_cap_get_max_block_size(devinfo) and N+K against
doca_ec_cap_get_max_buf_list_len(devinfo, &max_buf_list_len).
- Checking which task types and matrix schemes this device's
accelerator advertises via the
doca_ec_cap_task_*_is_supported (including the 4th task
_task_galois_mul_is_supported) and per-variant
doca_ec_matrix_create() constructor success — the public
header does NOT ship a doca_ec_cap_get_matrix_*
families against the active doca_devinfo.
- Validating against a known-vector recover smoke (encode a small
N + K layout, simulate one block loss, recover, bit-compare
against the original block) before pushing bulk storage data
through the accelerator.
- Recognising when update is the right task (single source
block changed in an existing N + K layout —
doca_ec_task_update
is far cheaper than recomputing all K parity blocks via a fresh
doca_ec_task_create).
- Debugging a
DOCA_ERROR_* returned from an EC call (lifecycle
vs. block-size vs. N+K vs. matrix-type vs. permission vs.
queue pressure) and the task-completion event on the progress
engine.
- Designing or extending non-C bindings (Rust, Go, Python, …)
that wrap the EC C ABI — for the lifecycle, permission,
capability, and create-vs-recover-vs-update rules the wrapper
must honor.
Do not load this skill for general DOCA orientation, install
of DOCA itself, non-Reed-Solomon erasure codes (fountain codes,
LDPC — those belong on a CPU library, not the DOCA accelerator),
pure replication / mirroring designs (erasure coding is the wrong
primitive when one extra copy is the right answer), or other
DOCA libraries. For those, use
doca-public-knowledge-map/SKILL.md.
What this skill provides
This is a thin loader. The body keeps only the orientation
needed to pick the right next file. The substantive
EC-specific material lives in two companion files:
- the capabilities companion — what DOCA Erasure Coding can express on
this version: the three task types (create / recover / update,
each independently capability-gated), the matrix-type + N + K +
block-size configuration surface, the capability-query family
(
doca_ec_cap_* for task support, max block size, max N+K,
supported matrix types), the EC error taxonomy (mapped onto
the cross-library DOCA_ERROR_* set), the observability
surface (per-task completion events on the progress engine),
the safety policy that gates source / destination mmap
permission decisions, and the path-selection rule (when to use
doca-erasure-coding versus a CPU EC library versus pure
replication versus RAID-6 on disk).
- the tasks companion — step-by-step workflows for the six in-scope EC
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 or BlueField where DOCA is already
installed at the standard location and the user has the
privileges their public install profile expects. It does not
cover installing DOCA — 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 EC application source code, in any
language. The verified EC source code is the shipped C
samples at
/opt/mellanox/doca/samples/doca_erasure_coding/.
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 in
doca-programming-guide/SKILL.md,
layered with the EC-specific overrides inmodify.
- Pre-computed parity tables for arbitrary N + K layouts.
The skill tells the agent to use a known-vector smoke
(encode a tiny N + K layout from a fixed input, simulate
losing one block, recover, bit-compare against the original)
as the smoke before bulk; it does not ship a vector bank of
its own.
- Standalone build manifests (
meson.build,
CMakeLists.txt, Cargo.toml, …) parked inside the skill.
The agent constructs the build manifest in the user's
project directory against the user's installed DOCA, where
pkg-config --modversion doca-erasure-coding is the source of
truth.
- A
samples/, bindings/, or reference/ 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 (storage-domain resilience — N data + K redundancy
blocks — and not a network or replication question
misclassified as erasure coding).
- For the EC capability matrix, the three task types
(create / recover / update), the matrix-type + N + K +
block-size configuration surface, the capability-query rules,
permission matrix, error taxonomy, observability, and safety /
path-selection 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
version-handling rules, and
doca-public-knowledge-map/SKILL.md
whenever the right answer is "look it up in the public docs or
the installed package layout" rather than "EC-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 DOCA
Erasure Coding page lives at
https://docs.nvidia.com/doca/sdk/DOCA-Erasure-Coding/index.html;
the install-tree layout (samples directory, header location)
belongs to the public knowledge map, not to this skill.
doca-setup/SKILL.md — env preparation,
install verification, and the I have no install yet path
with the public NGC DOCA container. This skill assumes its
preconditions are satisfied.
doca-version/SKILL.md — canonical DOCA
version-handling rules. This skill's
## Version compatibility
cross-links the four-way match rule and adds only the
EC-specific "discover per-task support + supported matrix
types + max block size + max N+K via cap query" overlay.
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
canonical pkg-config + meson build pattern, the universal
modify-a-shipped-sample first-app workflow, the universal
lifecycle, the cross-library DOCA_ERROR_* taxonomy, and the
program-side debug order. This skill layers EC specifics on
top.
doca-debug/SKILL.md — the cross-cutting
debug ladder (install / version / build / link / runtime /
program / driver). EC-specific debug (task-not-supported,
matrix-type-unsupported, block-size-over-max, N+K-over-max,
recover-with-too-many-missing) overlays on top of that ladder.
1---2license: Apache-2.03name: doca-erasure-coding4description: >5 Hardware-offloaded erasure coding with DOCA Erasure Coding6 (Reed-Solomon, doca_ec) on a BlueField DPU, ConnectX NIC, or host:7 generating parity for data blocks, rebuilding lost blocks from the8 survivors, and refreshing parity after a change. Trigger on "one data9 block changed, how do I refresh parity without re-encoding", "a disk10 failed and 2 parity blocks are gone, can I rebuild", "RAID-6 resilience11 across 12 disks", "my doca_ec_task_create returns NOT_PERMITTED", or "is12 this N+K layout still recoverable", even without naming DOCA Erasure13 Coding. Covers bringing up a doca_ec context, the create / recover /14 update tasks, matrix type / N / K / block size, doca_ec_cap_* queries15 before sizing, doca_mmap src/dst permissions, and DOCA_ERROR_* from16 doca_ec_task_*. Refuse and route elsewhere for non-Reed-Solomon codes17 (fountain / LDPC / raptor), pure-replication designs, network FEC, or18 other DOCA accelerator libraries (SHA / Compress / AES-GCM / DMA).19metadata:20 source: https://skillmd.com/skills/nvidia/doca-erasure-coding21 author: NVIDIA <doca-feedback@nvidia.com>22 kind: library23 doca_version: "3.5"24 tags:25 - doca26 - erasure-coding27 - reed-solomon28compatibility: >29 Requires DOCA SDK installed at /opt/mellanox/doca on Linux (Ubuntu30 22.04/24.04 or RHEL/SLES) with a BlueField DPU or ConnectX NIC31 attached. Reads the user's local install via `pkg-config32 doca-erasure-coding` and inspects33 /opt/mellanox/doca/{lib,include,samples,applications}.34 The validation steps require a live DOCA install.35---3637# DOCA Erasure Coding3839## Examples4041- **"A disk failed; can I rebuild from parity?"** — this is in42 scope if the layout is Reed-Solomon N+K. Query `doca_ec_cap_*`43 before sizing recover.44- **"One data block changed; refresh parity without re-encoding."**45 — use the update task. Do not route this to replication or46 network FEC.4748## Quick answer: capability check and sample choice4950Before writing code, query the device: `doca_ec_cap_task_create_is_supported`,51`doca_ec_cap_task_update_is_supported` or `doca_ec_cap_task_recover_is_supported`52for the task you need, then `doca_ec_cap_get_max_block_size` and53`doca_ec_cap_get_max_buf_list_len` to size blocks. Start from the shipped sample54for that task under `/opt/mellanox/doca/samples/doca_erasure_coding/` (copy it;55never edit the installed one). Use the update task to refresh parity for a56changed block instead of re-encoding everything.5758## Instructions5960Follow Loading order below. Open the tasks companion for configure /61recover / debug. Open the capabilities companion for create /62recover / update and matrix policy. Do not open every companion file.6364**Where to start:** This skill assumes DOCA is already installed and65the user is doing **hands-on erasure-coding work** on a BlueField /66ConnectX / host with DOCA. Open the tasks companion if the user67wants to *do* something (configure / build / modify / run / test /68debug); open the capabilities companion when the question69is *what can DOCA Erasure Coding express* on this version. If the70user has not installed DOCA yet, route to71`doca-setup/SKILL.md` first. If the user is72asking *"should I even use erasure coding here, or just replicate73the data?"*, the path-selection rule in74## Capabilities and modes75is the first stop — erasure coding is a **storage-resilience**76primitive (RAID-6 / distributed file system parity / object-storage77erasure-coded buckets), not a network primitive and not a78replication substitute.7980**How to use this skill.** Read this file, then search the companion file81for the `## <name>` heading the question needs and read that whole section.82Answer completely from it, quoting only its symbols and commands. Do not83browse docs; use the entry points in `doca-public-knowledge-map`. Give84environment checks as commands for the user's DOCA host. For out-of-scope85requests, name the skill that owns them and stop.8687## Example questions this skill answers well8889The CLASSES of DOCA Erasure Coding questions this skill is built90to answer, each with one worked example. The agent should treat91the *class* as the load-bearing piece — the worked example is a92single instance.9394- **"Should I offload this erasure coding to DOCA, or do it on the95 CPU — or just replicate the data instead?"** — worked example:96 *"I am writing a distributed object store that wants RAID-6-like97 resilience across 12 disks; is doca-erasure-coding the right98 primitive, or should I just keep three copies?"*. Answered by99 the path-selection table in100 ## Capabilities and modes101 + the *"when NOT to use doca-erasure-coding"* bullets in102 ## Safety policy.103- **"Does my device support the EC task type, block size, N+K104 layout, and matrix type I want?"** — worked example: *"is105 `doca_ec_task_create` on this BlueField, what is the maximum106 block size, what is the cap on N+K, and does the device107 advertise a Vandermonde Reed-Solomon matrix?"*. Answered by108 the per-task + matrix + size capability-query rule109 (`doca_ec_cap_task_create_is_supported`,110 `_task_recover_is_supported`, `_task_update_is_supported`,111 `_task_galois_mul_is_supported` — the 4th public task on the112 EC accelerator, `doca_ec_cap_get_max_block_size`,113 `doca_ec_cap_get_max_buf_list_len`, and per-variant114 `doca_ec_matrix_create()` constructor success — the public115 header does NOT ship a `doca_ec_cap_get_matrix_*` family) in116 ## Capabilities and modes117 + the discovery step in118 ## configure.119- **"One source block changed — do I have to recompute all the120 parity from scratch?"** — worked example: *"I have 8 data + 4121 parity blocks on disk; one data block was just rewritten. How122 do I express the parity update without re-running the full123 encode?"*. Answered by the `doca_ec_task_update` row in the124 task-type table in125 ## Capabilities and modes126 + the update-vs-re-encode rule in127 ## Safety policy128 + the modify-from-sample slot for switching between create and129 update tasks in130 ## modify.131- **"K of my N+K blocks went missing — how do I reconstruct132 them?"** — worked example: *"a disk failed; the 8 data blocks133 are intact but 2 of the 4 parity blocks are gone; can DOCA134 recover them?"*. Answered by the135 `doca_ec_task_recover` row in the task-type table in136 ## Capabilities and modes137 + the recover smoke (encode → drop a block → recover → bit-compare)138 in ## test.139- **"What permissions does the source / destination mmap need?"** —140 worked example: *"my `doca_ec_task_create` returns141 `DOCA_ERROR_NOT_PERMITTED`"*. Answered by the permission matrix142 in ## Safety policy143 + the mmap-set-permissions checklist in144 ## test.145- **"Is this DOCA Erasure Coding API available on my installed146 DOCA version?"** — worked example: *"is `doca_ec_task_update` in147 the DOCA I have installed, or do I have to recompute parity from148 scratch?"*. Answered by the version-compatibility overlay in149 ## Version compatibility,150 which cross-links the canonical detection chain in151 `doca-version/SKILL.md` and adds the152 EC-specific *"discover per-task support + matrix type via cap153 query"* bullets.154- **"What does this `DOCA_ERROR_*` from an EC call mean and which155 layer caused it?"** — worked example: *"`DOCA_ERROR_INVALID_VALUE`156 on `doca_ec_task_create_allocate_init` with block_size = 4 MiB"*.157 Answered by the EC overlay on the cross-library taxonomy in158 ## Error taxonomy159 + the layered ladder in160 ## debug that escalates to161 `doca-debug/SKILL.md`.162163## Audience164165This skill serves **external developers building applications that166consume the DOCA Erasure Coding library** — i.e., users whose code167calls `doca_ec_*` (directly in C/C++, or through FFI/bindings from168another language) to offload Reed-Solomon erasure coding onto a169BlueField DPU or ConnectX accelerator. It is *not* for NVIDIA170developers contributing to DOCA Erasure Coding itself.171172The canonical fit is **distributed storage**: RAID-6-style block173layouts, distributed file system parity, object-storage174erasure-coded buckets, and any data-durability workload where the175N data + K redundancy block model lets the system tolerate K176simultaneous block losses without data loss. The skill keeps the177agent oriented to that domain: erasure coding is operationally178distinct from pure replication (which keeps M whole copies) and179from RAID-6 the disk layout (which is one specific instance of180the N=k, K=2 case); confusing them produces wrong recommendations.181182**Language scope.** DOCA Erasure Coding ships as a C library with183`pkg-config` module name `doca-erasure-coding`. The shipped samples184are written in C. C and C++ consumers are the canonical case and185the worked examples in the tasks companion assume that path. Other-language186consumers (Rust, Go, Python, …) consume the same `*.so` through187FFI or language-specific bindings; the skill's contribution in188that case is to keep the lifecycle, capability-discovery,189permission, error-taxonomy, and create-vs-recover-vs-update190guidance language-neutral, and to route the agent to the public C191ABI as the authoritative surface that any wrapper will eventually192call.193194## When to load this skill195196Load this skill when the user is doing hands-on DOCA Erasure197Coding work, in any language. Concretely:198199- Initializing a `doca_ec` context on a `doca_dev` and configuring200 at least one task type (`doca_ec_task_create`,201 `doca_ec_task_recover`, and/or `doca_ec_task_update`) before202 `doca_ctx_start()`.203- Choosing between the **create** task (encode N data blocks into204 K redundancy blocks), the **recover** task (reconstruct up to K205 missing blocks given the surviving subset), and the **update**206 task (incrementally update redundancy blocks when one source207 block changes — much cheaper than re-encoding from scratch).208- Picking the coding parameters: matrix type / coding scheme209 (typically Vandermonde or Cauchy for Reed-Solomon), N (number210 of data blocks), K (number of redundancy blocks), and block211 size (all blocks the same size).212- Setting permissions on `doca_mmap` correctly for the source213 buffers — data blocks for create, data + parity for recover —214 (`DOCA_ACCESS_FLAG_LOCAL_READ_ONLY` at minimum) and the215 destination buffers — redundancy blocks for create, recovered216 blocks for recover, updated parity for update —217 (`DOCA_ACCESS_FLAG_LOCAL_READ_WRITE`).218- Sizing blocks against219 `doca_ec_cap_get_max_block_size(devinfo)` and N+K against220 `doca_ec_cap_get_max_buf_list_len(devinfo, &max_buf_list_len)`.221- Checking which task types and matrix schemes this device's222 accelerator advertises via the223 `doca_ec_cap_task_*_is_supported` (including the 4th task224 `_task_galois_mul_is_supported`) and per-variant225 `doca_ec_matrix_create()` constructor success — the public226 header does NOT ship a `doca_ec_cap_get_matrix_*`227 families against the active `doca_devinfo`.228- Validating against a known-vector recover smoke (encode a small229 N + K layout, simulate one block loss, recover, bit-compare230 against the original block) before pushing bulk storage data231 through the accelerator.232- Recognising when **update** is the right task (single source233 block changed in an existing N + K layout — `doca_ec_task_update`234 is far cheaper than recomputing all K parity blocks via a fresh235 `doca_ec_task_create`).236- Debugging a `DOCA_ERROR_*` returned from an EC call (lifecycle237 vs. block-size vs. N+K vs. matrix-type vs. permission vs.238 queue pressure) and the task-completion event on the progress239 engine.240- Designing or extending non-C bindings (Rust, Go, Python, …)241 that wrap the EC C ABI — for the lifecycle, permission,242 capability, and create-vs-recover-vs-update rules the wrapper243 must honor.244245Do **not** load this skill for general DOCA orientation, install246of DOCA itself, non-Reed-Solomon erasure codes (fountain codes,247LDPC — those belong on a CPU library, not the DOCA accelerator),248pure replication / mirroring designs (erasure coding is the wrong249primitive when one extra copy is the right answer), or other250DOCA libraries. For those, use251`doca-public-knowledge-map/SKILL.md`.252253## What this skill provides254255This is a **thin loader**. The body keeps only the orientation256needed to pick the right next file. The substantive257EC-specific material lives in two companion files:258259- the capabilities companion — what DOCA Erasure Coding can express on260 this version: the three task types (create / recover / update,261 each independently capability-gated), the matrix-type + N + K +262 block-size configuration surface, the capability-query family263 (`doca_ec_cap_*` for task support, max block size, max N+K,264 supported matrix types), the EC error taxonomy (mapped onto265 the cross-library `DOCA_ERROR_*` set), the observability266 surface (per-task completion events on the progress engine),267 the safety policy that gates source / destination mmap268 permission decisions, and the path-selection rule (when to use269 doca-erasure-coding versus a CPU EC library versus pure270 replication versus RAID-6 on disk).271- the tasks companion — step-by-step workflows for the six in-scope EC272 verbs: `configure`, `build`, `modify`, `run`, `test`, `debug`.273 Plus a `Deferred task verbs` block that points out-of-scope274 questions at the right next skill.275276The skill assumes a host or BlueField where DOCA is already277installed at the standard location and the user has the278privileges their public install profile expects. It does not279cover installing DOCA — that path goes through280`doca-setup/SKILL.md`.281282## What this skill deliberately does not ship283284This skill is **agent guidance**, not a samples or templates285bundle. To keep the boundary clean, it deliberately does not286contain — and pull requests should not add:287288- **Pre-written DOCA EC application source code, in any289 language.** The verified EC source code is the shipped C290 samples at `/opt/mellanox/doca/samples/doca_erasure_coding/`.291 The agent's job is to route the user to those files and292 prescribe a minimum-diff modification on them via the universal293 modify-a-sample workflow in294 `doca-programming-guide/SKILL.md`,295 layered with the EC-specific overrides in296 ## modify.297- **Pre-computed parity tables for arbitrary N + K layouts.**298 The skill tells the agent to use a *known-vector* smoke299 (encode a tiny N + K layout from a fixed input, simulate300 losing one block, recover, bit-compare against the original)301 as the smoke before bulk; it does not ship a vector bank of302 its own.303- **Standalone build manifests** (`meson.build`,304 `CMakeLists.txt`, `Cargo.toml`, …) parked inside the skill.305 The agent constructs the build manifest *in the user's306 project directory* against the user's installed DOCA, where307 `pkg-config --modversion doca-erasure-coding` is the source of308 truth.309- **A `samples/`, `bindings/`, or `reference/` subtree** of any310 kind. A mock or incomplete artifact in this skill's tree, even311 one labeled "reference", is misleading: users will read it as312 buildable.313314## Loading order3153161. Read this skill first to confirm the user's question is in317 scope (storage-domain resilience — N data + K redundancy318 blocks — and not a network or replication question319 misclassified as erasure coding).3202. **For the EC capability matrix, the three task types321 (create / recover / update), the matrix-type + N + K +322 block-size configuration surface, the capability-query rules,323 permission matrix, error taxonomy, observability, and safety /324 path-selection policy, see the capabilities companion.**3253. **For step-by-step workflows — configure, build, modify, run,326 test, debug — see the tasks companion.**327328Both companion files cross-link to each other,329`doca-version/SKILL.md` for the canonical330version-handling rules, and331`doca-public-knowledge-map/SKILL.md`332whenever the right answer is "look it up in the public docs or333the installed package layout" rather than "EC-specific guidance".334335## Related skills336337- `doca-public-knowledge-map/SKILL.md` —338 the routing table for every public DOCA documentation source339 and the on-disk layout of an installed DOCA package. The DOCA340 Erasure Coding page lives at341 <https://docs.nvidia.com/doca/sdk/DOCA-Erasure-Coding/index.html>;342 the install-tree layout (samples directory, header location)343 belongs to the public knowledge map, not to this skill.344- `doca-setup/SKILL.md` — env preparation,345 install verification, and the *I have no install yet* path346 with the public NGC DOCA container. This skill assumes its347 preconditions are satisfied.348- `doca-version/SKILL.md` — canonical DOCA349 version-handling rules. This skill's350 `## Version compatibility`351 cross-links the four-way match rule and adds only the352 EC-specific *"discover per-task support + supported matrix353 types + max block size + max N+K via cap query"* overlay.354- `doca-structured-tools-contract/SKILL.md` —355 the bundle's structured-tools precedence rule (detect / prefer356 / fall back / report). The Command appendix in357 the tasks companion honors this contract.358- `doca-programming-guide/SKILL.md` —359 general DOCA programming patterns shared by every library: the360 canonical `pkg-config` + meson build pattern, the universal361 modify-a-shipped-sample first-app workflow, the universal362 lifecycle, the cross-library `DOCA_ERROR_*` taxonomy, and the363 program-side debug order. This skill layers EC specifics on364 top.365- `doca-debug/SKILL.md` — the cross-cutting366 debug ladder (install / version / build / link / runtime /367 program / driver). EC-specific debug (task-not-supported,368 matrix-type-unsupported, block-size-over-max, N+K-over-max,369 recover-with-too-many-missing) overlays on top of that ladder.