Networking DOCA Platform Framework (DPF) Documentation

DPUFlavor

Overview

DPUFlavor is a Kubernetes Custom Resource Definition (CRD) that defines configuration templates for DPU system-level settings. It serves as a blueprint that specifies how DPUs should be configured during provisioning, including kernel parameters, firmware settings, OVS configuration, network interfaces, and resource allocation.

API Version

  • API Group: provisioning.dpu.nvidia.com

  • API Version: v1alpha1

  • Kind: DPUFlavor

Key Features

  • Field-level immutability: dpuMode, bfcfgParameters, dpuResources, systemReservedResources, hostNetworkInterfaceConfigs, and cloud-init configFiles cannot be changed after create. Other spec fields may be edited on the existing DPUFlavor

  • Comprehensive System Configuration: Covers all aspects of DPU system configuration from boot parameters to runtime settings

  • Resource Management: Defines resource requirements and allocation policies

  • Cluster deployment mode: Zero-trust vs host-trusted is configured on DPFOperatorConfig and reflected on DPU status (deploymentMode), not on DPUFlavor

  • Template Reusability: Can be applied to multiple DPUs for consistent configuration

API Reference

DPUFlavorSpec

Field

Type

Description

grub

DPUFlavorGrub

All the parameters will be set in GRUB_CMDLINE_LINUX grub configuration

sysctl

DPUFlavorSysctl

Kernel sysctl parameters which will be stored in /etc/sysctl.d/99-dpf.conf

nvconfig

[]NVConfig

The device configuration which will be applied by mlxconfig

scalableFunctions

[]ScalableFunction

List of SF groups to create on the DPU, or on the host when hostDevice is set. Count is per selected device. Over-subscribe can fail at create time. This field is immutable. When both this list and virtualFunctions are empty, SF counts are still derived from PF_TOTAL_SF (removed in a future release). Up to 16 entries

virtualFunctions

[]VirtualFunction

List of VF groups to create. Count is per selected device. Groups ending up on the same device sum to a single sriov_numvfs and then list order assigns contiguous index ranges. Over-subscribe can fail at create time. Up to 16 entries

dma

DPUFlavorDMA

SNAP DMA SF configuration. The agent picks the ECPF; sfnum is 8000 and MAC is derived. Ignored on non-BlueField-4 DPUs

ovs

DPUFlavorOVS

Open vSwitch configuration applied by the DPU agent once per boot

bfcfgParameters

[]string

Parameters for the bf.cfg file. See BFCfg Parameters for important parameters

configFiles

[]ConfigFile

Custom configuration files. Users can use this configuration to overwrite files in the DPU file system or add content to existing files

containerdConfig

ContainerdConfig

ContainerdConfig contains the configuration for containerd

dpuResources

ResourceList

Minimum resources needed for BFB installation

systemReservedResources

ResourceList

Resources reserved for system use

hostNetworkInterfaceConfigs

[]NetworkInterfaceConfig

Host-side network interface configuration

serviceReadiness

ServiceReadiness

Configures the Service Readiness provisioning phase

ServiceReadiness

Configures the Service Readiness provisioning phase.

Field

Type

Description

gate

string

The DPU.status.operationalConditions entry that must be True before the DPU leaves the Service Readiness phase. One of DPUServiceCriticalPodsReady or OperationalReady. Optional, with no default

Unset is not the same as choosing a gate: the phase does not block, but a host hold requested through DELAY_HOST_OS_INIT is still released on DPUServiceCriticalPodsReady. Setting gate makes the phase block on that condition and points the host release at it too.

The hold itself is enabled by DELAY_HOST_OS_INIT=0x3 in NVConfig, not by this field, and requires Zero Trust; the phase gate works in either deployment mode. See Service Readiness.

ScalableFunction

Each entry is one group of SFs. count is per selected device, so device: "*" with count: 20 creates 20 SFs on each port, not 20 in total.

Field

Type

Description

count

int32

SFs per selected device. 0 creates nothing. Required

device

*string

"*", a port name such as p0, or a PCI address. Defaults to "*"

hostDevice

*bool

Create on the host (representors on the DPU). Implies controller 1; options.controller overrides. Host SFs use the host firmware budget. Must not set poolName

poolName

*string

