| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |

Macros | |
| #define | DOCA_DPA_COMPLETION_LOG_MAX_USER_DATA (24) |
| DPA completion Log max user data type definition. More... | |
Typedefs | |
| typedef enum doca_dpa_dev_log_level | doca_dpa_dev_log_level_t |
| DOCA DPA device log levels, sorted by verbosity from high to low. More... | |
| typedef uint64_t | doca_dpa_dev_t |
| DPA context handle type definition. More... | |
| typedef uint64_t | doca_dpa_dev_uintptr_t |
| DPA pointer type definition. More... | |
| typedef uint64_t | doca_dpa_dev_hash_table_t |
| DPA hash table handle type definition. More... | |
| typedef uint64_t | doca_dpa_dev_completion_t |
| DPA completion handle type definition. More... | |
| typedef uint64_t | doca_dpa_dev_async_ops_t |
| DPA asynchronous ops handle type definition. More... | |
| typedef uint64_t | doca_dpa_dev_notification_completion_t |
| DPA notification completion handle type definition. More... | |
| typedef void() | doca_dpa_func_t(void) |
| Generic function pointer type. More... | |
Enumerations | |
| enum | doca_dpa_dev_log_level { DOCA_DPA_DEV_LOG_LEVEL_DISABLE = 10 , DOCA_DPA_DEV_LOG_LEVEL_ERROR = 30 , DOCA_DPA_DEV_LOG_LEVEL_WARNING = 40 , DOCA_DPA_DEV_LOG_LEVEL_INFO = 50 , DOCA_DPA_DEV_LOG_LEVEL_DEBUG = 60 , DOCA_DPA_DEV_LOG_LEVEL_DISABLE = 10 , DOCA_DPA_DEV_LOG_LEVEL_ERROR = 30 , DOCA_DPA_DEV_LOG_LEVEL_WARNING = 40 , DOCA_DPA_DEV_LOG_LEVEL_INFO = 50 , DOCA_DPA_DEV_LOG_LEVEL_DEBUG = 60 } |
| DOCA DPA device log levels, sorted by verbosity from high to low. More... | |
Functions | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_cap_is_supported (const struct doca_devinfo *devinfo) |
| Get whether the DOCA device supports DPA. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_create (struct doca_dev *dev, struct doca_dpa **dpa) |
| Create a DOCA DPA Context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_destroy (struct doca_dpa *dpa) |
| Destroy a DOCA DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_start (struct doca_dpa *dpa) |
| Start a DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_stop (struct doca_dpa *dpa) |
| Stop a DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_set_app (struct doca_dpa *dpa, struct doca_dpa_app *app) |
| Set program app for DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_app (struct doca_dpa *dpa, struct doca_dpa_app **app) |
| Get program app that was set for DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_app_get_name (struct doca_dpa_app *app, char *app_name, uint32_t *app_name_len) |
| Get DPA application name. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_set_log_level (struct doca_dpa *dpa, doca_dpa_dev_log_level_t log_level) |
| Set device logs verbosity level. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_log_level (struct doca_dpa *dpa, doca_dpa_dev_log_level_t *log_level) |
| Get device logs verbosity level that was set for DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_log_file_set_path (struct doca_dpa *dpa, const char *file_path) |
| Set log file path to write device logs into. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_log_file_get_path (struct doca_dpa *dpa, char *file_path, uint32_t *file_path_len) |
| Get log file path to write device logs into. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_trace_file_set_path (struct doca_dpa *dpa, const char *file_path) |
| Set trace file path to write device traces into. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_trace_file_get_path (struct doca_dpa *dpa, char *file_path, uint32_t *file_path_len) |
| Get trace file path to write device traces into. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_max_threads_per_kernel (const struct doca_dpa *dpa, unsigned int *value) |
| Get maximum number of DPA threads to run a single kernel launch operation. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_kernel_max_run_time (const struct doca_dpa *dpa, unsigned long long *value) |
| Get maximum allowable time in seconds that a kernel may remain scheduled on the DPA. A kernel that remains scheduled beyond this limit may be terminated by the runtime and cause fatal behavior. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_device_extend (struct doca_dpa *dpa, struct doca_dev *other_dev, struct doca_dpa **extended_dpa) |
| Create an extended DPA context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_dpa_handle (struct doca_dpa *dpa, doca_dpa_dev_t *handle) |
| Get DPA context handle. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_uar_id (const struct doca_dpa *dpa, uint32_t *uar_id) |
| Get DPA UAR ID. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_kernel_launch_update_set (struct doca_dpa *dpa, struct doca_sync_event *wait_event, uint64_t wait_threshold, struct doca_sync_event *comp_event, uint64_t comp_count, unsigned int num_threads, doca_dpa_func_t *func,...) |
| Submit a kernel to DPA that sets completion event. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_kernel_launch_update_add (struct doca_dpa *dpa, struct doca_sync_event *wait_event, uint64_t wait_threshold, struct doca_sync_event *comp_event, uint64_t comp_count, unsigned int num_threads, doca_dpa_func_t *func,...) |
| Submit a kernel to DPA. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_rpc (struct doca_dpa *dpa, doca_dpa_func_t *func, uint64_t *retval,...) |
| RPC to run DPA kernel. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_peek_at_last_error (const struct doca_dpa *dpa) |
| Return the last error generated on the DPA. Check if an error occurred on the device side runtime. This call does not reset the error state. If an error occurred, the DPA context enters a fatal state and must be destroyed by the user. In the case of a fatal error core dump and crash data will be written to the file path /tmp/doca_dpa_fatal or to the file path set by the API doca_dpa_log_file_set_path(), with the suffixes .PID.core and .PID.crash respectively, where PID is the process id. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_mem_alloc (struct doca_dpa *dpa, size_t size, doca_dpa_dev_uintptr_t *dev_ptr) |
| Allocate DPA heap memory. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_mem_free (struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dev_ptr) |
| Free the previously allocated DPA memory. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_h2d_memcpy (struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dst_ptr, void *src_ptr, size_t size) |
| Copy from host memory to DPA Heap. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_h2d_buf_memcpy (struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dst_ptr, struct doca_buf *buf, size_t size) |
| Copy from DOCA Buf to DPA Heap. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_d2h_memcpy (struct doca_dpa *dpa, void *dst_ptr, doca_dpa_dev_uintptr_t src_ptr, size_t size) |
| Copy from DPA Heap to host memory. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_d2h_buf_memcpy (struct doca_dpa *dpa, struct doca_buf *buf, doca_dpa_dev_uintptr_t src_ptr, size_t size) |
| Copy from DPA Heap to DOCA Buf. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_memset (struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dev_ptr, int value, size_t size) |
| Set DPA Heap memory to a value. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_hash_table_create (struct doca_dpa *dpa, unsigned int num_entries, struct doca_dpa_hash_table **ht) |
| Create a hash table on DPA. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_hash_table_destroy (struct doca_dpa_hash_table *ht) |
| Destroy DPA hash table. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_hash_table_get_dpa_handle (struct doca_dpa_hash_table *ht, doca_dpa_dev_hash_table_t *ht_handle) |
| Get DPA hash table handle. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_core_num (struct doca_dpa *dpa, unsigned int *num_cores) |
| Retrieve the number of available DPA cores. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_num_eus_per_core (struct doca_dpa *dpa, unsigned int *eus_per_core) |
| Retrieve the number of EUs available per DPA core. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_get_total_num_eus_available (struct doca_dpa *dpa, unsigned int *total_num_eus) |
| Retrieve the total number of EUs available to the application. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_eu_affinity_create (struct doca_dpa *dpa, struct doca_dpa_eu_affinity **affinity) |
| Create DPA EU affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_eu_affinity_destroy (struct doca_dpa_eu_affinity *affinity) |
| Destroy DPA EU affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_eu_affinity_set (struct doca_dpa_eu_affinity *affinity, unsigned int eu_id) |
| Set EU ID in DPA EU affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_eu_affinity_clear (struct doca_dpa_eu_affinity *affinity) |
| Clear DPA EU affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_eu_affinity_get (struct doca_dpa_eu_affinity *affinity, unsigned int *eu_id) |
| Get EU ID from DPA EU affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_create (struct doca_dpa *dpa, struct doca_dpa_thread **dpa_thread) |
| Create DPA thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_destroy (struct doca_dpa_thread *dpa_thread) |
| Destroy DPA thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_set_func_arg (struct doca_dpa_thread *dpa_thread, doca_dpa_func_t *func, uint64_t arg) |
| Set DPA thread entry point and its argument. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_get_func_arg (struct doca_dpa_thread *dpa_thread, doca_dpa_func_t **func, uint64_t *arg) |
| Get DPA thread entry point and its argument. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_set_local_storage (struct doca_dpa_thread *dpa_thread, doca_dpa_dev_uintptr_t dev_ptr) |
| Set DPA thread local storage. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_get_local_storage (struct doca_dpa_thread *dpa_thread, doca_dpa_dev_uintptr_t *dev_ptr) |
| Get DPA thread local storage. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_set_affinity (struct doca_dpa_thread *dpa_thread, const struct doca_dpa_eu_affinity *affinity) |
| Set DPA thread affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_get_affinity (struct doca_dpa_thread *dpa_thread, const struct doca_dpa_eu_affinity **affinity) |
| Get DPA thread affinity. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_start (struct doca_dpa_thread *dpa_thread) |
| Start DPA thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_stop (struct doca_dpa_thread *dpa_thread) |
| Stop DPA thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_run (struct doca_dpa_thread *dpa_thread) |
| Run DPA thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_get_id (struct doca_dpa_thread *dpa_thread, uint32_t *dpa_thread_id) |
| Get DPA thread ID. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_group_create (struct doca_dpa *dpa, unsigned int num_threads, struct doca_dpa_tg **tg) |
| Create DPA thread group. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_group_destroy (struct doca_dpa_tg *tg) |
| Destroy DPA thread group. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_group_get_num_threads (struct doca_dpa_tg *tg, unsigned int *num_threads) |
| Get DPA thread group number of threads. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_group_set_thread (struct doca_dpa_tg *tg, struct doca_dpa_thread *thread, unsigned int rank) |
| Set DPA thread at 'rank' in DPA thread group. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_group_start (struct doca_dpa_tg *tg) |
| Start DPA thread group. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_thread_group_stop (struct doca_dpa_tg *tg) |
| Stop DPA thread group. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_create (struct doca_dpa *dpa, unsigned int queue_size, struct doca_dpa_completion **dpa_comp) |
| Create DPA completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_destroy (struct doca_dpa_completion *dpa_comp) |
| Destroy DPA completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_get_queue_size (struct doca_dpa_completion *dpa_comp, unsigned int *queue_size) |
| Get DPA completion context queue size. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_set_thread (struct doca_dpa_completion *dpa_comp, struct doca_dpa_thread *dpa_thread) |
| Set DPA completion context thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_get_thread (struct doca_dpa_completion *dpa_comp, struct doca_dpa_thread **dpa_thread) |
| Get DPA completion context attached thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_start (struct doca_dpa_completion *dpa_comp) |
| Start DPA completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_stop (struct doca_dpa_completion *dpa_comp) |
| Stop DPA completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_completion_get_dpa_handle (struct doca_dpa_completion *dpa_comp, doca_dpa_dev_completion_t *handle) |
| Get DPA completion context handle. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_create (struct doca_dpa *dpa, unsigned int queue_size, uint64_t user_data, struct doca_dpa_async_ops **async_ops) |
| Create DPA asynchronous ops context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_destroy (struct doca_dpa_async_ops *async_ops) |
| Destroy DPA asynchronous ops context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_get_queue_size (struct doca_dpa_async_ops *async_ops, unsigned int *queue_size) |
| Get DPA asynchronous ops queue size. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_get_user_data (struct doca_dpa_async_ops *async_ops, uint64_t *user_data) |
| Get DPA asynchronous ops context user data. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_attach (struct doca_dpa_async_ops *async_ops, struct doca_dpa_completion *dpa_comp) |
| Attach DPA asynchronous ops context to DPA completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_start (struct doca_dpa_async_ops *async_ops) |
| Start DPA asynchronous ops context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_stop (struct doca_dpa_async_ops *async_ops) |
| Stop DPA asynchronous ops context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_async_ops_get_dpa_handle (struct doca_dpa_async_ops *async_ops, doca_dpa_dev_async_ops_t *handle) |
| Get DPA asynchronous ops context handle. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_notification_completion_create (struct doca_dpa *dpa, struct doca_dpa_thread *dpa_thread, struct doca_dpa_notification_completion **notify_comp) |
| Create DPA notification completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_notification_completion_destroy (struct doca_dpa_notification_completion *notify_comp) |
| Destroy DPA notification completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_notification_completion_get_thread (struct doca_dpa_notification_completion *notify_comp, struct doca_dpa_thread **dpa_thread) |
| Get DPA notification completion context attached thread. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_notification_completion_start (struct doca_dpa_notification_completion *notify_comp) |
| Start DPA notification completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_notification_completion_stop (struct doca_dpa_notification_completion *notify_comp) |
| Stop DPA notification completion context. More... | |
| DOCA_EXPERIMENTAL doca_error_t | doca_dpa_notification_completion_get_dpa_handle (struct doca_dpa_notification_completion *notify_comp, doca_dpa_dev_notification_completion_t *handle) |
| Get DPA notification completion context handle. More... | |
DOCA DPA Host library. For more details please refer to the user guide on DOCA devzone.
| #define DOCA_DPA_COMPLETION_LOG_MAX_USER_DATA (24) |
DPA completion Log max user data type definition.
Valid values are greater equal to 0 and less than (1 << DOCA_DPA_COMPLETION_LOG_MAX_USER_DATA)
Definition at line 57 of file doca_dpa.h.
| typedef uint64_t doca_dpa_dev_async_ops_t |
DPA asynchronous ops handle type definition.
Definition at line 93 of file doca_dpa.h.
| typedef uint64_t doca_dpa_dev_completion_t |
DPA completion handle type definition.
Definition at line 88 of file doca_dpa.h.
| typedef uint64_t doca_dpa_dev_hash_table_t |
DPA hash table handle type definition.
Definition at line 83 of file doca_dpa.h.
| typedef enum doca_dpa_dev_log_level doca_dpa_dev_log_level_t |
DOCA DPA device log levels, sorted by verbosity from high to low.
| typedef uint64_t doca_dpa_dev_notification_completion_t |
DPA notification completion handle type definition.
Definition at line 98 of file doca_dpa.h.
| typedef uint64_t doca_dpa_dev_t |
DPA context handle type definition.
Definition at line 73 of file doca_dpa.h.
| typedef uint64_t doca_dpa_dev_uintptr_t |
DPA pointer type definition.
Definition at line 78 of file doca_dpa.h.
| typedef void() doca_dpa_func_t(void) |
Generic function pointer type.
Kernel launches are made using a host function pointer that represents the device function. The host function stub is provided by the associated DPA compiler. The C language does not define conversion of a function pointer to an object pointer (such as void*). Programmers can use this generic function pointer type to typecast to and adhere to strict ISO C language requirements
Definition at line 118 of file doca_dpa.h.
DOCA DPA device log levels, sorted by verbosity from high to low.
Definition at line 62 of file doca_dpa.h.
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_app_get_name | ( | struct doca_dpa_app * | app, |
| char * | app_name, | ||
| uint32_t * | app_name_len | ||
| ) |
Get DPA application name.
The name of a DPA application is assigned using DPACC during the build phase. Once an application has been formed, its name is embedded within it. This function allows DOCA DPA’s host application to retrieve the name that was previously assigned.
The app_name buffer is allocated by the caller along with setting app_name_len indicating the length that was allocated. Upon return the app_name_len field is set to the actual length of the app_name
| [in] | app | - DPA application generated by DPACC |
| [out] | app_name | - application name |
| [out] | app_name_len | - app_name length. Output is actual number of bytes written |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_attach | ( | struct doca_dpa_async_ops * | async_ops, |
| struct doca_dpa_completion * | dpa_comp | ||
| ) |
Attach DPA asynchronous ops context to DPA completion context.
This function attaches DPA asynchronous ops context to DPA completion context. Once a context is attached and both contexts are started, asynchronous operations completion will be raised on the DPA completion (in case the user asks for a completion when issuing the operation). This function must be called before DPA asynchronous ops is started
| [in] | async_ops | - DPA asynchronous ops |
| [in] | dpa_comp | - DPA completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_create | ( | struct doca_dpa * | dpa, |
| unsigned int | queue_size, | ||
| uint64_t | user_data, | ||
| struct doca_dpa_async_ops ** | async_ops | ||
| ) |
Create DPA asynchronous ops context.
This function creates a DPA asynchronous ops context. This allows the DPA thread to issue asynchronous operations, like DMA or other operations. User can provide DPA asynchronous ops context user_data, and retrieve this metadata in device using doca_dpa_dev_get_completion_user_data() API
| [in] | dpa | - DPA context |
| [in] | queue_size | - DPA asynchronous ops queue size |
| [in] | user_data | - DPA asynchronous ops user data |
| [out] | async_ops | - created DPA asynchronous ops |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_destroy | ( | struct doca_dpa_async_ops * | async_ops | ) |
Destroy DPA asynchronous ops context.
This function destroys DPA asynchronous ops context created by doca_dpa_async_ops_create()
| [in] | async_ops | - Previously created DPA asynchronous ops |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_get_dpa_handle | ( | struct doca_dpa_async_ops * | async_ops, |
| doca_dpa_dev_async_ops_t * | handle | ||
| ) |
Get DPA asynchronous ops context handle.
| [in] | async_ops | - DPA asynchronous ops |
| [out] | handle | - DPA asynchronous ops handle |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_get_queue_size | ( | struct doca_dpa_async_ops * | async_ops, |
| unsigned int * | queue_size | ||
| ) |
Get DPA asynchronous ops queue size.
| [in] | async_ops | - DPA asynchronous ops |
| [out] | queue_size | - DPA asynchronous ops queue size |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_get_user_data | ( | struct doca_dpa_async_ops * | async_ops, |
| uint64_t * | user_data | ||
| ) |
Get DPA asynchronous ops context user data.
| [in] | async_ops | - DPA asynchronous ops |
| [out] | user_data | - DPA asynchronous ops user data |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_start | ( | struct doca_dpa_async_ops * | async_ops | ) |
Start DPA asynchronous ops context.
| [in] | async_ops | - DPA asynchronous ops |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_stop | ( | struct doca_dpa_async_ops * | async_ops | ) |
Stop DPA asynchronous ops context.
| [in] | async_ops | - DPA asynchronous ops |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_cap_is_supported | ( | const struct doca_devinfo * | devinfo | ) |
Get whether the DOCA device supports DPA.
| [in] | devinfo | - the device to query |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_create | ( | struct doca_dpa * | dpa, |
| unsigned int | queue_size, | ||
| struct doca_dpa_completion ** | dpa_comp | ||
| ) |
Create DPA completion context.
This function creates a DPA completion context. The user is responsible for creating and managing the context. The completion context can raise activation if it is attached to a DPA thread. The user can also decide to progress the context via polling it manually
| [in] | dpa | - DPA context |
| [in] | queue_size | - DPA completion queue size |
| [out] | dpa_comp | - created DPA completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_destroy | ( | struct doca_dpa_completion * | dpa_comp | ) |
Destroy DPA completion context.
This function destroys DPA completion context created by doca_dpa_completion_create()
| [in] | dpa_comp | - Previously created DPA completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_get_dpa_handle | ( | struct doca_dpa_completion * | dpa_comp, |
| doca_dpa_dev_completion_t * | handle | ||
| ) |
Get DPA completion context handle.
| [in] | dpa_comp | - DPA completion |
| [out] | handle | - DPA completion handle |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_get_queue_size | ( | struct doca_dpa_completion * | dpa_comp, |
| unsigned int * | queue_size | ||
| ) |
Get DPA completion context queue size.
| [in] | dpa_comp | - DPA completion |
| [out] | queue_size | - DPA completion queue size |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_get_thread | ( | struct doca_dpa_completion * | dpa_comp, |
| struct doca_dpa_thread ** | dpa_thread | ||
| ) |
Get DPA completion context attached thread.
| [in] | dpa_comp | - DPA completion |
| [out] | dpa_thread | - DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_set_thread | ( | struct doca_dpa_completion * | dpa_comp, |
| struct doca_dpa_thread * | dpa_thread | ||
| ) |
Set DPA completion context thread.
This function attaches DPA thread to DPA completion context. Attaching to a DPA thread is required if the user wants activation of the thread when a completion is raised on the completion context. This function must be called before DPA completion is started
| [in] | dpa_comp | - DPA completion |
| [in] | dpa_thread | - DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_start | ( | struct doca_dpa_completion * | dpa_comp | ) |
Start DPA completion context.
| [in] | dpa_comp | - DPA completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_stop | ( | struct doca_dpa_completion * | dpa_comp | ) |
Stop DPA completion context.
| [in] | dpa_comp | - DPA completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_create | ( | struct doca_dev * | dev, |
| struct doca_dpa ** | dpa | ||
| ) |
Create a DOCA DPA Context.
This function creates a DOCA DPA context given a DOCA device. The context represents a program on the DPA that is referenced by the host process that called the context creation API
| [in] | dev | - DOCA device |
| [out] | dpa | - created context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_d2h_buf_memcpy | ( | struct doca_dpa * | dpa, |
| struct doca_buf * | buf, | ||
| doca_dpa_dev_uintptr_t | src_ptr, | ||
| size_t | size | ||
| ) |
Copy from DPA Heap to DOCA Buf.
This function copies data from the DPA heap to start of DOCA Buf. This is a blocking call. When the call returns, the memory on the DOCA Buf is set to the values supplied in the DPA heap pointer
| [in] | dpa | - DPA context |
| [in] | buf | - destination DOCA Buf |
| [in] | src_ptr | - DPA device heap source pointer |
| [in] | size | - size of data to copy |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_d2h_memcpy | ( | struct doca_dpa * | dpa, |
| void * | dst_ptr, | ||
| doca_dpa_dev_uintptr_t | src_ptr, | ||
| size_t | size | ||
| ) |
Copy from DPA Heap to host memory.
This function copies data from the DPA heap to Host memory. This is a blocking call. When the call returns, the memory on the Host buffer is set to the values supplied in the DPA heap pointer
| [in] | dpa | - DPA context |
| [in] | dst_ptr | - host destination buffer address |
| [in] | src_ptr | - DPA device heap source pointer |
| [in] | size | - size of data to copy |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_destroy | ( | struct doca_dpa * | dpa | ) |
Destroy a DOCA DPA context.
This function destroys DPA context created by doca_dpa_create()
| [in] | dpa | - Previously created DPA context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_device_extend | ( | struct doca_dpa * | dpa, |
| struct doca_dev * | other_dev, | ||
| struct doca_dpa ** | extended_dpa | ||
| ) |
Create an extended DPA context.
This function extends a base DPA context (was created on PF DOCA device) to other DOCA device (VF/SF device) and creates an extended DPA context. This to allow creation of DPA resources such as RDMA/DPA completion/DPA Async ops... contexts on the other device. The extended DPA context can be used later on for all DOCA DPA APIs such as creating DPA memory/DPA completion context/... Please note:
| [in] | dpa | - Base DPA context |
| [in] | other_dev | - DOCA device to be extend to. |
| [out] | extended_dpa | - Created extended DPA context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_clear | ( | struct doca_dpa_eu_affinity * | affinity | ) |
Clear DPA EU affinity.
This function clears EU ID in the given DPA EU affinity
| [in] | affinity | - DPA EU affinity |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_create | ( | struct doca_dpa * | dpa, |
| struct doca_dpa_eu_affinity ** | affinity | ||
| ) |
Create DPA EU affinity.
This function creates DPA EU affinity. DPA EU affinity can be set for a DPA thread using doca_dpa_thread_set_affinity() to specify EU ID which DPA thread will use on DPA. Look at sched_getaffinity(3) for corresponding CPU use case. We are replicating it here for DPA
| [in] | dpa | - DPA context |
| [out] | affinity | - created DPA EU affinity |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_destroy | ( | struct doca_dpa_eu_affinity * | affinity | ) |
Destroy DPA EU affinity.
This function destroys DPA EU affinity created by doca_dpa_eu_affinity_create()
| [in] | affinity | - previously created DPA EU affinity |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_get | ( | struct doca_dpa_eu_affinity * | affinity, |
| unsigned int * | eu_id | ||
| ) |
Get EU ID from DPA EU affinity.
This function gets EU ID from the given DPA EU affinity
| [in] | affinity | - DPA EU affinity |
| [out] | eu_id | - EU ID |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_set | ( | struct doca_dpa_eu_affinity * | affinity, |
| unsigned int | eu_id | ||
| ) |
Set EU ID in DPA EU affinity.
This function sets EU ID in the given DPA EU affinity
| [in] | affinity | - DPA EU affinity |
| [in] | eu_id | - EU ID |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_app | ( | struct doca_dpa * | dpa, |
| struct doca_dpa_app ** | app | ||
| ) |
Get program app that was set for DPA context.
| [in] | dpa | - DPA context |
| [out] | app | - DPA application set for DPA context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_core_num | ( | struct doca_dpa * | dpa, |
| unsigned int * | num_cores | ||
| ) |
Retrieve the number of available DPA cores.
Use this info to select EU ID for DPA EU affinity
| [in] | dpa | - DPA context |
| [out] | num_cores | - number of DPA cores |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_dpa_handle | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_t * | handle | ||
| ) |
Get DPA context handle.
| [in] | dpa | - DPA context |
| [out] | handle | - DPA context handle |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_kernel_max_run_time | ( | const struct doca_dpa * | dpa, |
| unsigned long long * | value | ||
| ) |
Get maximum allowable time in seconds that a kernel may remain scheduled on the DPA. A kernel that remains scheduled beyond this limit may be terminated by the runtime and cause fatal behavior.
| [in] | dpa | - DPA context |
| [out] | value | - maximum allowed time in seconds for a kernel to remain scheduled |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_log_level | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_log_level_t * | log_level | ||
| ) |
Get device logs verbosity level that was set for DPA context.
| [in] | dpa | - DPA context |
| [out] | log_level | - verbosity level for device logs |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_max_threads_per_kernel | ( | const struct doca_dpa * | dpa, |
| unsigned int * | value | ||
| ) |
Get maximum number of DPA threads to run a single kernel launch operation.
| [in] | dpa | - DPA context |
| [out] | value | - number of maximum threads to run a kernel |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_num_eus_per_core | ( | struct doca_dpa * | dpa, |
| unsigned int * | eus_per_core | ||
| ) |
Retrieve the number of EUs available per DPA core.
Use this info to select EU ID for DPA EU affinity
| [in] | dpa | - DPA context |
| [out] | eus_per_core | - number of EUs per DPA core |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_total_num_eus_available | ( | struct doca_dpa * | dpa, |
| unsigned int * | total_num_eus | ||
| ) |
Retrieve the total number of EUs available to the application.
Use this info to select EU ID for DPA EU affinity
| [in] | dpa | - DPA context |
| [out] | total_num_eus | - number of total available EUs |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_uar_id | ( | const struct doca_dpa * | dpa, |
| uint32_t * | uar_id | ||
| ) |
Get DPA UAR ID.
| [in] | dpa | - DPA context |
| [out] | uar_id | - DPA UAR ID |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_h2d_buf_memcpy | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_uintptr_t | dst_ptr, | ||
| struct doca_buf * | buf, | ||
| size_t | size | ||
| ) |
Copy from DOCA Buf to DPA Heap.
This function copies data from start of DOCA Buf to the DPA heap. This is a blocking call. When the call returns, the memory on the DPA is set to the values supplied in the DOCA Buf
| [in] | dpa | - DPA context |
| [in] | dst_ptr | - DPA device heap destination pointer |
| [in] | buf | - source DOCA Buf |
| [in] | size | - size of data to copy |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_h2d_memcpy | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_uintptr_t | dst_ptr, | ||
| void * | src_ptr, | ||
| size_t | size | ||
| ) |
Copy from host memory to DPA Heap.
This function copies data from Host memory to the DPA heap. This is a blocking call. When the call returns, the memory on the DPA is set to the values supplied in the Host buffer
| [in] | dpa | - DPA context |
| [in] | dst_ptr | - DPA device heap destination pointer |
| [in] | src_ptr | - host source buffer address |
| [in] | size | - size of data to copy |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_hash_table_create | ( | struct doca_dpa * | dpa, |
| unsigned int | num_entries, | ||
| struct doca_dpa_hash_table ** | ht | ||
| ) |
Create a hash table on DPA.
This function creates a hash table on DPA. Once it is created, user can retrieve its DPA handle and use it for add, remove and find operations in DPA kernels
| [in] | dpa | - DPA context |
| [in] | num_entries | - number of entries in the hash table |
| [out] | ht | - Created DPA hash table |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_hash_table_destroy | ( | struct doca_dpa_hash_table * | ht | ) |
Destroy DPA hash table.
This function destroys DPA hash table created by doca_dpa_hash_table_create()
| [in] | ht | - Previously created DPA hash table |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_hash_table_get_dpa_handle | ( | struct doca_dpa_hash_table * | ht, |
| doca_dpa_dev_hash_table_t * | ht_handle | ||
| ) |
Get DPA hash table handle.
| [in] | ht | - DPA hash table |
| [out] | ht_handle | - DPA hash table handle |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_kernel_launch_update_add | ( | struct doca_dpa * | dpa, |
| struct doca_sync_event * | wait_event, | ||
| uint64_t | wait_threshold, | ||
| struct doca_sync_event * | comp_event, | ||
| uint64_t | comp_count, | ||
| unsigned int | num_threads, | ||
| doca_dpa_func_t * | func, | ||
| ... | |||
| ) |
Submit a kernel to DPA.
This function submits a kernel for launch on the specified dpa context. The kernel starts execution when its wait event value is greater than or equal to specified threshold. The value specified in comp_count is added to the comp_event when the kernel finishes execution.
| [in] | dpa | - previously created DPA context |
| [in] | wait_event | - event to wait on before executing the kernel (optional) |
| [in] | wait_threshold | - wait event count threshold to wait for before executing. Valid values [0-254] |
| [in] | comp_event | - event to signal after kernel execution is complete (optional) |
| [in] | comp_count | - completion count to add for completion event when func is complete |
| [in] | num_threads | - number of threads to use. This number must be equal or lower than the maximum allowed (see doca_dpa_get_max_threads_per_kernel) |
| [in] | func | - host function pointer representing DPA kernel |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_kernel_launch_update_set | ( | struct doca_dpa * | dpa, |
| struct doca_sync_event * | wait_event, | ||
| uint64_t | wait_threshold, | ||
| struct doca_sync_event * | comp_event, | ||
| uint64_t | comp_count, | ||
| unsigned int | num_threads, | ||
| doca_dpa_func_t * | func, | ||
| ... | |||
| ) |
Submit a kernel to DPA that sets completion event.
This function submits a kernel for launch on the specified dpa context. The kernel starts execution when its wait event value is greater than or equal to specified threshold. The completion event is set to value specified in comp_count when the kernel finishes execution.
The function to be launched func is a host function pointer corresponding to the DPA device function. For example, if the device function is declared as: __dpa_global__ hello(int arg1), then the user is expected to declare the function in the Host application as extern doca_dpa_func_t hello;. After the application is linked and loaded using the compiler, a function pointer hello can be used in as the func argument. The arguments to the function hello can be passed inline in the call as var args. For example, to call hello on the device using 4 threads with argument 5, the invocation looks like: doca_dpa_kernel_launch_update_set(..., 4, hello, 5);
| [in] | dpa | - previously created DPA context |
| [in] | wait_event | - event to wait on before executing the kernel (optional) |
| [in] | wait_threshold | - wait event count threshold to wait for before executing. Valid values [0-254] |
| [in] | comp_event | - event to signal after kernel execution is complete (optional) |
| [in] | comp_count | - completion count to set for completion event when func is complete |
| [in] | num_threads | - number of threads to use. This number must be equal or lower than the maximum allowed (see doca_dpa_get_max_threads_per_kernel) |
| [in] | func | - host function pointer representing DPA kernel |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_log_file_get_path | ( | struct doca_dpa * | dpa, |
| char * | file_path, | ||
| uint32_t * | file_path_len | ||
| ) |
Get log file path to write device logs into.
| [in] | dpa | - DPA context |
| [out] | file_path | - pathname to the log file to write device logs into |
| [out] | file_path_len | - file_path length. Output is actual number of bytes written |
The file_path buffer is allocated by the caller along with setting file_path_len indicating the length that was allocated. Upon return the file_path_len field is set to the actual length of the file_path
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_log_file_set_path | ( | struct doca_dpa * | dpa, |
| const char * | file_path | ||
| ) |
Set log file path to write device logs into.
Must be set before calling doca_dpa_start()
| [in] | dpa | - DPA context |
| [in] | file_path | - pathname to the log file to write device logs into |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_mem_alloc | ( | struct doca_dpa * | dpa, |
| size_t | size, | ||
| doca_dpa_dev_uintptr_t * | dev_ptr | ||
| ) |
Allocate DPA heap memory.
This function allocates memory of size bytes on the DPA process heap. The memory is aligned for any language supported data type. The memory is not zeroed on allocation. The allocated memory is returned in dev_ptr when successful. When memory allocation fails, dev_ptr is set to 0x0 (NULL)
| [in] | dpa | - DPA context |
| [in] | size | - requested size of allocation |
| [out] | dev_ptr | - pointer to the allocated memory on the DPA device |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_mem_free | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_uintptr_t | dev_ptr | ||
| ) |
Free the previously allocated DPA memory.
This function frees the allocated memory allocated on the DPA heap. Users are expected to ensure that kernels on the DPA are no longer accessing the memory using established synchronization mechanisms (see events)
| [in] | dpa | - DPA context |
| [in] | dev_ptr | - pointer to the memory that was previously allocated on the DPA device |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_memset | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_uintptr_t | dev_ptr, | ||
| int | value, | ||
| size_t | size | ||
| ) |
Set DPA Heap memory to a value.
This function sets DPA heap memory to a supplied value. This is a blocking call. When the call returns, the memory on the DPA is set to the value supplied
| [in] | dpa | - DPA context |
| [in] | dev_ptr | - DPA device heap pointer |
| [in] | value | - value to set |
| [in] | size | - size of device buffer |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_create | ( | struct doca_dpa * | dpa, |
| struct doca_dpa_thread * | dpa_thread, | ||
| struct doca_dpa_notification_completion ** | notify_comp | ||
| ) |
Create DPA notification completion context.
This function creates a DPA notification completion context. This context is used to activate the attached DPA thread in device using doca_dpa_dev_thread_notify() API. The thread activation is done without receiving a completion on the thread's attached completion context. Therefore it is expected that the user of this method of thread activation will pass the message in another fashion – such as shared memory
| [in] | dpa | - DPA context |
| [in] | dpa_thread | - attached DPA thread |
| [out] | notify_comp | - created DPA notification completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_destroy | ( | struct doca_dpa_notification_completion * | notify_comp | ) |
Destroy DPA notification completion context.
This function destroys DPA notification completion context created by doca_dpa_notification_completion_create()
| [in] | notify_comp | - Previously created DPA notification completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_get_dpa_handle | ( | struct doca_dpa_notification_completion * | notify_comp, |
| doca_dpa_dev_notification_completion_t * | handle | ||
| ) |
Get DPA notification completion context handle.
| [in] | notify_comp | - DPA notification completion |
| [out] | handle | - DPA notification completion handle |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_get_thread | ( | struct doca_dpa_notification_completion * | notify_comp, |
| struct doca_dpa_thread ** | dpa_thread | ||
| ) |
Get DPA notification completion context attached thread.
| [in] | notify_comp | - DPA notification completion |
| [out] | dpa_thread | - DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_start | ( | struct doca_dpa_notification_completion * | notify_comp | ) |
Start DPA notification completion context.
| [in] | notify_comp | - DPA notification completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_stop | ( | struct doca_dpa_notification_completion * | notify_comp | ) |
Stop DPA notification completion context.
| [in] | notify_comp | - DPA notification completion |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_peek_at_last_error | ( | const struct doca_dpa * | dpa | ) |
Return the last error generated on the DPA. Check if an error occurred on the device side runtime. This call does not reset the error state. If an error occurred, the DPA context enters a fatal state and must be destroyed by the user. In the case of a fatal error core dump and crash data will be written to the file path /tmp/doca_dpa_fatal or to the file path set by the API doca_dpa_log_file_set_path(), with the suffixes .PID.core and .PID.crash respectively, where PID is the process id.
| [in] | dpa | - DPA context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_rpc | ( | struct doca_dpa * | dpa, |
| doca_dpa_func_t * | func, | ||
| uint64_t * | retval, | ||
| ... | |||
| ) |
RPC to run DPA kernel.
This function executes the supplied func with its argument on the specified dpa context. This is a blocking API.
func is a host function pointer corresponding to the DPA device function. Please note that DPA device func must be annotated with __dpa_rpc__ annotation, such as __dpa_rpc__ uint64_t hello(int arg1). Also the user is expected to declare the function in the Host application as extern doca_dpa_func_t hello;.
| [in] | dpa | - DPA context |
| [in] | func | - Host function pointer representing DPA kernel to run |
| [out] | retval | - A pointer to the DPA kernel return value |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_set_app | ( | struct doca_dpa * | dpa, |
| struct doca_dpa_app * | app | ||
| ) |
Set program app for DPA context.
The program app represents a program on the DPA that is referenced by the host process that called the context creation API. Must be set before calling doca_dpa_start()
| [in] | dpa | - DPA context |
| [in] | app | - DPA application generated by DPACC |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_set_log_level | ( | struct doca_dpa * | dpa, |
| doca_dpa_dev_log_level_t | log_level | ||
| ) |
Set device logs verbosity level.
Log prints from the device will be printed to host with verbosity that is equal or lower than the set log level. Must be set before calling doca_dpa_start()
| [in] | dpa | - DPA context |
| [in] | log_level | - verbosity level for device logs |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_start | ( | struct doca_dpa * | dpa | ) |
Start a DPA context.
| [in] | dpa | - DPA context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_stop | ( | struct doca_dpa * | dpa | ) |
Stop a DPA context.
| [in] | dpa | - DPA context |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_create | ( | struct doca_dpa * | dpa, |
| struct doca_dpa_thread ** | dpa_thread | ||
| ) |
Create DPA thread.
This function creates a DPA thread. DPA thread used to run a user kernel on DPA. User can control on which EU to run the DPA kernel. The thread is activated on DPA using two methods: 1- Thread Activation using DPA notification completion context. 2- Attaching completion context to the thread. To activate the thread in order to enable receiving any messages or completions, user must: 1- Create DPA thread and configure it using thread setter functions. 2- Attach to a completion context. 3- Set thread to runnable state using doca_dpa_thread_run() API.
| [in] | dpa | - DPA context |
| [out] | dpa_thread | - created DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_destroy | ( | struct doca_dpa_thread * | dpa_thread | ) |
Destroy DPA thread.
This function destroys DPA thread created by doca_dpa_thread_create()
| [in] | dpa_thread | - Previously created DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_get_affinity | ( | struct doca_dpa_thread * | dpa_thread, |
| const struct doca_dpa_eu_affinity ** | affinity | ||
| ) |
Get DPA thread affinity.
| [in] | dpa_thread | - DPA thread |
| [out] | affinity | - DPA EU affinity |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_get_func_arg | ( | struct doca_dpa_thread * | dpa_thread, |
| doca_dpa_func_t ** | func, | ||
| uint64_t * | arg | ||
| ) |
Get DPA thread entry point and its argument.
| [in] | dpa_thread | - DPA thread |
| [out] | func | - DPA thread entry point |
| [out] | arg | - DPA thread entry point argument |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_get_id | ( | struct doca_dpa_thread * | dpa_thread, |
| uint32_t * | dpa_thread_id | ||
| ) |
Get DPA thread ID.
| [in] | dpa_thread | - DPA thread |
| [out] | dpa_thread_id | - DPA thread ID |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_get_local_storage | ( | struct doca_dpa_thread * | dpa_thread, |
| doca_dpa_dev_uintptr_t * | dev_ptr | ||
| ) |
Get DPA thread local storage.
| [in] | dpa_thread | - DPA thread |
| [out] | dev_ptr | - DPA device memory address |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_create | ( | struct doca_dpa * | dpa, |
| unsigned int | num_threads, | ||
| struct doca_dpa_tg ** | tg | ||
| ) |
Create DPA thread group.
This function creates an empty thread group (no populated threads) of a given size. User can set thread at specific rank using doca_dpa_thread_group_set_thread() API. Threads must be set in all ranks before thread group is started
| [in] | dpa | - DPA context |
| [in] | num_threads | - number of threads for the DPA thread group |
| [out] | tg | - created thread group |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_destroy | ( | struct doca_dpa_tg * | tg | ) |
Destroy DPA thread group.
This function destroys DPA thread group created by doca_dpa_thread_group_create()
| [in] | tg | - Previously created DPA thread group |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_get_num_threads | ( | struct doca_dpa_tg * | tg, |
| unsigned int * | num_threads | ||
| ) |
Get DPA thread group number of threads.
| [in] | tg | - DPA thread group |
| [out] | num_threads | - number of threads for the DPA thread group |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_set_thread | ( | struct doca_dpa_tg * | tg, |
| struct doca_dpa_thread * | thread, | ||
| unsigned int | rank | ||
| ) |
Set DPA thread at 'rank' in DPA thread group.
Thread rank is an index of the thread (between 0 and size()-1) within the group. This function must be called before starting both DPA thread and DPA thread group
| [in] | tg | - DPA thread group |
| [in] | thread | - DPA thread |
| [in] | rank | - rank of the DPA thread in DPA thread group |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_start | ( | struct doca_dpa_tg * | tg | ) |
Start DPA thread group.
| [in] | tg | - DPA thread group |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_stop | ( | struct doca_dpa_tg * | tg | ) |
Stop DPA thread group.
| [in] | tg | - DPA thread group |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_run | ( | struct doca_dpa_thread * | dpa_thread | ) |
Run DPA thread.
This function sets the thread to runnable state such that when the completion context attached to the thread receives a message, the thread will run. This function must be called after DPA thread is: 1- Created and started. 2- Attached to a completion context.
| [in] | dpa_thread | - DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_affinity | ( | struct doca_dpa_thread * | dpa_thread, |
| const struct doca_dpa_eu_affinity * | affinity | ||
| ) |
Set DPA thread affinity.
This function sets the affinity type of DPA thread to “fixed”. Fixed affinity means that the thread will run only on the EU ID provided in the given DPA EU affinity. When affinity is not specified, the default affinity mode is “relaxed”, means the thread will run on any available EU ID when its rescheduled
| [in] | dpa_thread | - DPA thread |
| [in] | affinity | - DPA EU affinity |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_func_arg | ( | struct doca_dpa_thread * | dpa_thread, |
| doca_dpa_func_t * | func, | ||
| uint64_t | arg | ||
| ) |
Set DPA thread entry point and its argument.
The DPA thread function func is a host function pointer corresponding to the DPA device function. The device function must be annotated with __dpa_global__ keyword such as__dpa_global__ void hello(int arg1). In the Host application, the user is expected to declare the function as extern doca_dpa_func_t hello;. After the application is linked and loaded using the compiler, the function pointer hello can be used in as the func argument. This function must be called before DPA thread is started
| [in] | dpa_thread | - DPA thread |
| [in] | func | - Host function pointer representing DPA kernel which thread run when it is triggered |
| [in] | arg | - DPA thread entry point argument |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_local_storage | ( | struct doca_dpa_thread * | dpa_thread, |
| doca_dpa_dev_uintptr_t | dev_ptr | ||
| ) |
Set DPA thread local storage.
User can ask to store an opaque (DPA device memory pointer) for a DPA thread in host side using Thread local storage utility. In device kernel, user can obtain this opaque using doca_dpa_dev_thread_get_local_storage() API. This function must be called before DPA thread is started
| [in] | dpa_thread | - DPA thread |
| [in] | dev_ptr | - DPA device memory address |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_start | ( | struct doca_dpa_thread * | dpa_thread | ) |
Start DPA thread.
| [in] | dpa_thread | - DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_stop | ( | struct doca_dpa_thread * | dpa_thread | ) |
Stop DPA thread.
| [in] | dpa_thread | - DPA thread |
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_trace_file_get_path | ( | struct doca_dpa * | dpa, |
| char * | file_path, | ||
| uint32_t * | file_path_len | ||
| ) |
Get trace file path to write device traces into.
| [in] | dpa | - DPA context |
| [out] | file_path | - pathname to the trace file to write device traces into |
| [out] | file_path_len | - file_path length. Output is actual number of bytes written |
The file_path buffer is allocated by the caller along with setting file_path_len indicating the length that was allocated. Upon return the file_path_len field is set to the actual length of the file_path
| DOCA_EXPERIMENTAL doca_error_t doca_dpa_trace_file_set_path | ( | struct doca_dpa * | dpa, |
| const char * | file_path | ||
| ) |
Set trace file path to write device traces into.
Must be set before calling doca_dpa_start()
| [in] | dpa | - DPA context |
| [in] | file_path | - pathname to the trace file to write device traces into |