NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_sta.h File Reference
#include <stdint.h>
#include <doca_compat.h>
#include <doca_error.h>
#include <doca_dpa.h>
Include dependency graph for doca_sta.h:

Go to the source code of this file.

Functions

DOCA_EXPERIMENTAL doca_error_t doca_sta_cap_is_supported (const struct doca_devinfo *devinfo)
 Get whether the DOCA device supports storage target acceleration ('STA') More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_create (struct doca_dev *dev, struct doca_sta **sta)
 Create a DOCA STA Context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_destroy (struct doca_sta *sta)
 Destroy a DOCA STA context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_add_dev (struct doca_sta *sta, struct doca_dev *dev)
 Support STA functionality on a given device. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_set_max_sta_io (struct doca_sta *sta, uint16_t max_io_num)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_sta_io (const struct doca_sta *sta, uint16_t *max_io_num)
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_sta_as_ctx (struct doca_sta *sta)
 Convert doca_sta instance into a generalized context for use with doca core objects. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_devs (uint32_t *max_devs)
 Get the max number of the supported devices by the STA engine. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_num_eus_available (const struct doca_sta *sta, uint32_t *max_eus)
 Retrieve the total number of EUs available to the application. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_num_connected_qp_per_eu (const struct doca_sta *sta, uint32_t *max_connected_qps)
 Retrieve the maximum number of connected QPs per EU. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_subsys (uint32_t *max_subsys)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_ns_per_subs (uint32_t *max_ns_per_subsys)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_qps (uint32_t *max_qps)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_threads (uint32_t *max_io_threads)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_size (uint32_t *max_io_size)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_num_per_dev (const struct doca_sta *sta, uint32_t *max_ios)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_queue_size (const struct doca_sta *sta, uint32_t *max_io_queue_size)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_min_ioccsz (uint32_t *ioccsz)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_ioccsz (uint32_t *ioccsz)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_min_iorcsz (uint32_t *iorcsz)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_iorcsz (uint32_t *iorcsz)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_icdoff (uint32_t *icdoff)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_be (uint32_t *max_be)
 
DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_qs_per_be (uint32_t *max_qs_per_be)
 
DOCA_EXPERIMENTAL bool doca_sta_is_logical_block_size_supported (uint32_t size)
 

Function Documentation

◆ doca_sta_add_dev()

DOCA_EXPERIMENTAL doca_error_t doca_sta_add_dev ( struct doca_sta *  sta,
struct doca_dev *  dev 
)

Support STA functionality on a given device.

Parameters
[in]sta- Previously created STA context
[in]dev- DOCA Dev instance with appropriate capability
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure: DOCA_ERROR_INVALID_VALUE - if an invalid input had been received DOCA_ERROR_NO_MEMORY - if reached to number of devices reported by doca_sta_get_max_devs() DOCA_ERROR_BAD_STATE - if sta in wrong state DOCA_ERROR_ALREADY_EXIST - if doca_dev already exists in doca_mmap DOCA_ERROR_NOT_SUPPORTED - provided dev does not support the RC transport type

◆ doca_sta_as_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_sta_as_ctx ( struct doca_sta *  sta)

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

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

◆ doca_sta_cap_is_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sta_cap_is_supported ( const struct doca_devinfo *  devinfo)

Get whether the DOCA device supports storage target acceleration ('STA')

Parameters
[in]devinfo- the device to query
Returns
DOCA_SUCCESS - in case of the DOCA device queried has STA support DOCA_ERROR_INVALID_VALUE - received invalid input DOCA_ERROR_NOT_SUPPORTED - the device queried does not support STA

◆ doca_sta_create()

DOCA_EXPERIMENTAL doca_error_t doca_sta_create ( struct doca_dev *  dev,
struct doca_sta **  sta 
)

Create a DOCA STA Context.

This function creates a DOCA STA context given a DOCA device. The context represents a program on the STA that is referenced by the host process that called the context creation API

