NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_sta_io.h File Reference
#include <stdint.h>
#include <doca_compat.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.h:

Go to the source code of this file.

Functions

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_create (struct doca_sta *sta, struct doca_sta_io **sta_io)
 Create a DOCA STA IO Context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_destroy (struct doca_sta_io *sta_io)
 Destroy a DOCA STA IO context. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_sta_io_as_ctx (struct doca_sta_io *sta_io)
 Convert doca_sta_io instance into a generalized context for use with doca core objects. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_disconnect_set_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 disconnect tasks configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_disconnect_alloc_init (struct doca_sta_io *sta_io, union doca_data user_data, struct doca_sta_qp_handle *qp_handle, struct doca_sta_producer_task_send **task)
 This method allocates and initializes a STA IO disconnect task. More...
 

Function Documentation

◆ doca_sta_io_as_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_sta_io_as_ctx ( struct doca_sta_io *  sta_io)

Convert doca_sta_io instance into a generalized context for use with doca core objects.

Parameters
[in]sta_io- Pointer to doca_sta_io instance.
Returns
Non NULL upon success, NULL otherwise.

◆ doca_sta_io_create()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_create ( struct doca_sta *  sta,
struct doca_sta_io **  sta_io 
)

Create a DOCA STA IO Context.

This function creates a DOCA STA IO context attached to a DOCA STA context (control context). The IO context allows the user to perform IO transactions using the offload engine.

Parameters
[in]sta- Previously created STA context
[out]sta_io- created IO context
Returns
DOCA_SUCCESS - in case of success Error code - in case of failure. see doca_error_t.

◆ doca_sta_io_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_destroy ( struct doca_sta_io *  sta_io)

Destroy a DOCA STA IO context.

This function destroys STA IO context created by doca_sta_io_create()

Parameters
[in]sta_io- Previously created STA IO context
Returns
DOCA_SUCCESS - in case of success Error code - in case of failure. see doca_error_t.

◆ doca_sta_io_task_disconnect_alloc_init()

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

This method allocates and initializes a STA IO disconnect 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
[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_disconnect_set_conf()

DOCA_EXPERIMENTAL doca_error_t doca_sta_io_task_disconnect_set_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 disconnect 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.