Developer Toolkit

DOCA SDK & Programming

Build custom network functions on BlueField DPUs with NVIDIA's Data Center Infrastructure On a Chip Architecture (DOCA) software development kit.

50+
Core APIs
C/C++
Primary Languages
12
Hardware Accelerators
10×
vs Software-Only

DOCA Software Stack

DOCA provides a unified programming model for BlueField DPUs, abstracting hardware complexity while enabling direct accelerator access for maximum performance.

Application
Custom Apps
Your network functions
Reference Apps
Firewall, Gateway, Switch
DOCA SDK
DOCA Flow
Packet processing
DOCA Crypto
Encryption/decryption
DOCA Compress
Data compression
Drivers
DPDK
Fast packet I/O
RDMA
Low-latency transfers
Hardware
BlueField DPU
ARM Cores + Accelerators + Network

Core DOCA Libraries

Each DOCA library provides specialized functionality for common network and data center operations.

🌊

DOCA Flow

High-performance packet steering and modification. Define flow rules that execute at wire-speed in hardware.

doca_flow_pipe_create() doca_flow_pipe_add_entry() doca_flow_query()
🔐

DOCA Crypto

Hardware-accelerated encryption and decryption. AES-GCM at line rate with minimal CPU overhead.

doca_aes_gcm_encrypt() doca_sha_hash() doca_ec_sign()
📦

DOCA Compress

Hardware compression for storage and network. LZ4/Zstd at 100+ GB/s with dedicated engines.

doca_compress_deflate() doca_decompress() doca_compress_lz4()
🔍

DOCA RegEx

Pattern matching at wire-speed. Deep packet inspection, IDS/IPS, and application identification.

doca_regex_compile() doca_regex_search() doca_regex_match()

DOCA DMA

High-speed memory transfers between host and DPU. Zero-copy data movement with RDMA semantics.

doca_dma_memcpy() doca_dma_host_to_dpu() doca_dma_async()
📊

DOCA Telemetry

Real-time performance monitoring. Hardware counters, flow statistics, and custom metrics export.

doca_telemetry_start() doca_telemetry_export() doca_counter_read()

Flow Rule Programming

Creating a hardware-offloaded flow rule for tenant isolation with QoS enforcement.

tenant_isolation.c C
1 #include <doca_flow.h>
2 #include <doca_flow_net.h>
3
4 int create_tenant_isolation_rule(uint16_t tenant_id, uint64_t rate_limit) {
5 struct doca_flow_match match = {
6 .outer.l2_type = DOCA_FLOW_L2_TYPE_ETH,
7 .outer.vlan_id = tenant_id, // Match tenant VLAN
8 };
9
10 struct doca_flow_actions actions = {
11 .meter.cir = rate_limit, // Committed rate (bps)
12 .meter.cbs = 12500000, // 12.5MB burst size
13 };
14
15 return doca_flow_pipe_add_entry(pipe, &match, &actions, NULL);
16 }

Programming Models

DOCA supports multiple programming models to match your performance and complexity requirements.

Recommended

Pipe-Based (DOCA Flow)

Define flow rules as pipes with match criteria and actions. Hardware automatically processes matching packets at wire-speed without CPU intervention.

Latency
<5μs
CPU Usage
0%
Throughput
400 Gbps
Complexity
Low
Advanced

Run-to-Completion (DPDK)

Full control over packet processing. Poll packets from queues, process in software, and transmit. Maximum flexibility for custom logic.

Latency
10-50μs
CPU Usage
100%
Throughput
100 Gbps
Complexity
High

Packet Processing Pipeline

How packets flow through the DOCA-programmed BlueField DPU with hardware acceleration.

Hardware-Accelerated Packet Flow
📥
Ingress
<1μs
🔍
Parse
1-2μs
🎯
Match
1-2μs
Action
1-3μs
📤
Egress
<1μs