NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
Collaboration diagram for DOCA UROM Worker Tasks:

Functions

DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_allocate (struct doca_urom_worker *worker_ctx, struct doca_urom_worker_cmd_task **task)
 Allocate Worker Command task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_allocate_init (struct doca_urom_worker *worker_ctx, uint64_t plugin, struct doca_urom_worker_cmd_task **task)
 Allocate and initialize Worker Command task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_release (struct doca_urom_worker_cmd_task *task)
 Release Worker Command task. More...
 
DOCA_EXPERIMENTAL void doca_urom_worker_cmd_task_set_plugin (struct doca_urom_worker_cmd_task *task, uint64_t plugin)
 Set Worker Command task plugin. More...
 
DOCA_EXPERIMENTAL void doca_urom_worker_cmd_task_set_cb (struct doca_urom_worker_cmd_task *task, doca_urom_worker_cmd_task_completion_cb_t cb)
 Set Worker Command task callback. More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_urom_worker_cmd_task_get_payload (struct doca_urom_worker_cmd_task *task)
 Get Worker Command task payload. More...
 
DOCA_EXPERIMENTAL struct doca_buf * doca_urom_worker_cmd_task_get_response (struct doca_urom_worker_cmd_task *task)
 Get Worker Command task response. More...
 
DOCA_EXPERIMENTAL void * doca_urom_worker_cmd_task_get_user_data (struct doca_urom_worker_cmd_task *task)
 Get Worker Command user data to populate. More...
 

Detailed Description

DOCA UROM Worker Task interfaces and data structures.

There is one main type of Worker task called a Command task. A Command task defines a plugin and a payload. The Command payload is passed to the plugin running on the associated UROM Worker. Individual plugins define the payload format and behavior of each Command. Optionally, a Command task may return some plugin-defined response data upon completion.

As an example, an RDMA plugin may define a Command to perform an offloaded RDMA Send. The plugin defines the arguments required to offload the Send to the Worker. In order to perform this operation, a Command task is created and formatted to describe the Send. The user then submits the Task to initiate the operation.

Function Documentation

◆ doca_urom_worker_cmd_task_allocate()

DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_allocate ( struct doca_urom_worker *  worker_ctx,
struct doca_urom_worker_cmd_task **  task 
)

Allocate Worker Command task.

Parameters
[in]worker_ctxThe Worker used for the task.
[out]taskThe new task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - Failed to allocate task.

◆ doca_urom_worker_cmd_task_allocate_init()

DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_allocate_init ( struct doca_urom_worker *  worker_ctx,
uint64_t  plugin,
struct doca_urom_worker_cmd_task **  task 
)

Allocate and initialize Worker Command task.

Parameters
[in]worker_ctxThe Worker used for the task.
[in]pluginThe plugin to use for the task.
[out]taskThe new task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - Failed to allocate task.

◆ doca_urom_worker_cmd_task_get_payload()

DOCA_EXPERIMENTAL struct doca_buf* doca_urom_worker_cmd_task_get_payload ( struct doca_urom_worker_cmd_task *  task)

Get Worker Command task payload.

Parameters
[in]taskThe task to return a payload from.
Returns
The payload buffer to return

◆ doca_urom_worker_cmd_task_get_response()

DOCA_EXPERIMENTAL struct doca_buf* doca_urom_worker_cmd_task_get_response ( struct doca_urom_worker_cmd_task *  task)

Get Worker Command task response.

Parameters
[in]taskThe task to return a response from.
Returns
The response buffer to return

◆ doca_urom_worker_cmd_task_get_user_data()

DOCA_EXPERIMENTAL void* doca_urom_worker_cmd_task_get_user_data ( struct doca_urom_worker_cmd_task *  task)

Get Worker Command user data to populate.

Parameters
[in]taskThe task to return a user data
Returns
The user data buffer (Maximum data size is 32 Bytes)

◆ doca_urom_worker_cmd_task_release()

DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_release ( struct doca_urom_worker_cmd_task *  task)

Release Worker Command task.

Parameters
[in]taskThe task to release
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NOT_PERMITTED - Task resources still in use.

◆ doca_urom_worker_cmd_task_set_cb()

DOCA_EXPERIMENTAL void doca_urom_worker_cmd_task_set_cb ( struct doca_urom_worker_cmd_task *  task,
doca_urom_worker_cmd_task_completion_cb_t  cb 
)

Set Worker Command task callback.

Parameters
[in]taskThe task used to set the callback on.
[in]cbThe task callback to set.

◆ doca_urom_worker_cmd_task_set_plugin()

DOCA_EXPERIMENTAL void doca_urom_worker_cmd_task_set_plugin ( struct doca_urom_worker_cmd_task *  task,
uint64_t  plugin 
)

Set Worker Command task plugin.

Parameters
[in]taskThe task used to set the plugin on.
[in]pluginThe task plugin to set.