NVIDIA DOCA DPA Execution Unit Management Tool

DOCA SDK 2.6.0

This document describes the DPA Execution Unit (EU) management tool, dpaeumgmt .

Note

Execution unit partitions will be supported in future releases.

This table introduces important terms for understanding this document:

Term

Definition

DPA

Data-path accelerator; an auxiliary processor designed to accelerate data-path operations.

DPA partition manager

PCIe device function capable of controlling the entire system's EUs. On NVIDIA® BlueField®-3 it is the ECPF. The DPA partition manager is by default associated with the default partition.

EU

Hardware execution unit; a logical DPA processing unit.

EU group

Collection/subset of EUs which could be created using dpaeumgmt. EU groups are created under an EU partition and could only be formed from the pool of EUs under that partition.

EU object

EU partition or EU group.

EU partition

An isolated pool of EUs which may be created using dpaeumgmt.

Only when a partition is created and associated with other vHCAs are they able to use hardware resources and execute a DPA software thread.

EU affinity

The method by which a DPA thread is paired with a DPA EU. DPA supports three types of affinity:

  • none – selects an EU from a pool of all available EUs

  • strict – select only the specified EU (by ID)

  • group – select an EU from all the EUs in the specified group

The DPA EU management tool can run either on the host machine or on the target DPU and allows users to manage the DPA's EUs which are the basic resource of the DPA. The tool enables the resource control of EUs to optimize computation resources usage of the DPA before using DOCA FlexIO SDK API.

Without EU allocation, a DPA software thread would lack access to the hardware pipeline/CPU time resource, and consequently not be able to execute.

dpaeumgmt serves the following main usages:

  • Running a DPA software thread with strict affinity on a DPA EU (i.e., running a DPA thread using only the specific preselected EU). For this purpose, dpaeumgmt provides an option to query the maximum EU ID allowed to use.

  • Allowing a DPA software thread to run over a DPA EU from a group of EUs:

    • Once an EU group is created, it is allocated a subset of EUs.

    • dpaeumgmt provides an ID to the created group which can be used to run DPA applications with group affinity where the affinity ID would be the same as that group's ID.

  • EU partition management - the ability to manage EU partitions.

When the software stack wishes to run a DPA thread with group affinity type, one of the available EUs from the group's collection is used for the execution.

Note

A DPA thread may execute if and only if there is an available EU for it.

Upon boot, a default EU partition is automatically created. The default EU partition possesses all the system's EUs. The DPA partition manager function is the only function that belongs to it and can therefore control the entire resources of the system.

