NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_dpa.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
22 #ifndef DOCA_DPA_H_
23 #define DOCA_DPA_H_
24 
25 #include <stdint.h>
26 #include <stddef.h>
27 #include <stdarg.h>
28 #include <stdbool.h>
29 #include <doca_compat.h>
30 #include <doca_error.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 struct doca_devinfo;
40 struct doca_dev;
41 struct doca_sync_event;
42 struct doca_dpa;
43 struct doca_buf;
44 struct doca_dpa_hash_table;
45 struct doca_dpa_eu_affinity;
46 struct doca_dpa_thread;
47 struct doca_dpa_tg;
48 struct doca_dpa_completion;
49 struct doca_dpa_async_ops;
50 struct doca_dpa_notification_completion;
51 
57 #define DOCA_DPA_COMPLETION_LOG_MAX_USER_DATA (24)
58 
62 typedef enum doca_dpa_dev_log_level {
69 
73 typedef uint64_t doca_dpa_dev_t;
74 
78 typedef uint64_t doca_dpa_dev_uintptr_t;
79 
83 typedef uint64_t doca_dpa_dev_hash_table_t;
84 
88 typedef uint64_t doca_dpa_dev_completion_t;
89 
93 typedef uint64_t doca_dpa_dev_async_ops_t;
94 
99 
107 struct doca_dpa_app;
108 
118 typedef void(doca_dpa_func_t)(void);
119 
131 doca_error_t doca_dpa_cap_is_supported(const struct doca_devinfo *devinfo);
132 
151 doca_error_t doca_dpa_create(struct doca_dev *dev, struct doca_dpa **dpa);
152 
167 doca_error_t doca_dpa_destroy(struct doca_dpa *dpa);
168 
181 doca_error_t doca_dpa_start(struct doca_dpa *dpa);
182 
195 doca_error_t doca_dpa_stop(struct doca_dpa *dpa);
196 
213 doca_error_t doca_dpa_set_app(struct doca_dpa *dpa, struct doca_dpa_app *app);
214 
226 doca_error_t doca_dpa_get_app(struct doca_dpa *dpa, struct doca_dpa_app **app);
227 
248 doca_error_t doca_dpa_app_get_name(struct doca_dpa_app *app, char *app_name, uint32_t *app_name_len);
249 
268 
281 
299 doca_error_t doca_dpa_log_file_set_path(struct doca_dpa *dpa, const char *file_path);
300 
317 doca_error_t doca_dpa_log_file_get_path(struct doca_dpa *dpa, char *file_path, uint32_t *file_path_len);
318 
336 doca_error_t doca_dpa_trace_file_set_path(struct doca_dpa *dpa, const char *file_path);
337 
354 doca_error_t doca_dpa_trace_file_get_path(struct doca_dpa *dpa, char *file_path, uint32_t *file_path_len);
355 
367 doca_error_t doca_dpa_get_max_threads_per_kernel(const struct doca_dpa *dpa, unsigned int *value);
368 
381 doca_error_t doca_dpa_get_kernel_max_run_time(const struct doca_dpa *dpa, unsigned long long *value);
382 
409 doca_error_t doca_dpa_device_extend(struct doca_dpa *dpa, struct doca_dev *other_dev, struct doca_dpa **extended_dpa);
410 
423 doca_error_t doca_dpa_get_dpa_handle(struct doca_dpa *dpa, doca_dpa_dev_t *handle);
424 
437 doca_error_t doca_dpa_get_uar_id(const struct doca_dpa *dpa, uint32_t *uar_id);
438 
474  struct doca_sync_event *wait_event,
475  uint64_t wait_threshold,
476  struct doca_sync_event *comp_event,
477  uint64_t comp_count,
478  unsigned int num_threads,
479  doca_dpa_func_t *func,
480  ... /* args */);
481 
507  struct doca_sync_event *wait_event,
508  uint64_t wait_threshold,
509  struct doca_sync_event *comp_event,
510  uint64_t comp_count,
511  unsigned int num_threads,
512  doca_dpa_func_t *func,
513  ... /* args */);
514 
538 doca_error_t doca_dpa_rpc(struct doca_dpa *dpa, doca_dpa_func_t *func, uint64_t *retval, ... /* args */);
539 
556 doca_error_t doca_dpa_peek_at_last_error(const struct doca_dpa *dpa);
557 
577 doca_error_t doca_dpa_mem_alloc(struct doca_dpa *dpa, size_t size, doca_dpa_dev_uintptr_t *dev_ptr);
578 
596 
615 doca_error_t doca_dpa_h2d_memcpy(struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dst_ptr, void *src_ptr, size_t size);
616 
636  doca_dpa_dev_uintptr_t dst_ptr,
637  struct doca_buf *buf,
638  size_t size);
639 
658 doca_error_t doca_dpa_d2h_memcpy(struct doca_dpa *dpa, void *dst_ptr, doca_dpa_dev_uintptr_t src_ptr, size_t size);
659 
679  struct doca_buf *buf,
680  doca_dpa_dev_uintptr_t src_ptr,
681  size_t size);
682 
701 doca_error_t doca_dpa_memset(struct doca_dpa *dpa, doca_dpa_dev_uintptr_t dev_ptr, int value, size_t size);
702 
723  unsigned int num_entries,
724  struct doca_dpa_hash_table **ht);
725 
742 doca_error_t doca_dpa_hash_table_destroy(struct doca_dpa_hash_table *ht);
743 
756 
770 doca_error_t doca_dpa_get_core_num(struct doca_dpa *dpa, unsigned int *num_cores);
771 
785 doca_error_t doca_dpa_get_num_eus_per_core(struct doca_dpa *dpa, unsigned int *eus_per_core);
786 
800 doca_error_t doca_dpa_get_total_num_eus_available(struct doca_dpa *dpa, unsigned int *total_num_eus);
801 
818 doca_error_t doca_dpa_eu_affinity_create(struct doca_dpa *dpa, struct doca_dpa_eu_affinity **affinity);
819 
833 doca_error_t doca_dpa_eu_affinity_destroy(struct doca_dpa_eu_affinity *affinity);
834 
848 doca_error_t doca_dpa_eu_affinity_set(struct doca_dpa_eu_affinity *affinity, unsigned int eu_id);
849 
862 doca_error_t doca_dpa_eu_affinity_clear(struct doca_dpa_eu_affinity *affinity);
863 
877 doca_error_t doca_dpa_eu_affinity_get(struct doca_dpa_eu_affinity *affinity, unsigned int *eu_id);
878 
902 doca_error_t doca_dpa_thread_create(struct doca_dpa *dpa, struct doca_dpa_thread **dpa_thread);
903 
918 doca_error_t doca_dpa_thread_destroy(struct doca_dpa_thread *dpa_thread);
919 
940 doca_error_t doca_dpa_thread_set_func_arg(struct doca_dpa_thread *dpa_thread, doca_dpa_func_t *func, uint64_t arg);
941 
954 doca_error_t doca_dpa_thread_get_func_arg(struct doca_dpa_thread *dpa_thread, doca_dpa_func_t **func, uint64_t *arg);
955 
973 doca_error_t doca_dpa_thread_set_local_storage(struct doca_dpa_thread *dpa_thread, doca_dpa_dev_uintptr_t dev_ptr);
974 
986 doca_error_t doca_dpa_thread_get_local_storage(struct doca_dpa_thread *dpa_thread, doca_dpa_dev_uintptr_t *dev_ptr);
987 
1005 doca_error_t doca_dpa_thread_set_affinity(struct doca_dpa_thread *dpa_thread,
1006  const struct doca_dpa_eu_affinity *affinity);
1007 
1019 doca_error_t doca_dpa_thread_get_affinity(struct doca_dpa_thread *dpa_thread,
1020  const struct doca_dpa_eu_affinity **affinity);
1021 
1037 doca_error_t doca_dpa_thread_start(struct doca_dpa_thread *dpa_thread);
1038 
1051 doca_error_t doca_dpa_thread_stop(struct doca_dpa_thread *dpa_thread);
1052 
1074 doca_error_t doca_dpa_thread_run(struct doca_dpa_thread *dpa_thread);
1075 
1089 doca_error_t doca_dpa_thread_get_id(struct doca_dpa_thread *dpa_thread, uint32_t *dpa_thread_id);
1090 
1108 doca_error_t doca_dpa_thread_group_create(struct doca_dpa *dpa, unsigned int num_threads, struct doca_dpa_tg **tg);
1109 
1125 
1137 doca_error_t doca_dpa_thread_group_get_num_threads(struct doca_dpa_tg *tg, unsigned int *num_threads);
1138 
1161  struct doca_dpa_thread *thread,
1162  unsigned int rank);
1163 
1180 
1194 
1216  unsigned int queue_size,
1217  struct doca_dpa_completion **dpa_comp);
1218 
1233 doca_error_t doca_dpa_completion_destroy(struct doca_dpa_completion *dpa_comp);
1234 
1246 doca_error_t doca_dpa_completion_get_queue_size(struct doca_dpa_completion *dpa_comp, unsigned int *queue_size);
1247 
1265 doca_error_t doca_dpa_completion_set_thread(struct doca_dpa_completion *dpa_comp, struct doca_dpa_thread *dpa_thread);
1266 
1278 doca_error_t doca_dpa_completion_get_thread(struct doca_dpa_completion *dpa_comp, struct doca_dpa_thread **dpa_thread);
1279 
1295 doca_error_t doca_dpa_completion_start(struct doca_dpa_completion *dpa_comp);
1296 
1309 doca_error_t doca_dpa_completion_stop(struct doca_dpa_completion *dpa_comp);
1310 
1323 doca_error_t doca_dpa_completion_get_dpa_handle(struct doca_dpa_completion *dpa_comp,
1324  doca_dpa_dev_completion_t *handle);
1325 
1348  unsigned int queue_size,
1349  uint64_t user_data,
1350  struct doca_dpa_async_ops **async_ops);
1351 
1366 doca_error_t doca_dpa_async_ops_destroy(struct doca_dpa_async_ops *async_ops);
1367 
1379 doca_error_t doca_dpa_async_ops_get_queue_size(struct doca_dpa_async_ops *async_ops, unsigned int *queue_size);
1380 
1392 doca_error_t doca_dpa_async_ops_get_user_data(struct doca_dpa_async_ops *async_ops, uint64_t *user_data);
1393 
1411 doca_error_t doca_dpa_async_ops_attach(struct doca_dpa_async_ops *async_ops, struct doca_dpa_completion *dpa_comp);
1412 
1428 doca_error_t doca_dpa_async_ops_start(struct doca_dpa_async_ops *async_ops);
1429 
1442 doca_error_t doca_dpa_async_ops_stop(struct doca_dpa_async_ops *async_ops);
1443 
1456 doca_error_t doca_dpa_async_ops_get_dpa_handle(struct doca_dpa_async_ops *async_ops, doca_dpa_dev_async_ops_t *handle);
1457 
1478  struct doca_dpa_thread *dpa_thread,
1479  struct doca_dpa_notification_completion **notify_comp);
1480 
1495 doca_error_t doca_dpa_notification_completion_destroy(struct doca_dpa_notification_completion *notify_comp);
1496 
1508 doca_error_t doca_dpa_notification_completion_get_thread(struct doca_dpa_notification_completion *notify_comp,
1509  struct doca_dpa_thread **dpa_thread);
1510 
1526 doca_error_t doca_dpa_notification_completion_start(struct doca_dpa_notification_completion *notify_comp);
1527 
1540 doca_error_t doca_dpa_notification_completion_stop(struct doca_dpa_notification_completion *notify_comp);
1541 
1554 doca_error_t doca_dpa_notification_completion_get_dpa_handle(struct doca_dpa_notification_completion *notify_comp,
1556 
1557 #ifdef __cplusplus
1558 }
1559 #endif
1560 
1561 #endif /* DOCA_DPA_H_ */
1562 
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
@ DOCA_DPA_DEV_LOG_LEVEL_ERROR
Definition: doca_dpa.h:64
@ DOCA_DPA_DEV_LOG_LEVEL_DISABLE
Definition: doca_dpa.h:63
@ DOCA_DPA_DEV_LOG_LEVEL_DEBUG
Definition: doca_dpa.h:67
@ DOCA_DPA_DEV_LOG_LEVEL_WARNING
Definition: doca_dpa.h:65
@ DOCA_DPA_DEV_LOG_LEVEL_INFO
Definition: doca_dpa.h:66
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_start(struct doca_dpa_notification_completion *notify_comp)
Start DPA notification completion context.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_stop(struct doca_dpa *dpa)
Stop a DPA context.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_run(struct doca_dpa_thread *dpa_thread)
Run DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_create(struct doca_dpa *dpa, struct doca_dpa_thread **dpa_thread)
Create DPA thread.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_destroy(struct doca_dpa_completion *dpa_comp)
Destroy DPA completion context.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_create(struct doca_dev *dev, struct doca_dpa **dpa)
Create a DOCA DPA Context.
uint64_t doca_dpa_dev_hash_table_t
DPA hash table handle type definition.
Definition: doca_dpa.h:83
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.
doca_dpa_dev_log_level
DOCA DPA device log levels, sorted by verbosity from high to low.
Definition: doca_dpa.h:62
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_destroy(struct doca_dpa_notification_completion *notify_comp)
Destroy DPA notification completion context.
uint64_t doca_dpa_dev_t
DPA context handle type definition.
Definition: doca_dpa.h:73
DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_stop(struct doca_dpa_async_ops *async_ops)
Stop DPA asynchronous ops context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_dpa_handle(struct doca_dpa *dpa, doca_dpa_dev_t *handle)
Get DPA context handle.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_destroy(struct doca_dpa_tg *tg)
Destroy DPA thread group.
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.
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.
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.
enum doca_dpa_dev_log_level doca_dpa_dev_log_level_t
DOCA DPA device log levels, sorted by verbosity from high to low.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_start(struct doca_dpa_completion *dpa_comp)
Start DPA completion context.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_destroy(struct doca_dpa *dpa)
Destroy a DOCA DPA context.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_create(struct doca_dpa *dpa, struct doca_dpa_eu_affinity **affinity)
Create DPA EU affinity.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_hash_table_destroy(struct doca_dpa_hash_table *ht)
Destroy DPA hash table.
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.
void() doca_dpa_func_t(void)
Generic function pointer type.
Definition: doca_dpa.h:118
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_stop(struct doca_dpa_notification_completion *notify_comp)
Stop DPA notification completion context.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_clear(struct doca_dpa_eu_affinity *affinity)
Clear DPA EU affinity.
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....
uint64_t doca_dpa_dev_completion_t
DPA completion handle type definition.
Definition: doca_dpa.h:88
DOCA_EXPERIMENTAL doca_error_t doca_dpa_start(struct doca_dpa *dpa)
Start a DPA context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_start(struct doca_dpa_async_ops *async_ops)
Start DPA asynchronous ops context.
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_cap_is_supported(const struct doca_devinfo *devinfo)
Get whether the DOCA device supports DPA.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_stop(struct doca_dpa_completion *dpa_comp)
Stop DPA completion context.
uint64_t doca_dpa_dev_uintptr_t
DPA pointer type definition.
Definition: doca_dpa.h:78
DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_uar_id(const struct doca_dpa *dpa, uint32_t *uar_id)
Get DPA UAR ID.
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.
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.
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....
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_start(struct doca_dpa_tg *tg)
Start DPA thread group.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_async_ops_destroy(struct doca_dpa_async_ops *async_ops)
Destroy DPA asynchronous ops context.
uint64_t doca_dpa_dev_async_ops_t
DPA asynchronous ops handle type definition.
Definition: doca_dpa.h:93
DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_destroy(struct doca_dpa_eu_affinity *affinity)
Destroy DPA EU affinity.
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.
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.
uint64_t doca_dpa_dev_notification_completion_t
DPA notification completion handle type definition.
Definition: doca_dpa.h:98
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_start(struct doca_dpa_thread *dpa_thread)
Start DPA thread.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_stop(struct doca_dpa_thread *dpa_thread)
Stop DPA thread.
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_destroy(struct doca_dpa_thread *dpa_thread)
Destroy DPA thread.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_set_app(struct doca_dpa *dpa, struct doca_dpa_app *app)
Set program app for DPA context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_group_stop(struct doca_dpa_tg *tg)
Stop DPA thread group.
enum doca_error doca_error_t
DOCA API return codes.
type value
int log_level
Definition: pcc.c:40