Device-plugin resource (for example bf_sf). Unset: hardware only. Forbidden with hostDevice

options

ScalableFunctionOptions

Creation settings

ScalableFunctionOptions

Field

Type

Description

macAddress

*string

Pins the SF MAC (colon-separated 48-bit). Requires count: 1

sfNumStart

*int32

First sfnum of the group; the rest are sequential. Reserved before agent-numbered groups, which fill from 0

trusted

*bool

Creates the SFs as trusted functions

controller

*int32

External controller. Overrides hostDevice

cpuList

*string

CPU pin list, e.g. 0-3 or 0,2,4

disableRoCE

*bool

Create with RoCE disabled

disableNetdev

*bool

No ethernet netdev

VirtualFunction

Several entries may select the same device (including via "*"). Groups ending up on the same device sum to a single sriov_numvfs and then list order assigns contiguous index ranges:

YAML
spec:
  virtualFunctions:
    - count: 8              # VF indices 0-7 on p0
      device: p0
      poolName: bf_vf
    - count: 4              # VF indices 8-11 on p0
      device: p0
      poolName: bf_vf_2

That declares 12 VFs on p0, advertised as two device-plugin pools selecting p0#0-7 and p0#8-11.

A device no entry selects is left as-is; count: 0 empties it.

Field

Type

Description

count

int32

VFs per selected device. Groups ending up on the same device sum to a single sriov_numvfs and then list order assigns contiguous index ranges. 0 creates nothing. Required

device

*string

Same syntax as ScalableFunction. Defaults to "*"

poolName

*string

Device-plugin resource (for example bf_vf). Unset: hardware only

options

VirtualFunctionOptions

Creation settings

VirtualFunctionOptions

Field

Type

Description

macAddress

*string

Sets the VF MAC (colon-separated 48-bit). Requires count: 1

Setting a DPU VF trusted is not supported; there is no trusted option here (compare ScalableFunctionOptions, where SFs do support it).

NVConfig parameters for Virtual Functions

VFs require SRIOV_EN=1 and, critically, PF_NUM_OF_VF_VALID=1 with PF_NUM_OF_VF=<count> in firmware. Because PF_NUM_OF_VF is gated behind PF_NUM_OF_VF_VALID in firmware, both must be in the same batch with force: true (see Forcing parameters that firmware hides).

The ECPF (DPU ARM side) supports at most 32 VFs per port.

YAML
spec:
  nvconfig:
    - device: '*'
      force: true
      parameters:
        - SRIOV_EN=1
        - PF_NUM_OF_VF_VALID=1
        - PF_NUM_OF_VF=8
  virtualFunctions:
    - count: 8
      device: '*'
      poolName: bf_vf

DPUFlavorDMA

Field

Type

Description

enabled

*bool

Create the SNAP DMA SF on BlueField-4. The agent picks the ECPF; sfnum is 8000 and MAC is derived

This SF is not listed under scalableFunctions. When it is enabled, set the workload group count to PF_TOTAL_SF - 1 (see Function counts and the firmware budget).

Function counts and the firmware budget

The agent creates what the groups declare. It does not check PF_TOTAL_SF; over-subscribe fails at create time on the DPU. Size PF_TOTAL_SF in NVConfig for every DPU-side SF group.

When both scalableFunctions and virtualFunctions are empty, behavior is unchanged: trusted SFs from provisioning.dpu.nvidia.com/num-of-trusted-sfs in pool bf_sf_trusted, then the rest of PF_TOTAL_SF as workload SFs in pool bf_sf.

The provisioning.dpu.nvidia.com/num-of-trusted-sfs annotation is deprecated and is ignored from a future release in v27.x. Applying a flavor that sets it returns a deprecation warning. Declare the trusted SFs as a group instead:

YAML
spec:
  scalableFunctions:
    - count: 15            # workload SFs, previously the residual of PF_TOTAL_SF
      device: "*"          # alternatively device: p0
      poolName: bf_sf
    - count: 5             # previously num-of-trusted-sfs: "5"
      device: "*"          # alternatively device: p0
      poolName: bf_sf_trusted
      options:
        trusted: true

Declaring any group also turns off the inference above, so the workload SFs must be declared in the same flavor.

