NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_sync_event.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <doca_compat.h>
#include <doca_error.h>
#include <doca_types.h>
Include dependency graph for doca_sync_event.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint64_t doca_dpa_dev_sync_event_t
 DOCA Sync Event DPA handle. More...
 
typedef uint64_t doca_dpa_dev_sync_event_remote_net_t
 DOCA Sync Event remote DPA handle. More...
 
typedef uint64_t doca_gpu_dev_sync_event_t
 DOCA Sync Event GPU handle. More...
 
typedef uint64_t doca_gpu_dev_sync_event_remote_net_t
 DOCA Sync Event remote GPU handle. More...
 
typedef void(* doca_sync_event_task_get_completion_cb_t) (struct doca_sync_event_task_get *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Get task completion callback. More...
 
typedef void(* doca_sync_event_task_notify_set_completion_cb_t) (struct doca_sync_event_task_notify_set *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Set task completion callback. More...
 
typedef void(* doca_sync_event_task_notify_add_completion_cb_t) (struct doca_sync_event_task_notify_add *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Add task completion callback. More...
 
typedef void(* doca_sync_event_task_wait_eq_completion_cb_t) (struct doca_sync_event_task_wait_eq *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Wait eq task completion callback. More...
 
typedef void(* doca_sync_event_task_wait_neq_completion_cb_t) (struct doca_sync_event_task_wait_neq *task, union doca_data task_user_data, union doca_data ctx_user_data)
 Wait neq task completion callback. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_create (struct doca_sync_event **event)
 Create a Sync Event handle. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_create_from_export (struct doca_dev *dev, const uint8_t *data, size_t sz, struct doca_sync_event **event)
 Create a Sync Event handle from an export. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_create_from_export_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_remote_net_create_from_export (struct doca_dev *dev, const uint8_t *data, size_t sz, struct doca_sync_event_remote_net **event)
 Create a remote Sync Event handle from an export. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_create_from_export_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_destroy (struct doca_sync_event *event)
 Destroy a Sync Event instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_remote_net_destroy (struct doca_sync_event_remote_net *event)
 Destroy a Sync Event instance. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_publisher_location_cpu (struct doca_sync_event *event, struct doca_dev *dev)
 Associate a CPU device context as the Sync Event publisher. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_publisher_location_dpa (struct doca_sync_event *event, struct doca_dpa *dpa)
 Associate a DOCA DPA context as the Sync Event publisher. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_publisher_location_gpu (struct doca_sync_event *event, struct doca_gpu *gpu)
 Associate a DOCA GPU context as the Sync Event publisher. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_publisher_location_remote_pci (struct doca_sync_event *event)
 Declare Sync Event publisher as remote pci. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_publisher_location_remote_net (struct doca_sync_event *event)
 Declare Sync Event publisher as a remote peer. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_cpu (struct doca_sync_event *event, struct doca_dev *dev)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_dpa (struct doca_sync_event *event, struct doca_dpa *dpa)
 Associate a DOCA DPA context as the Sync Event subscriber. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_gpu (struct doca_sync_event *event, struct doca_gpu *gpu)
 Associate a DOCA GPU context as the Sync Event subscriber. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_remote_pci (struct doca_sync_event *event)
 Declare Sync Event subscriber as remote PCI. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_set_addr (struct doca_sync_event *event, uint64_t *addr)
 Set the 64-bit value's memory for a Sync Event. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_set_doca_buf (struct doca_sync_event *event, struct doca_buf *buf)
 Set the 64-bit value's buffer for a Sync Event. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_start (struct doca_sync_event *event)
 Start a Sync Event to be operate as stand-alone DOCA Core object only. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_stop (struct doca_sync_event *event)
 Stop a Sync Event which has been previously started with 'doca_sync_event_start'. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_sync_event_as_ctx (struct doca_sync_event *event)
 Convert a Sync Event to a DOCA context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_task_get_is_supported (const struct doca_devinfo *devinfo)
 Check if a given device supports submitting a DOCA Sync Event get task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_get_set_conf (struct doca_sync_event *event, doca_sync_event_task_get_completion_cb_t completion_cb, doca_sync_event_task_get_completion_cb_t error_cb, uint32_t num_tasks)
 Set the DOCA Sync Event get task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_get_alloc_init (struct doca_sync_event *event, uint64_t *ret_val_ptr, union doca_data user_data, struct doca_sync_event_task_get **task)
 Allocate a DOCA Sync Event get task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_sync_event_task_get_as_doca_task (struct doca_sync_event_task_get *task)
 Convert a DOCA Sync Event get task to a DOCA Task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_get_set_ret_val_ptr (struct doca_sync_event_task_get *task, uint64_t *ret_val_ptr)
 Set the return value pointer of a DOCA Sync Event get task. More...
 
DOCA_EXPERIMENTAL uint64_t * doca_sync_event_task_get_get_ret_val_ptr (const struct doca_sync_event_task_get *task)
 Get the return value pointer of a DOCA Sync Event get task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_task_notify_set_is_supported (const struct doca_devinfo *devinfo)
 Check if a given device supports submitting a DOCA Sync Event notify-set task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_notify_set_set_conf (struct doca_sync_event *event, doca_sync_event_task_notify_set_completion_cb_t completion_cb, doca_sync_event_task_notify_set_completion_cb_t error_cb, uint32_t num_tasks)
 Set the DOCA Sync Event notify-set task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_notify_set_alloc_init (struct doca_sync_event *event, uint64_t set_val, union doca_data user_data, struct doca_sync_event_task_notify_set **task)
 Allocate a DOCA Sync Event notify-set task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_sync_event_task_notify_set_as_doca_task (struct doca_sync_event_task_notify_set *task)
 Convert a DOCA Sync Event notify-set task to a DOCA Task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_notify_set_set_set_val (struct doca_sync_event_task_notify_set *task, uint64_t set_val)
 Set the set value of a DOCA Sync Event notify-set task. More...
 
DOCA_EXPERIMENTAL uint64_t doca_sync_event_task_notify_set_get_set_val (const struct doca_sync_event_task_notify_set *task)
 Get the set value of a DOCA Sync Event notify-set task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_task_notify_add_is_supported (const struct doca_devinfo *devinfo)
 Check if a given device supports submitting a DOCA Sync Event notify-add task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_notify_add_set_conf (struct doca_sync_event *event, doca_sync_event_task_notify_add_completion_cb_t completion_cb, doca_sync_event_task_notify_add_completion_cb_t error_cb, uint32_t num_tasks)
 Set the DOCA Sync Event notify-add task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_notify_add_alloc_init (struct doca_sync_event *event, uint64_t inc_val, uint64_t *fetched_val_ptr, union doca_data user_data, struct doca_sync_event_task_notify_add **task)
 Allocate a DOCA Sync Event notify-add task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_sync_event_task_notify_add_as_doca_task (struct doca_sync_event_task_notify_add *task)
 Convert a DOCA Sync Event notify-add task to a DOCA Task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_notify_add_set_inc_val (struct doca_sync_event_task_notify_add *task, uint64_t inc_val)
 Set the increment value of a doca notify-add task. More...
 
DOCA_EXPERIMENTAL uint64_t doca_sync_event_task_notify_add_get_inc_val (const struct doca_sync_event_task_notify_add *task)
 Get the increment value of a DOCA Sync Event notify-add task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_notify_add_set_fetched_val_ptr (struct doca_sync_event_task_notify_add *task, uint64_t *fetched_val_ptr)
 Set the fetched value pointer of a DOCA Sync Event notify-add task. More...
 
DOCA_EXPERIMENTAL uint64_t * doca_sync_event_task_notify_add_get_fetched_val_ptr (const struct doca_sync_event_task_notify_add *task)
 Get the fetched value pointer of a DOCA Sync Event notify-add task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_task_wait_eq_is_supported (const struct doca_devinfo *devinfo)
 Check if a given device supports submitting a DOCA Sync Event wait-equal task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_wait_eq_set_conf (struct doca_sync_event *event, doca_sync_event_task_wait_eq_completion_cb_t completion_cb, doca_sync_event_task_wait_eq_completion_cb_t error_cb, uint32_t num_tasks)
 Set the DOCA Sync Event wait-equal task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_wait_eq_alloc_init (struct doca_sync_event *event, uint64_t wait_val, uint64_t mask, union doca_data user_data, struct doca_sync_event_task_wait_eq **task)
 Allocate a DOCA Sync Event wait-equal task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_sync_event_task_wait_eq_as_doca_task (struct doca_sync_event_task_wait_eq *task)
 Convert a DOCA Sync Event wait-equal task to a DOCA Task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_wait_eq_set_wait_val (struct doca_sync_event_task_wait_eq *task, uint64_t wait_val)
 Set the wait value of a DOCA wait-equal task. More...
 
DOCA_EXPERIMENTAL uint64_t doca_sync_event_task_wait_eq_get_wait_val (const struct doca_sync_event_task_wait_eq *task)
 Get the wait value of a DOCA Sync Event wait-equal task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_wait_eq_set_mask (struct doca_sync_event_task_wait_eq *task, uint64_t mask)
 Set the mask of a DOCA wait-equal task. More...
 
DOCA_EXPERIMENTAL uint64_t doca_sync_event_task_wait_eq_get_mask (const struct doca_sync_event_task_wait_eq *task)
 Get the mask of a DOCA Sync Event wait-equal task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_task_wait_neq_is_supported (const struct doca_devinfo *devinfo)
 Check if a given device supports submitting a DOCA Sync Event wait-not-equal task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_wait_neq_set_conf (struct doca_sync_event *event, doca_sync_event_task_wait_neq_completion_cb_t completion_cb, doca_sync_event_task_wait_neq_completion_cb_t error_cb, uint32_t num_tasks)
 Set the DOCA Sync Event wait-not-equal task configuration. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_task_wait_neq_alloc_init (struct doca_sync_event *event, uint64_t wait_val, uint64_t mask, union doca_data user_data, struct doca_sync_event_task_wait_neq **task)
 Allocate a DOCA Sync Event wait-not-equal task. More...
 
DOCA_EXPERIMENTAL struct doca_task * doca_sync_event_task_wait_neq_as_doca_task (struct doca_sync_event_task_wait_neq *task)
 Convert a DOCA Sync Event wait-not-equal task to a DOCA Task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_wait_neq_set_wait_val (struct doca_sync_event_task_wait_neq *task, uint64_t wait_val)
 Set the wait value of a DOCA wait-not-equal task. More...
 
DOCA_EXPERIMENTAL uint64_t doca_sync_event_task_wait_neq_get_wait_val (const struct doca_sync_event_task_wait_neq *task)
 Get the wait value of a DOCA Sync Event wait-not-equal task. More...
 
DOCA_EXPERIMENTAL void doca_sync_event_task_wait_neq_set_mask (struct doca_sync_event_task_wait_neq *task, uint64_t mask)
 Set the mask of a DOCA wait-not-equal task. More...
 
DOCA_EXPERIMENTAL uint64_t doca_sync_event_task_wait_neq_get_mask (const struct doca_sync_event_task_wait_neq *task)
 Get the mask of a DOCA Sync Event wait-not-equal task. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_export_to_remote_pci (struct doca_sync_event *event, struct doca_dev *dev, const uint8_t **data, size_t *sz)
 Export Sync Event to be shared with remote PCI. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_remote_pci_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_get_dpa_handle (struct doca_sync_event *event, struct doca_dpa *dpa, doca_dpa_dev_sync_event_t *dpa_dev_se_handle)
 Export Sync Event to be shared with the DPA. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_dpa_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_get_gpu_handle (struct doca_sync_event *event, struct doca_gpu *gpu, doca_gpu_dev_sync_event_t **gpu_dev_se)
 Export Sync Event to be shared with the GPU. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_gpu_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_export_to_remote_net (struct doca_sync_event *event, const uint8_t **data, size_t *sz)
 Export Sync Event to be shared with a remote peer. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_remote_net_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_remote_net_get_dpa_handle (struct doca_sync_event_remote_net *event, struct doca_dpa *dpa, doca_dpa_dev_sync_event_remote_net_t *dpa_remote_event)
 Export remote Sync Event to be shared with the DPA. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_export_to_dpa_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_remote_net_get_gpu_handle (struct doca_sync_event_remote_net *event, struct doca_gpu *gpu, doca_gpu_dev_sync_event_remote_net_t *gpu_remote_event)
 Export remote Sync Event to be shared with the GPU. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_export_to_gpu_supported (const struct doca_devinfo *devinfo)
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_get (struct doca_sync_event *event, uint64_t *value)
 Get the value of a Sync Event synchronously. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_update_add (struct doca_sync_event *event, uint64_t value, uint64_t *fetched)
 Atomically increase the value of a Sync Event by some value synchronously. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_update_set (struct doca_sync_event *event, uint64_t value)
 Set the value of a Sync Event to some value synchronously. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_gt (struct doca_sync_event *event, uint64_t value, uint64_t mask)
 Wait for the value of a Sync Event to be grater than some threshold value synchronously in a polling busy wait manner. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_gt_yield (struct doca_sync_event *event, uint64_t value, uint64_t mask)
 Wait for the value of a Sync Event to be grater than some threshold value synchronously in a periodically busy wait manner. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_eq (struct doca_sync_event *event, uint64_t value, uint64_t mask)
 Wait for the value of a Sync Event to be equal to some value synchronously in a busy wait manner. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_eq_yield (struct doca_sync_event *event, uint64_t value, uint64_t mask)
 Wait for the value of a Sync Event to be equal to some value synchronously in a periodically busy wait manner. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_neq (struct doca_sync_event *event, uint64_t value, uint64_t mask)
 Wait for the value of a Sync Event to be not equal to some value synchronously in a busy wait manner. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_neq_yield (struct doca_sync_event *event, uint64_t value, uint64_t mask)
 Wait for the value of a Sync Event to be not equal to some value synchronously in a periodically busy wait manner. More...