NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_sta_io_non_offload.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <doca_error.h>
#include <doca_types.h>
#include <doca_sta_handle.h>
#include <doca_sta_task.h>
Include dependency graph for doca_sta_io_non_offload.h:

Go to the source code of this file.

Macros

#define DOCA_STA_NVMEF_COMPLETION_SIZE   (16)
 

Typedefs

typedef uint8_t doca_sta_nvmef_completion_t[DOCA_STA_NVMEF_COMPLETION_SIZE]
 
typedef void(* doca_sta_io_non_offload_cb_t) (struct doca_sta_qp_handle *qp_handle, union doca_data user_data, const uint8_t *nvme_cmd, uint8_t *payload, uint32_t payload_len, bool payload_valid, union doca_data non_offload_user_data)
 Function to execute on new STA IO non-offload command notification. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_non_offload_register_cb (struct doca_sta_io *sta_io, doca_sta_io_non_offload_cb_t non_offload_cb, union doca_data user_data)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_set_rdma_write_send_conf (struct doca_sta_io *sta_io, doca_sta_task_completion_cb_t task_completion_cb, doca_sta_task_completion_cb_t task_error_cb)
 This method sets the STA IO non offload RDMA WRITE tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_set_rdma_read_conf (struct doca_sta_io *sta_io, doca_sta_task_completion_cb_t task_completion_cb, doca_sta_task_completion_cb_t task_error_cb)
 This method sets the STA IO non offload RDMA READ tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_rdma_write_send_alloc_init (struct doca_sta_io *sta_io, union doca_data user_data, struct doca_sta_qp_handle *qp_handle, doca_sta_nvmef_completion_t completion, union doca_data non_offload_user_data, struct doca_sta_producer_task_send **task)
 This method allocates and initializes a STA IO RDMA WRITE with RDMA SEND task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_rdma_send_alloc_init (struct doca_sta_io *sta_io, union doca_data user_data, struct doca_sta_qp_handle *qp_handle, doca_sta_nvmef_completion_t completion, union doca_data non_offload_user_data, struct doca_sta_producer_task_send **task)
 This method allocates and initializes a STA IO RDMA SEND task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_rdma_read_alloc_init (struct doca_sta_io *sta_io, union doca_data user_data, struct doca_sta_qp_handle *qp_handle, union doca_data non_offload_user_data, struct doca_sta_producer_task_send **task)
 This method allocates and initializes a STA IO RDMA READ task. More...
 

Macro Definition Documentation

◆ DOCA_STA_NVMEF_COMPLETION_SIZE

#define DOCA_STA_NVMEF_COMPLETION_SIZE   (16)

Definition at line 30 of file doca_sta_io_non_offload.h.

Typedef Documentation

◆ doca_sta_io_non_offload_cb_t

typedef void(* doca_sta_io_non_offload_cb_t) (struct doca_sta_qp_handle *qp_handle, union doca_data user_data, const uint8_t *nvme_cmd, uint8_t *payload, uint32_t payload_len, bool payload_valid, union doca_data non_offload_user_data)

Function to execute on new STA IO non-offload command notification.

This function is called by doca_pe_progress() when related task received a new non-offload command from DPA.

Parameters
[in]qp_handleSTA QP.
[in]nvme_cmdNVME command.
[in]payloadThe payload data (if any) belonged to the nvme command.
[in]payload_lenThe payload length of the payload. The maximum length of the payload buffer can be obtained by calling to doca_sta_get_max_io_size API.
[in]payload_validThe hint to denote if the nvme command has been retrieved from initiator and stored in the payload buffer.
[in]non_offload_user_dataThe user data attached to the nvme command.

Definition at line 55 of file doca_sta_io_non_offload.h.

◆ doca_sta_nvmef_completion_t

typedef uint8_t doca_sta_nvmef_completion_t[DOCA_STA_NVMEF_COMPLETION_SIZE]

Definition at line 32 of file doca_sta_io_non_offload.h.

Function Documentation

◆ doca_sta_io_non_offload_register_cb()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_non_offload_register_cb ( struct doca_sta_io *  sta_io,
doca_sta_io_non_offload_cb_t  non_offload_cb,
union doca_data  user_data 
)

◆ doca_sta_io_task_non_offload_rdma_read_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_rdma_read_alloc_init ( struct doca_sta_io *  sta_io,
union doca_data  user_data,
struct doca_sta_qp_handle *  qp_handle,
union doca_data  non_offload_user_data,
struct doca_sta_producer_task_send **  task 
)

This method allocates and initializes a STA IO RDMA READ task.

Parameters
[in]sta_ioThe STA IO context to config.
[in]user_datadoca_data to attach to the task.
[in]qp_handleThe handle of the QP that should be disconnected.
[in]non_offload_user_datadoca_data attached to the original nvme command.
[out]taskmemcpy task to allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - No more tasks to allocate

◆ doca_sta_io_task_non_offload_rdma_send_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_rdma_send_alloc_init ( struct doca_sta_io *  sta_io,
union doca_data  user_data,
struct doca_sta_qp_handle *  qp_handle,
doca_sta_nvmef_completion_t  completion,
union doca_data  non_offload_user_data,
struct doca_sta_producer_task_send **  task 
)

This method allocates and initializes a STA IO RDMA SEND task.

Parameters
[in]sta_ioThe STA IO context to config.
[in]user_datadoca_data to attach to the task.
[in]qp_handleThe handle of the QP that should be disconnected.
[in]non_offload_user_datadoca_data attached to the original nvme command.
[out]taskmemcpy task to allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - No more tasks to allocate

◆ doca_sta_io_task_non_offload_rdma_write_send_alloc_init()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_rdma_write_send_alloc_init ( struct doca_sta_io *  sta_io,
union doca_data  user_data,
struct doca_sta_qp_handle *  qp_handle,
doca_sta_nvmef_completion_t  completion,
union doca_data  non_offload_user_data,
struct doca_sta_producer_task_send **  task 
)

This method allocates and initializes a STA IO RDMA WRITE with RDMA SEND task.

Parameters
[in]sta_ioThe STA IO context to config.
[in]user_datadoca_data to attach to the task.
[in]qp_handleThe handle of the QP that should be disconnected.
[in]non_offload_user_datadoca_data attached to the original nvme command.
[out]taskmemcpy task to allocate
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - No more tasks to allocate

◆ doca_sta_io_task_non_offload_set_rdma_read_conf()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_set_rdma_read_conf ( struct doca_sta_io *  sta_io,
doca_sta_task_completion_cb_t  task_completion_cb,
doca_sta_task_completion_cb_t  task_error_cb 
)

This method sets the STA IO non offload RDMA READ tasks configuration.

Parameters
[in]sta_ioThe STA IO context to config
[in]task_completion_cbTask completion callback
[in]task_error_cbTask error callback
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.

◆ doca_sta_io_task_non_offload_set_rdma_write_send_conf()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_non_offload_set_rdma_write_send_conf ( struct doca_sta_io *  sta_io,
doca_sta_task_completion_cb_t  task_completion_cb,
doca_sta_task_completion_cb_t  task_error_cb 
)

This method sets the STA IO non offload RDMA WRITE tasks configuration.

Parameters
[in]sta_ioThe STA IO context to config
[in]task_completion_cbTask completion callback
[in]task_error_cbTask error callback
Returns
DOCA_SUCCESS - in case of success. Error code - in case of failure. see doca_error_t.