count is per selected device. Default for device is * and optional. If you want to control for single port for example p0, set device explicitly to "p0". The SNAP DMA SF is not consumed from scalableFunctions group. So when spec.dma.enabled is true, size the workload count as PF_TOTAL_SF - 1 and leave PF_TOTAL_SF in NVConfig unchanged.

YAML
# BlueField-3 , set device to control where SFs are created from.
spec:
  nvconfig:
    - device: "*"
      parameters:
        - PF_TOTAL_SF=20
  scalableFunctions:
    - count: 20
      device: "*"          # optional, alternatively set `device: p0`
      poolName: bf_sf
YAML
# BlueField-4 with SNAP DMA: omit device if not needed; reserve one firmware slot for dma.
spec:
  nvconfig:
    - device: "*"
      parameters:
        - PF_TOTAL_SF=20
  scalableFunctions:
    - count: 19
      poolName: bf_sf
  dma:
    enabled: true

DPUFlavorGrub

Field

Type

Description

kernelParameters

[]string

Kernel boot parameters to be set in grub configuration

DPUFlavorSysctl

Field

Type

Description

parameters

[]string

Sysctl parameters to be applied

NVConfig

Field

Type

Description

device

*string

Target device: "*" (all devices), "p0"/"P0" (port 0), or "p1"/"P1" (port 1). Case-insensitive.

parameters

[]string

Optional firmware parameters in KEY=VALUE format. When present, 1-64 entries, max 200 characters each; empty values such as FLAG= are allowed.

force

*bool

Apply the parameters with mlxconfig --force and skip the mlxconfig q deferral filter. Defaults to false.

Validation Constraints:

  • Maximum of 3 nvconfig entries per DPUFlavor (one per device: *, p0/P0, p1/P1)

  • Wildcard device ("*") must be the sole entry when specified (no mixing with port-specific entries)

  • Device identifiers must be unique with case-insensitive matching (e.g., p0 and P0 are duplicates)

  • Parameters are optional. When present, provide 1-64 KEY=VALUE entries for each device with no whitespace; values may be empty

IB Mode to Ethernet Mode Configuration

Example for single port DPU:

YAML
nvconfig:
  - device: '*'
    parameters:
      - LINK_TYPE_P1=ETH

Example for dual port DPU:

YAML
nvconfig:
  - device: '*'
    parameters:
      - LINK_TYPE_P1=ETH
      - LINK_TYPE_P2=ETH

Device-specific configuration (per-port):

YAML
nvconfig:
  - device: 'p0'
    parameters:
      - LINK_TYPE_P1=ETH
      - NUM_OF_VFS=8
  - device: 'p1'
    parameters:
      - LINK_TYPE_P1=IB

Forcing parameters that firmware hides

Firmware hides some parameters from mlxconfig q until an enabling parameter is already active. FORCE_ETH_PCI_SUBCLASS, for example, is invisible while ADVANCED_PCI_SETTINGS is off. A flavor that sets both must set force: true:

YAML
nvconfig:
  - device: '*'
    force: true
    parameters:
      - ADVANCED_PCI_SETTINGS=1
      - FORCE_ETH_PCI_SUBCLASS=1

Without force, such a flavor never converges: every pass resets the enabling parameter to its default before validating the batch, so the hidden parameter is rejected every time. The failing run commits that reset before it errors, leaving Next Boot at factory defaults and discarding the flavor's other parameters too. With force, a single power cycle activates the whole batch.

To find out whether a parameter is hidden, ask mlxconfig rather than guessing. mlxconfig show_confs states the dependency explicitly, for example Configuration is available only when NV_PCI_CONF.ADVANCED_PCI_SETTINGS is TRUE. Which parameters are gated, and by which enabling parameter, varies with firmware version and board.

Two costs to weigh before setting it:

  • force requires DOCA 3.5.0 or later. An older DOCA version accepts the flag but still rejects the hidden parameter, so the operation fails with an error such as -E- The Device doesn't support MAX_ACC_OUT_READ parameter. That message names the parameter rather than the cause, so check the DOCA version on the DPU when you see it on a flavor that sets force.

  • force skips validation for the entire batch, not just the hidden parameter, so an invalid value is applied silently instead of being rejected. This is why it is opt-in per flavor.