Parameters
[in]dev- DOCA device
[out]sta- created context
Returns
DOCA_SUCCESS - in case of success DOCA_ERROR_INVALID_VALUE - received invalid input DOCA_ERROR_DRIVER - in case of error in a DOCA driver call DOCA_ERROR_NOT_SUPPORTED - the device does not support STA DOCA_ERROR_NO_MEMORY - in case of failure in internal memory allocation

◆ doca_sta_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_sta_destroy ( struct doca_sta *  sta)

Destroy a DOCA STA context.

This function destroys STA context created by doca_sta_create()

Parameters
[in]sta- Previously created STA context
Returns
DOCA_SUCCESS - in case of success DOCA_ERROR_INVALID_VALUE - received invalid input DOCA_ERROR_DRIVER - in case of error in a DOCA driver call DOCA_ERROR_IN_USE - in case the STA context is still used by another DOCA context

◆ doca_sta_get_max_be()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_be ( uint32_t *  max_be)

◆ doca_sta_get_max_devs()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_devs ( uint32_t *  max_devs)

Get the max number of the supported devices by the STA engine.

Parameters
[in]max_devs- max devices
Returns
  • DOCA_SUCCESS - in case of success
  • DOCA_ERROR_INVALID_VALUE - received invalid input

◆ doca_sta_get_max_icdoff()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_icdoff ( uint32_t *  icdoff)

◆ doca_sta_get_max_io_num_per_dev()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_num_per_dev ( const struct doca_sta *  sta,
uint32_t *  max_ios 
)

◆ doca_sta_get_max_io_queue_size()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_queue_size ( const struct doca_sta *  sta,
uint32_t *  max_io_queue_size 
)

◆ doca_sta_get_max_io_size()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_size ( uint32_t *  max_io_size)

◆ doca_sta_get_max_io_threads()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_io_threads ( uint32_t *  max_io_threads)

◆ doca_sta_get_max_ioccsz()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_ioccsz ( uint32_t *  ioccsz)

◆ doca_sta_get_max_iorcsz()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_iorcsz ( uint32_t *  iorcsz)

◆ doca_sta_get_max_ns_per_subs()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_ns_per_subs ( uint32_t *  max_ns_per_subsys)

◆ doca_sta_get_max_num_connected_qp_per_eu()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_num_connected_qp_per_eu ( const struct doca_sta *  sta,
uint32_t *  max_connected_qps 
)

Retrieve the maximum number of connected QPs per EU.

Parameters
[out]max_connected_qps- maximum number of connected QPs
Returns
  • DOCA_SUCCESS - in case of success
  • DOCA_ERROR_INVALID_VALUE - received invalid input

◆ doca_sta_get_max_num_eus_available()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_num_eus_available ( const struct doca_sta *  sta,
uint32_t *  max_eus 
)

Retrieve the total number of EUs available to the application.

Parameters
[out]max_eus- number of total available EUs
Returns
  • DOCA_SUCCESS - in case of success
  • DOCA_ERROR_INVALID_VALUE - received invalid input

◆ doca_sta_get_max_qps()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_qps ( uint32_t *  max_qps)

◆ doca_sta_get_max_qs_per_be()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_qs_per_be ( uint32_t *  max_qs_per_be)

◆ doca_sta_get_max_sta_io()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_sta_io ( const struct doca_sta *  sta,
uint16_t *  max_io_num 
)

◆ doca_sta_get_max_subsys()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_max_subsys ( uint32_t *  max_subsys)

◆ doca_sta_get_min_ioccsz()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_min_ioccsz ( uint32_t *  ioccsz)

◆ doca_sta_get_min_iorcsz()

DOCA_EXPERIMENTAL doca_error_t doca_sta_get_min_iorcsz ( uint32_t *  iorcsz)

◆ doca_sta_is_logical_block_size_supported()

DOCA_EXPERIMENTAL bool doca_sta_is_logical_block_size_supported ( uint32_t  size)

◆ doca_sta_set_max_sta_io()

DOCA_EXPERIMENTAL doca_error_t doca_sta_set_max_sta_io ( struct doca_sta *  sta,
uint16_t  max_io_num 
)