When running a DPA thread with none affinity, the EU chosen for the DPA thread to run with comes from the partition's pool of EUs. Namely, from the EUs belonging only to the DPA device's current partition which were not assigned to any EU groups (on the current partition). If the aforementioned group of EUs (i.e., the partition's default EU group) is empty, the DPA thread would fail to run with none affinity.

dpaeumgmt enables users to create, destroy, and query EU objects.

Note

dpaeumgmt tool must run with root privileges and users must execute sudo mst start before using it.

Top-level dpaeumgmt command syntax:

Copy
Copied!
            

Usage: dpaeumgmt {help|version|eu_group|partition}   Type "./dpaeumgmt help" for detailed help

General Commands

  • Print basic usage information for the tool:

    Copy
    Copied!
                

    dpaeumgmt -h

  • Print a detailed help menu of the tool's commands:

    Copy
    Copied!
                

    dpaeumgmt help

  • Print version information:

    Copy
    Copied!
                

    dpaeumgmt version

Execution Unit Group Commands

The commands listed in the following subsections are used to configure EU groups.

EU Group Command Flags and Arguments

The following table lists the flags relevant to eu_group commands. Arguments for the flags must be used within quotes (if more than one) and without extra spaces.

Short Option

Long Option

Description

-h

--help

Print out basic tool usage information.

-d

--dpa_device

The device interface name (MST/PCI/RDMA/NET).

-r

--range_eus

The range of EUs to allocate an EU group or a partition. The argument must be provided within quotes.

-g

--id_group

Group ID number.

This number must be positive and less than or equal to the max_num_dpa_eu_group parameter which may be retrieved using the command eu_group info -d <device>.

-n

--name_group

Group name; 15-character string. The argument must be provided within quotes.

-f

--file_groups

Full path or only the filename if it is located in the same directory as the executable directory (where dpaeumgmt is).


Info EU Group

Print information on the relevant DPA resources for the EU groups:

Copy
Copied!
            

dpaeumgmt eu_group info --dpa_device <device>

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt eu_group info -d mlx5_0 Max number of DPA EU groups: 15 Max number of DPA EUs in one DPA EU group: 190 Max DPA EU number available to use: 190 Max EU group name length is 15 chars


Create EU Group

Create an EU group with the specified name on the provided device's partition. The EUs indicated by the range are taken from the DPA device's EU partition.

Copy
Copied!
            

dpaeumgmt eu_group create --dpa_device <device> --name_group <name> --range_eus <range>

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt eu_group create -d mlx5_0 -n "HG hello world1" -r "6-8,16,55,70" Group created successfully- EU group ID: 1 EU group name: HG hello world Member EUs are: 6,7,8,16,55,70

Note

After successfully creating an EU group, users can run a DPA thread using group affinity with the affinity type set to the group's ID.


Destroy EU Group

Destroy an EU group that exists on the device's partition with either the provided group name or ID.

Copy
Copied!
            

dpaeumgmt eu_group destroy --dpa_device <device> [--name_group <name> | --id_group <id>]

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt eu_group destroy -d mlx5_0 -g 1 Group with group id: 1, was destroyed successfully


Query EU Group

Query EU groups residing on the provided device's partition. If one of the optional parameters is used, the command only queries the specific group and prints it if it exists:

Copy
Copied!
            

dpaeumgmt eu_group query --dpa_device <device> [--name_group <name> | --id_group <id>]

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt eu_group query -d mlx5_0 1) EU group ID: 1 EU group name: HG hello world Member EUs are: 6,7,8,16,55,70   In total there are 1 EU groups configured.

More options:

Copy
Copied!
            

$ sudo ./dpaeumgmt eu_group query -d mlx5_0 -n "HG hello world" $ sudo ./dpaeumgmt eu_group query -d mlx5_0 -g 1


Apply EU Group

Apply the EU groups provided in the file on the device's partition:

Copy
Copied!
            

dpaeumgmt eu_group apply --dpa_device <device> --file_groups <file>

File format example:

Copy
Copied!
            

{ "eu_groups": [ { "name": "hg1", "range": "178-180"}, { "name": "hg2", "range": "2-10"} ] }

Note

The command removes all the previous EU groups defined on the EU partition that the DPA device belongs to and applies the ones from the file.

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt eu_group apply -d mlx5_0 --file_groups example.json 1) EU group ID: 1 EU group name: hg1 Member EUs are: 178,179,180   1) EU group ID: 2 EU group name: hg2 Member EUs are: 2,3,4,5,6,7,8,9,10   In total there are 2 EU groups configured.

EU Partition Commands

The commands listed in the following subsections are used to configure EU partitions.

EU Partition Command Flags and Arguments

The following table lists the flags relevant to EU partition commands. Arguments for the flags must be used within quotes (if more than one) and without extra spaces.

Short Option

Long Option

Description

-h

--help

Print out basic tool usage information.

-d

--dpa_device

The device interface name (MST/PCI/RDMA/NET).

-r

--range_eus

The range of EUs to allocate an EU group or a partition. The argument must be provided within quotes.

-p

--id_partition

Partition ID number.

This number must be positive and less than or equal to the value of max_num_dpa_eu_partition which may be retrieved using the command partition info -d <device>.

-v

--vhca_list

The vHCA IDs to be associated with the partition. The argument must be provided within quotes.

-m

--max_num_eu_group

The number of EU groups to reserve for the partition upon its creation.


Info EU Partition

Print the relevant DPA resources of the EU partitions:

Copy
Copied!
            