force is honored only under spec.nvconfig. The field also appears under spec.hostNetworkInterfaceConfigs[].nvconfig because both share a type, but nothing reads it there.

DPUFlavorOVS

Field

Type

Description

rawConfigScript

string

Raw OVS configuration script. The DPU agent runs it once per boot; an agent restart in the same boot does not re-run it, a reboot or power cycle does

ConfigFile

Field

Type

Description

path

string

File path on the DPU

operation

DPUFlavorFileOp

File operation type (override or append)

raw

string

File content

permissions

string

File permissions (e.g., "0644")

ContainerdConfig

Field

Type

Description

registryEndpoint

string

Container registry endpoint

sandboxImage

string

Overrides the containerd sandbox (pause) image on the DPU, e.g. registry.example.com/pause:3.9. The image must be pullable from the DPU. When unset, the sandbox image shipped with the BFB is kept; removing the field later does not restore the BFB's original value

NetworkInterfaceConfig

Field

Type

Description

mtu

*int32

MTU value (1280-9216)

dhcp

*bool

Enable DHCP configuration

portNumber

int32

Port identifier (0 or 1)

nvconfig

*NVConfig

Port-specific NVConfig settings

Enumerations

DPUFlavorFileOp

  • override: Replace file content entirely

  • append: Append to existing file content

BFCfg Parameters

The bfcfgParameters field accepts a list of KEY=VALUE strings that are written directly into the bf.cfg file consumed by the BFB installer. Common parameters include:

Parameter

Description

UPDATE_ATF_UEFI

Update ATF/UEFI firmware during provisioning (yes/no)

UPDATE_DPU_OS

Update the DPU operating system (yes/no)

WITH_NIC_FW_UPDATE

Update NIC firmware during provisioning (yes/no)

ubuntu_PASSWORD

Password hash for the ubuntu admin account on the DPU. If not set, DPF defaults to the well-known ubuntu:ubuntu credentials. It is strongly recommended to set this to a unique hashed password for every deployment

ubuntu_PASSWORD is filtered out of the generated bf.cfg and applied via cloud-init instead; all other parameters are written directly into the bf.cfg file.

To generate a SHA-512 password hash:

Bash
openssl passwd -6 'YourPassword'

Always use -6 (SHA-512). Do not use -1 (MD5), which is considered insecure.

For the full list of supported bf.cfg parameters, see the BlueField BSP documentation.

Resource Management

DPU Resources

The dpuResources field specifies the minimum resources required for a BFB with this flavor to be installed on a DPU. Using this field, the controller can understand if that flavor can be installed on a particular DPU. It should be set to the total amount of resources the system needs + the resources that should be made available for DPUServices to consume:

YAML
dpuResources:
  cpu: 16
  memory: 16Gi
  nvidia.com/sf: 20

System Reserved Resources

The systemReservedResources field indicates resources consumed by the system (OS, OVS, DPF system etc) and are not made available for DPUServices to consume. DPUServices can consume the difference between dpuResources and systemReservedResources. This field must not be specified if dpuResources are not specified.:

YAML
systemReservedResources:
  cpu: 4
  memory: 4Gi
  nvidia.com/sf: 4

The difference between dpuResources and systemReservedResources is available for DPUServices.

Examples

HBN-OVN DPUFlavor

YAML
apiVersion: provisioning.dpu.nvidia.com/v1alpha1
kind: DPUFlavor
metadata:
  name: hbn-ovn
  namespace: dpf-operator-system
