| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Macros | |
| #define | DOCA_CPU_ZERO(_cpusetp) UCS_CPU_ZERO(_cpusetp) |
| Set DOCA CPU set to zero. More... | |
| #define | DOCA_CPU_SET(_cpu, _cpusetp) UCS_CPU_SET(_cpu, _cpusetp) |
| Set specific bit in DOCA CPU set. More... | |
| #define | doca_cpu_is_set(_cpu, _cpusetp) ucs_cpu_is_set(_cpu, _cpusetp) |
| Check if specific bit in DOCA CPU is set. More... | |
Typedefs | |
| typedef ucs_cpu_set_t | doca_cpu_set_t |
| DOCA CPU set structure. More... | |
| typedef void(* | doca_urom_service_get_workers_by_gid_task_completion_cb_t) (struct doca_urom_service_get_workers_by_gid_task *task, union doca_data task_user_data, union doca_data ctx_user_data) |
| Service get workers task completion callback type. More... | |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_create (struct doca_urom_service **service_ctx) |
| This method creates a UROM Service context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_destroy (struct doca_urom_service *service_ctx) |
| This method destroys a UROM Service context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_set_max_comm_msg_size (struct doca_urom_service *service_ctx, size_t msg_size) |
| Set the maximum message size for the UROM communication channel. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_set_max_workers (struct doca_urom_service *service_ctx, uint32_t max_workers) |
| Set maximum number of UROM workers. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_set_dev (struct doca_urom_service *service_ctx, struct doca_dev *dev) |
| This method attaches a DOCA Device to the UROM Service context. More... | |
| DOCA_EXPERIMENTAL struct doca_ctx * | doca_urom_service_as_ctx (struct doca_urom_service *service_ctx) |
| Convert service_ctx instance into a generalized context for use with DOCA core objects. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_get_plugins_list (struct doca_urom_service *service_ctx, const struct doca_urom_service_plugin_info **plugins, size_t *plugins_count) |
| This method gets the list of supported plugins on service's DPU side. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_service_get_cpuset (struct doca_urom_service *service_ctx, doca_cpu_set_t *cpuset) |
| Get the allowed CPU set for the service. More... | |
DOCA UROM Service interfaces and data structures.
The UROM Service manages Workers running on a DOCA device.
| #define doca_cpu_is_set | ( | _cpu, | |
| _cpusetp | |||
| ) | ucs_cpu_is_set(_cpu, _cpusetp) |
Check if specific bit in DOCA CPU is set.
Definition at line 119 of file doca_urom.h.
| #define DOCA_CPU_SET | ( | _cpu, | |
| _cpusetp | |||
| ) | UCS_CPU_SET(_cpu, _cpusetp) |
Set specific bit in DOCA CPU set.
Definition at line 112 of file doca_urom.h.
| #define DOCA_CPU_ZERO | ( | _cpusetp | ) | UCS_CPU_ZERO(_cpusetp) |
Set DOCA CPU set to zero.
Definition at line 105 of file doca_urom.h.
| typedef ucs_cpu_set_t doca_cpu_set_t |
DOCA CPU set structure.
Definition at line 98 of file doca_urom.h.
| typedef void(* doca_urom_service_get_workers_by_gid_task_completion_cb_t) (struct doca_urom_service_get_workers_by_gid_task *task, union doca_data task_user_data, union doca_data ctx_user_data) |
Service get workers task completion callback type.
Definition at line 148 of file doca_urom.h.
| DOCA_EXPERIMENTAL struct doca_ctx* doca_urom_service_as_ctx | ( | struct doca_urom_service * | service_ctx | ) |
Convert service_ctx instance into a generalized context for use with DOCA core objects.
| [in] | service_ctx | Service context instance. This must remain valid until after the context is no longer required. |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_create | ( | struct doca_urom_service ** | service_ctx | ) |
This method creates a UROM Service context.
The UROM Service runs on a DOCA Device. A Service manages UROM Workers which run on the Device. A Worker runs UROM Plugins which implement application logic which runs on the Device.
A Service is created in state DOCA_CTX_STATE_IDLE. After creation, a user may configure the Service using setter methods (e.g. doca_urom_service_set_dev()). Before use, a Service must be transitioned to state DOCA_CTX_STATE_RUNNING using the doca_ctx_start() interface. A typical invocation looks like:
doca_ctx_start(doca_urom_service_as_ctx(service_ctx))
| [out] | service_ctx | The DOCA UROM Service |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_destroy | ( | struct doca_urom_service * | service_ctx | ) |
This method destroys a UROM Service context.
| [in] | service_ctx | Pointer to instance to be destroyed. |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_get_cpuset | ( | struct doca_urom_service * | service_ctx, |
| doca_cpu_set_t * | cpuset | ||
| ) |
Get the allowed CPU set for the service.
| [in] | service_ctx | Service context instance. |
| [out] | cpuset | Set of allowed CPUs. |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_get_plugins_list | ( | struct doca_urom_service * | service_ctx, |
| const struct doca_urom_service_plugin_info ** | plugins, | ||
| size_t * | plugins_count | ||
| ) |
This method gets the list of supported plugins on service's DPU side.
| [in] | service_ctx | Service context instance. |
| [out] | plugins | Set of supported plugins. |
| [out] | plugins_count | Set of plugins number. |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_set_dev | ( | struct doca_urom_service * | service_ctx, |
| struct doca_dev * | dev | ||
| ) |
This method attaches a DOCA Device to the UROM Service context.
Attaching to a DOCA Device is mandatory, network address will be extracted from services mapping that is defined in the user environment DOCA_UROM_SERVICE_FILE
| [in] | service_ctx | The UROM Service context to attach the device to. |
| [in] | dev | The device to attach. |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_set_max_comm_msg_size | ( | struct doca_urom_service * | service_ctx, |
| size_t | msg_size | ||
| ) |
Set the maximum message size for the UROM communication channel.
This method sets the maximum size for message in UROM communication channel, default message size is 4096B. The communication channel message is composed of the UROM urom_worker_notify/urom_worker_cmd structures and the plugin payload (command/notification). It's important to ensure that the combined size of plugins' commands and notifications, along with the UROM structures size, does not exceed this maximum size.
| [in] | service_ctx | The UROM Service context to set comm msg size |
| [in] | msg_size | The maximum message size. |
| DOCA_EXPERIMENTAL doca_error_t doca_urom_service_set_max_workers | ( | struct doca_urom_service * | service_ctx, |
| uint32_t | max_workers | ||
| ) |
Set maximum number of UROM workers.
This method sets the maximum number of spawned workers
| [in] | service_ctx | The UROM Service context to set number of workers. |
| [in] | max_workers | The maximum number of workers, Must be a power of 2. |