|
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_create (struct doca_urom_worker **worker_ctx) |
| | This method creates a UROM Worker context. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_destroy (struct doca_urom_worker *worker_ctx) |
| | This method destroys a UROM Worker context. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_service (struct doca_urom_worker *worker_ctx, struct doca_urom_service *service_ctx) |
| | This method attaches a UROM Service to the Worker context. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_id (struct doca_urom_worker *worker_ctx, uint64_t worker_id) |
| | This method sets the Worker context ID to be used to identify the Worker. Worker IDs enable an application to establish multiple connections to the same Worker process running on a DOCA Device. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_plugins (struct doca_urom_worker *worker_ctx, uint64_t plugins) |
| | This method adds plugins mask for the supported plugins by the UROM Worker on the DPU. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_cpuset (struct doca_urom_worker *worker_ctx, doca_cpu_set_t cpuset) |
| | Set the allowed CPUs for the Worker. The cpuset must be a subset of the service's allowed CPUs. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_gid (struct doca_urom_worker *worker_ctx, uint32_t gid) |
| | Set worker group ID, must be set before starting the worker context. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_max_inflight_tasks (struct doca_urom_worker *worker_ctx, uint32_t max_tasks) |
| | Set Worker maximum in-flight tasks. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_set_env (struct doca_urom_worker *worker_ctx, char *const env[], size_t count) |
| | Set worker env variables when spawning worker on DPU side. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_get_id (struct doca_urom_worker *worker_ctx, uint64_t *worker_id) |
| | This method gets the Worker context ID to be used to identify the Worker. Worker IDs enable an application to establish multiple connections to the same Worker process running on a DOCA Device. If when creating the worker the user sets worker id equals to DOCA_UROM_WORKER_ID_ANY the library will generate new id for the worker. More...
|
| |
| DOCA_EXPERIMENTAL doca_error_t | doca_urom_worker_get_gid (struct doca_urom_worker *worker_ctx, uint32_t *worker_gid) |
| | This method gets the Worker context group ID to be used to identify the Worker group that belongs to. More...
|
| |
| DOCA_EXPERIMENTAL struct doca_ctx * | doca_urom_worker_as_ctx (struct doca_urom_worker *worker_ctx) |
| |
DOCA UROM Worker interfaces and data structures.
The UROM Worker represents a process running on a DOCA device. The process may be used to offload application logic to the device. Application logic is defined in Worker plugins. A Worker may be configured to support one or more plugins concurrently. Users submit DOCA tasks to a Worker in order to initiate an offloaded operation.
This method sets the Worker context ID to be used to identify the Worker. Worker IDs enable an application to establish multiple connections to the same Worker process running on a DOCA Device.
Worker ID must be unique to a UROM Service. If DOCA_UROM_WORKER_ID_ANY is specified, the Service will assign a unique ID for the newly created worker.
If a specific ID is used, the Service will look for an existing Worker with matching ID. If one exists, the Service will establish a new connection to the existing Worker. If a matching Worker does not exist, a new Worker will be created with the specified Worker ID.
Parallel tasks can coordinate by using a convention for worker_id which includes task ID and worker index. task ID should come from a launcher. Worker index can be derived using a local process rank (also from a launcher) and the desired number of workers. The number of workers should be based on the number of available cores for offload, which can be queried through DOCA UROM. The process for setting up workers is then:
- Query DOCA UROM for available cores on the Service
- Query launcher for task_id and local_rank
- Derive ID: worker_id = task_id << 32 | (local_rank % cores)
- Create a new Worker context with the derived worker_id
- Parameters
-
| [in] | worker_ctx | The UROM Worker context. |
| [in] | worker_id | The UROM Worker ID. |
- Returns
- DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
- DOCA_ERROR_INVALID_VALUE - worker_ctx argument is a NULL pointer.
- DOCA_ERROR_BAD_STATE - worker_ctx is not idle.