spec:
  bfcfgParameters:
  - UPDATE_ATF_UEFI=yes
  - UPDATE_DPU_OS=yes
  - WITH_NIC_FW_UPDATE=yes
  configFiles:
  - operation: override
    path: /etc/mellanox/mlnx-bf.conf
    permissions: "0644"
    raw: |
      ALLOW_SHARED_RQ="no"
      IPSEC_FULL_OFFLOAD="no"
      ENABLE_ESWITCH_MULTIPORT="yes"
  - operation: override
    path: /etc/mellanox/mlnx-ovs.conf
    permissions: "0644"
    raw: |
      CREATE_OVS_BRIDGES="no"
      OVS_DOCA="yes"
  - operation: override
    path: /etc/mellanox/mlnx-sf.conf
    permissions: "0644"
    raw: ""
  # Link state propagation, which mirrors an HBN uplink's carrier onto the representor
  # serving it. Not yet supported on BlueField-4
  - operation: override
    path: /etc/systemd/system/sfc-state-propagation.service.d/10-dpf-no-sfc-gate.conf
    permissions: "0644"
    raw: |
      [Service]
      ExecStartPre=
  packages:
  - name: sfc-state-propagation
  systemdServices:
  - name: sfc-state-propagation.service
    operation: Enable
  grub:
    kernelParameters:
    - console=hvc0
    - console=ttyAMA0
    - earlycon=pl011,0x13010000
    - net.ifnames=0
    - biosdevname=0
    - iommu.passthrough=1
    - cgroup_no_v1=net_prio,net_cls
    - hugepagesz=2048kB
    - hugepages=250
  hostNetworkInterfaceConfigs:
  - dhcp: true
    mtu: 1500
    portNumber: 0
  nvconfig:
  - device: '*'
    parameters:
    - PF_BAR2_ENABLE=0
    - PER_PF_NUM_SF=1
    - PF_TOTAL_SF=20
    - PF_SF_BAR_SIZE=10
    - NUM_PF_MSIX_VALID=0
    - PF_NUM_PF_MSIX_VALID=1
    - PF_NUM_PF_MSIX=228
    - INTERNAL_CPU_MODEL=1
    - INTERNAL_CPU_OFFLOAD_ENGINE=0
    - SRIOV_EN=1
    - NUM_OF_VFS=46
    - LAG_RESOURCE_ALLOCATION=1
  scalableFunctions:
  - count: 20
    device: "*"  # alternatively device: p0
    poolName: bf_sf
  ovs:
    rawConfigScript: |
      _ovs-vsctl() {
        ovs-vsctl --timeout 15 "$@"
      }

      # Remove default OVS configuration on the DPU and ensure no leftovers on the OVS kernel side
      _ovs-vsctl --if-exists del-br ovsbr1
      _ovs-vsctl --if-exists del-br ovsbr2
      ovs-appctl --timeout 15 dpctl/del-dp system@ovs-system || true

      _ovs-vsctl set Open_vSwitch . other_config:doca-init=true
      _ovs-vsctl set Open_vSwitch . other_config:dpdk-max-memzones=50000
      _ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
      _ovs-vsctl set Open_vSwitch . other_config:pmd-quiet-idle=true
      _ovs-vsctl set Open_vSwitch . other_config:max-idle=20000
      _ovs-vsctl set Open_vSwitch . other_config:max-revalidator=5000
      _ovs-vsctl set Open_vSwitch . other_config:doca-congestion-threshold=60
      _ovs-vsctl set Open_vSwitch . other_config:flow-limit=500000
      _ovs-vsctl set Open_vSwitch . other_config:hw-offload-ct-unidir-udp-enabled=true
      _ovs-vsctl remove Open_vSwitch . other_config default-datapath-type || true

      if systemctl list-unit-files openvswitch-switch.service &>/dev/null; then
        systemctl restart openvswitch-switch
      elif systemctl list-unit-files openvswitch.service &>/dev/null; then
        systemctl restart openvswitch
      fi
      _ovs-vsctl --may-exist add-br br-sfc
      _ovs-vsctl set bridge br-sfc datapath_type=netdev
      _ovs-vsctl set bridge br-sfc fail_mode=secure
      _ovs-vsctl --if-exists del-br br-hbn
      _ovs-vsctl --may-exist add-br br-hbn
      _ovs-vsctl set bridge br-hbn datapath_type=netdev
      _ovs-vsctl set bridge br-hbn fail_mode=secure
      _ovs-vsctl --may-exist add-port br-sfc p0
      _ovs-vsctl set Interface p0 type=dpdk
      _ovs-vsctl set Interface p0 mtu_request=9216
      _ovs-vsctl set Port p0 external_ids:dpf-type=physical

      # Activate DOCA for OVNK
      _ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-datapath-type=netdev
      # setup ovnkube managed bridge, br-dpu (this corresponds to br-ex on ovnk docs)
      _ovs-vsctl --may-exist add-br br-dpu
      _ovs-vsctl br-set-external-id br-dpu bridge-id br-dpu
      _ovs-vsctl br-set-external-id br-dpu bridge-uplink pbrdputobrovn
      _ovs-vsctl set bridge br-dpu datapath_type=netdev
      _ovs-vsctl --may-exist add-port br-dpu pf0hpf
      _ovs-vsctl set Interface pf0hpf mtu_request=9216
      _ovs-vsctl set Interface pf0hpf type=dpdk

      # Create OVS bridge (br-ovn) in between the SC managed bridge and OVNK
      _ovs-vsctl --may-exist add-br br-ovn
      _ovs-vsctl set bridge br-ovn datapath_type=netdev
      _ovs-vsctl --may-exist add-port br-ovn pbrovntobrdpu
      _ovs-vsctl --may-exist add-port br-dpu pbrdputobrovn

      # Patch br-ovn and br-dpu together
      _ovs-vsctl set Interface pbrovntobrdpu type=patch options:peer=pbrdputobrovn
      _ovs-vsctl set Interface pbrdputobrovn type=patch options:peer=pbrovntobrdpu

      systemctl restart sfc-state-propagation.service || true

