What problem does it solve?
Developers writing applications against the DOCA SHA library must correctly choose between one-shot and incremental hash tasks, query per-device algorithm and buffer-size capabilities, set source/destination mmap permissions, and decode DOCA_ERROR_* returns — mistakes surface as cryptic submit-time errors or undefined behavior.
Core Features & Use Cases
- Task-type and path selection: Decide between one-shot
doca_sha_task_hash and incremental doca_sha_task_partial_hash, and whether hardware offload beats a CPU hash at all.
- Capability discovery and buffer sizing: Query
doca_sha_cap_* for algorithm support, minimum destination buffer size, and maximum source buffer size against the active device before configuring.
- Error diagnosis and testing workflows: Map DOCA_ERROR_* returns to lifecycle, sizing, permission, or algorithm causes, and validate digests against published NIST test vectors before bulk submission.
- Use Case: You need to verify integrity of multi-GiB files on a BlueField DPU; the skill walks you through capability checks, context configuration, a known-vector smoke test, and bulk-hash validation.
Quick Start
Ask your agent to help you offload SHA-256 hashing of a large file to the BlueField DPU using the DOCA SHA API.