dpaeumgmt partition info --dpa_device <device>

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt partition info -d mlx5_0 Max number of DPA EU partitions: 15 Max number of VHCAs associated with a single partition: 32 Max number of DPA EU groups: 15 Note- an allocation of a partition consumes from the number of DPA EU *groups* available to create Max DPA EU number available to use: 190


Create EU Partition

Create an EU partition on the DPA device:

Copy
Copied!
            

dpaeumgmt partition create --dpa_device <device> --vhca_list <id_list> --range_eus <range> --max_num_eu_group <max_num>

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt partition create -d mlx5_0 -v 1 -r 10-20 -m 2 Partition created successfully- EU Partition ID: 1 Maximal number of groups: 2 The partition has a total of 1 associated VHCA IDs, namely: 1 Partition's member EUs are: 10,11,12,13,14,15,16,17,18,19,20


Destroy EU Partition

Destroy an EU partition that exists on the device's partition:

Copy
Copied!
            

dpaeumgmt partition destroy --dpa_device <device> --id_partition <id>

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt partition destroy -d mlx5_0 -p 1 Partition with partition id: 1, was destroyed successfully


Query EU Partition

Query EU partitions that reside on the provided device's partition and print out the partition if it exists:

Copy
Copied!
            

dpaeumgmt partition query --dpa_device <device> [--id_partition <id>]

Example:

Copy
Copied!
            

$ sudo ./dpaeumgmt partition query -d mlx5_0 -p 1 EU Partition ID: 1 Maximal number of groups: 2 The partition has a total of 1 associated VHCA IDs, namely: 1 Partition's member EUs are: 10,11,12,13,14,15,16,17,18,19,20

More options:

Copy
Copied!
            

$ sudo ./dpaeumgmt partition query -d mlx5_0

The following diagram illustrates the ownership and control of a partition by a vHCA and also which vHCAs have claim to (i.e., can use) a partition.

partition-control-diagram-version-1-modificationdate-1704380748793-api-v2.png

  • Currently, dpaeumgmt is only supported on the DPU not the host

  • dpaeumgmt should run before creating a DPA process so all resources are configured ahead of time

    • Running the tool over a device with an existing DPA process results in failure

  • The EU group name assigned by the user must be unique for every EU group on a specific partition or the EU group create command fails

  • The creation of an EU partition consumes from the number of EU groups allowed on the vHCA's partition it is created on:

    • 1 group for the partition itself due to a default group created for each partition

    • <max_num> of groups which is the user's input provided upon partition creation

  • Creating groups or running DPA threads in general (with any affinity) on interfaces other than ECPF, requires a configuration of a valid partition for the specific vHCA

  • Only the default partition is exposed to the real EU numbers, all other partitions the user creates use virtual EUs

    • For example, if a user creates a partition with the range of EUs 20-40, querying the partition info from one of its virtual HCAs (vHCAs) would display EUs from 0-20. Therefore, the EU whose real number is 39 in this example would correspond to the virtual EU number 19.

  • Group IDs on a non-default partition are virtual.

    • Different partitions can have completely distinct groups, even if they have the same ID.

    • The affinity ID parameter, specified on the FlexIO API, can distinguish between the groups according to the vHCA an application is running on.

  • vHCA ID overlap is not allowed on EU partitions

  • It is not possible to query vHCA IDs with dpaeumgmt, these are assumed to be known by the user beforehand

  • Partition destruction fails if there are EU objects that exist on that partition

  • It is not possible to know which EU has been chosen to run on

  • Every vHCA sees the partition it belongs to, and its resources, as the entire world. It only sees:

    • Groups and partitions it created

    • The number of EUs it was given

    • The max_num_eu_group of the partition it belongs to

  • No guarantee regarding EU group ID that will be given on group creation

  • The default groups (of every partition) cannot be managed by the user

  • The EU numbers available are between 0 and the max DPA EU number available to use minus 1 (the upper limit can be queried using the info command specified above)

  • dpaeumgmt does not support virtual functions (VFs)

  • It is not possible to create partitions on other vHCAs other than the DPA partition manager function

  • There are at most 16 hardware EU group entities

© Copyright 2024, NVIDIA. Last updated on May 7, 2024.