DPU Node Label Scripts

The DPU agent can run executable files on the DPU ARM and report their output as labels on the corresponding DPU cluster Node. This allows DPU-side hardware or software properties to be surfaced into Kubernetes scheduling decisions without any host-side tooling.

How it works

  1. On every provisioning run, the DPU agent scans the directory /var/lib/dpf/dpuagent/node-label-scripts/ on the DPU.

  2. Each regular, executable file in that directory is run with a 30-second timeout. Shell scripts and compiled binaries are supported.

  3. Each non-empty line the file prints on stdout must have the form <label-key-suffix>=<label-value> and produces one Node label. The key suffix is namespaced under the scripts.dpu.nvidia.com/ prefix. A single file can therefore report any number of labels.

  4. Labels from previous runs that are no longer emitted are automatically deleted from the Node.

Requirements:

  • Every non-empty stdout line must contain a =. Blank lines are ignored, and leading/trailing whitespace around the key and the value is trimmed.

  • The key suffix must be a valid Kubernetes label key suffix (alphanumeric, -, _, .; max 63 characters).

  • The value must be a valid Kubernetes label value.

  • The file name is not part of the label key and has no naming constraints.

  • The file must be a regular file with at least one executable bit set (chmod +x).

  • Directories in the scripts directory are silently ignored.

  • If the same label key is emitted more than once, the last occurrence wins. Files run in sorted file name order, and within a file later lines win over earlier ones.

Deploying scripts via DPUFlavor

Use the configFiles field to place executable files into the default directory during provisioning:

YAML
apiVersion: provisioning.dpu.nvidia.com/v1alpha1
kind: DPUFlavor
metadata:
  name: my-flavor
  namespace: dpf-operator-system
spec:
  configFiles:
    - operation: override
      path: /var/lib/dpf/dpuagent/node-label-scripts/network-info
      permissions: "0700"
      raw: |
        #!/bin/bash
        echo "test-label=some-data"
        echo "link-speed=200G"

This example produces the Node labels scripts.dpu.nvidia.com/test-label=some-data and scripts.dpu.nvidia.com/link-speed=200G on the DPU cluster Node.

Executables run during the dpuagent provisioning step on the DPU ARM, as root, with access to the DPU's hardware interfaces.

Best Practices

  1. Resource Planning: Always specify dpuResources and systemReservedResources to ensure proper resource allocation

  2. Immutability: Plan your configuration carefully as DPUFlavor specs cannot be modified after creation

  3. Testing: Test DPUFlavor configurations in development environments before production deployment

  4. Documentation: Document custom configurations and their purposes for team understanding

  5. IB Mode Conversion: For DPUs initially in InfiniBand (IB) mode, always include LINK_TYPE_P1=ETH in nvconfig parameters to convert to Ethernet mode. For dual port DPUs, also add LINK_TYPE_P2=ETH

  6. NVConfig: Use wildcard (device: '*') for uniform configuration across all devices. Use device-specific entries only when per-device configuration is required

  7. DPU Credentials: Set ubuntu_PASSWORD in bfcfgParameters to a strong hashed password. If omitted, the DPU is provisioned with default ubuntu:ubuntu credentials.

Last updated: