doca-erasure-coding

Guides DOCA Erasure Coding context setup, task selection, and debugging on BlueField DPUs.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill doca-erasure-coding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doca-erasure-coding
Source: https://github.com/NVIDIA/skills/tree/main/skills/doca-erasure-coding
Command: npx skills add https://github.com/NVIDIA/skills --skill doca-erasure-coding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers offloading Reed-Solomon erasure coding to BlueField DPUs or ConnectX NICs face a complex configuration surface: choosing among create/recover/update tasks, sizing N+K layouts and block sizes against device capabilities, setting correct mmap permissions, and interpreting DOCA_ERROR_* failures. This Skill gives an AI agent the structured guidance to walk those decisions correctly against the user's actual installed DOCA version and hardware.

Core Features & Use Cases

  • Task-type and path selection: Distinguishes create (encode N data blocks into K parity), recover (reconstruct up to K missing blocks), and update (cheap incremental parity refresh when one block changes), and tells the agent when erasure coding is the wrong primitive entirely (pure replication, non-Reed-Solomon codes, network FEC).
  • Capability-driven configuration: Enforces querying doca_ec_cap_* functions (task support, max block size, max buffer list length, matrix variants) before committing matrix type, N, K, or block size, preventing hallucinated API assumptions.
  • Error taxonomy and debug ladder: Maps DOCA_ERROR_* returns (BAD_STATE, INVALID_VALUE, NOT_SUPPORTED, NOT_PERMITTED, AGAIN, DRIVER) to EC-specific root causes with a layered debug workflow.
  • Use Case: A developer building a distributed object store asks "one data block changed, how do I refresh parity without re-encoding?" The agent routes to doca_ec_task_update instead of a wasteful full re-encode, verifies device support, and prescribes a known-vector recover smoke test before bulk data flows.

Quick Start

Ask your agent to help configure a doca_ec context with create and recover tasks for an 8+4 RAID-style layout on your BlueField DPU and verify device capabilities first.

Frequently Asked Questions about doca-erasure-coding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update erasure coding parity when one data block changes?

Use doca_ec_task_update instead of re-running doca_ec_task_create. The update task incrementally refreshes the K parity blocks using only the changed block's delta, which is far cheaper than re-encoding all N data blocks from scratch.

How do I check if my BlueField device supports DOCA Erasure Coding tasks?

Query doca_ec_cap_task_create_is_supported, _task_recover_is_supported, _task_update_is_supported, and _task_galois_mul_is_supported against the active doca_devinfo. Also check doca_ec_cap_get_max_block_size and _get_max_buf_list_len before sizing your layout.

When should I use erasure coding instead of replication?

Use erasure coding for bulk storage-durability workloads where N+K coded fragments are more storage-efficient than keeping M whole copies, such as distributed file systems or object stores. For small clusters where one extra copy suffices, pure replication is simpler and cheaper.

Why does doca_ec_task_create return DOCA_ERROR_NOT_PERMITTED?

This means a buffer permission is wrong. Source mmaps need at least DOCA_ACCESS_FLAG_LOCAL_READ_ONLY and destination mmaps need DOCA_ACCESS_FLAG_LOCAL_READ_WRITE, set on every one of the N+K buffers before the first task submission.

Can DOCA Erasure Coding recover data if more than K blocks are lost?

No. An N+K Reed-Solomon layout tolerates at most K simultaneous block losses. If more than K blocks are missing, the layout is mathematically unrecoverable and you must restore from another replica or accept the data loss.

Does doca-erasure-coding support fountain codes or LDPC?

No. The DOCA Erasure Coding accelerator implements Reed-Solomon only, with Cauchy and Vandermonde matrix variants. Fountain codes, LDPC, and raptor codes require a CPU-based library instead.