NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA Sync Event
Collaboration diagram for DOCA Sync Event:

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...
 

Detailed Description

DOCA Sync Event DOCA Sync Event is a software synchronization mechanism of parallel execution across the CPU, DPU, DPA, GPU and a remote node. It is an abstraction around 64-bit value which can be updated, read, and waited upon from any of these units to achieve synchronization between executions on them.

Typedef Documentation

◆ doca_dpa_dev_sync_event_remote_net_t

DOCA Sync Event remote DPA handle.

Definition at line 61 of file doca_sync_event.h.

◆ doca_dpa_dev_sync_event_t

typedef uint64_t doca_dpa_dev_sync_event_t

DOCA Sync Event DPA handle.

Definition at line 56 of file doca_sync_event.h.

◆ doca_gpu_dev_sync_event_remote_net_t

DOCA Sync Event remote GPU handle.

Definition at line 73 of file doca_sync_event.h.

◆ doca_gpu_dev_sync_event_t

typedef uint64_t doca_gpu_dev_sync_event_t

DOCA Sync Event GPU handle.

Definition at line 68 of file doca_sync_event.h.

◆ doca_sync_event_task_get_completion_cb_t

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.

See doca_task_completion_cb_t doc.

Parameters
[in]taskThe successfully completed sync event get task. The implementation can assume se_task is not NULL.
[in]task_user_dataTask's user data which was previously set.
[in]ctx_user_dataContext's user data which was previously set.

Definition at line 94 of file doca_sync_event.h.

◆ doca_sync_event_task_notify_add_completion_cb_t

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.

See doca_task_completion_cb_t doc.

Parameters
[in]taskThe successfully completed sync event add task. The implementation can assume se_task is not NULL.
[in]task_user_dataTask's user data which was previously set.
[in]ctx_user_dataContext's user data which was previously set.

Definition at line 128 of file doca_sync_event.h.

◆ doca_sync_event_task_notify_set_completion_cb_t

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.

See doca_task_completion_cb_t doc.

Parameters
[in]taskThe successfully completed sync event set task. The implementation can assume se_task is not NULL.
[in]task_user_dataTask's user data which was previously set.
[in]ctx_user_dataContext's user data which was previously set.

Definition at line 111 of file doca_sync_event.h.

◆ doca_sync_event_task_wait_eq_completion_cb_t

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.

See doca_task_completion_cb_t doc.

Parameters
[in]taskThe successfully completed sync event wait eq task. The implementation can assume se_task is not NULL.
[in]task_user_dataTask's user data which was previously set.
[in]ctx_user_dataContext's user data which was previously set.

Definition at line 145 of file doca_sync_event.h.

◆ doca_sync_event_task_wait_neq_completion_cb_t

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.

See doca_task_completion_cb_t doc.

Parameters
[in]taskThe successfully completed sync event wait neq task. The implementation can assume se_task is not NULL.
[in]task_user_dataTask's user data which was previously set.
[in]ctx_user_dataContext's user data which was previously set.

Definition at line 162 of file doca_sync_event.h.

Function Documentation

◆ doca_sync_event_add_publisher_location_cpu()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
[in]devdoca_dev instance associated with CPU.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_add_publisher_location_dpa()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
[in]dpadoca_dpa instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_add_publisher_location_gpu()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
[in]gpudoca_gpu instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_add_publisher_location_remote_net()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_add_publisher_location_remote_pci()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_add_subscriber_location_cpu()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_cpu ( struct doca_sync_event *  event,
struct doca_dev *  dev 
)

Associate a CPU device context as the doca_sync_event subscriber,

Parameters
[in]eventTarget doca_sync_event instance to set.
[in]devdoca_dev instance associated with CPU.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_add_subscriber_location_dpa()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
[in]dpadoca_dpa instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_add_subscriber_location_gpu()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
[in]gpudoca_gpu instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_add_subscriber_location_remote_pci()

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.

Parameters
[in]eventTarget doca_sync_event instance to set.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_as_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_sync_event_as_ctx ( struct doca_sync_event *  event)

Convert a Sync Event to a DOCA context.

Set the Sync Event to operate as a DOCA Context only, hence it can be interacted with through the supported DOCA Context API.

Sync Event CTX supports the following operations: start/stop/get_event_driven_supported. A device can't be attached to a sync event ctx.

A user can use an attached (to Sync Event CTX) DOCA PE to perform operations on the underlying Sync Event asynchronously by submitting tasks to the attached DOCA PE

It is suggested to use Sync Event in this mode to wait on a Sync Event in a blocking manner.

Parameters
[in]eventThe doca_sync_event to be converted
Returns
The matching doca_ctx instance in case of success, NULL otherwise.

◆ doca_sync_event_cap_is_create_from_export_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_create_from_export_supported ( const struct doca_devinfo *  devinfo)

Check if given device is capable of creating Sync Event from an export.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports creating Sync Event from an export. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support importing an exported Sync Event.

◆ doca_sync_event_cap_is_export_to_dpa_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_dpa_supported ( const struct doca_devinfo *  devinfo)

Check if a DOCA device is capable of exporting an associated Sync Event to the DPA using doca_sync_event_get_dpa_handle.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports exporting an associated Sync Event to DPA. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support exporting an associated Sync Event to DPA.

◆ doca_sync_event_cap_is_export_to_gpu_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_gpu_supported ( const struct doca_devinfo *  devinfo)

Check if a DOCA device is capable of exporting an associated Sync Event to the GPU using doca_sync_event_get_gpu_handle.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports exporting an associated Sync Event to GPU. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support exporting an associated Sync Event to GPU.

◆ doca_sync_event_cap_is_export_to_remote_net_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_remote_net_supported ( const struct doca_devinfo *  devinfo)

Check if a DOCA device is capable of exporting an associated Sync Event to a remote peer using doca_sync_event_export_to_remote_net.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports exporting an associated Sync Event to a remote peer. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support exporting an associated Sync Event to a remote peer.

◆ doca_sync_event_cap_is_export_to_remote_pci_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_remote_pci_supported ( const struct doca_devinfo *  devinfo)

Check if a DOCA device is capable of exporting an associated Sync Event to remote PCI using doca_sync_event_export_to_remote_pci.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports exporting an associated Sync Event to remote PCI. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support exporting an associated Sync Event to remote PCI.

◆ doca_sync_event_cap_remote_net_is_create_from_export_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_create_from_export_supported ( const struct doca_devinfo *  devinfo)

Check if given device is capable of creating a remote Sync Event from an export.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports creating a remote Sync Event from an export. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support creating remote sync event from an exported Sync Event.

◆ doca_sync_event_cap_remote_net_is_export_to_dpa_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_export_to_dpa_supported ( const struct doca_devinfo *  devinfo)

Check if a DOCA device is capable of exporting an associated remote Sync Event to the DPA using doca_sync_event_remote_net_get_dpa_handle.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports exporting an associated Sync Event to DPA. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support exporting an associated remote Sync Event to DPA.

◆ doca_sync_event_cap_remote_net_is_export_to_gpu_supported()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_export_to_gpu_supported ( const struct doca_devinfo *  devinfo)

Check if a DOCA device is capable of exporting an associated remote Sync Event to the GPU using doca_sync_event_remote_net_get_gpu_handle.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports exporting an associated Sync Event to GPU. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support exporting an associated remote Sync Event to GPU.

◆ doca_sync_event_cap_task_get_is_supported()

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.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports submitting a sync event get task. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support submitting a sync event get task.

◆ doca_sync_event_cap_task_notify_add_is_supported()

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.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports submitting a sync event notify-add task. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support submitting a sync event notify-add task.

◆ doca_sync_event_cap_task_notify_set_is_supported()

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.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports submitting a sync event notify-set task. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support submitting a sync event notify-set task.

◆ doca_sync_event_cap_task_wait_eq_is_supported()

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.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports submitting a sync event wait-equal task. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support submitting a sync event wait-equal task.

◆ doca_sync_event_cap_task_wait_neq_is_supported()

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.

Parameters
[in]devinfoThe DOCA device information.
Returns
DOCA_SUCCESS - in case device supports submitting a sync event wait-not-equal task. Error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support submitting a sync event wait-not-equal task.

◆ doca_sync_event_create()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_create ( struct doca_sync_event **  event)

Create a Sync Event handle.

Creates CPU handle - Host CPU or DPU's CPU.

Parameters
[out]eventThe created doca_sync_event instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_sync_event.

◆ doca_sync_event_create_from_export()

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.

Creates a remote PCI handle. The DOCA Device should be capable of importing an exported Sync Event (see doca_sync_event_cap_is_create_from_export_supported capability).

Note
The Sync Event can not be configured.
Parameters
[in]devdoca_dev instance to be attached to the create doca_sync_event.
[in]dataExported doca_sync_event data stream, created by doca_sync_event_export_to_remote_pci call.
[in]szSize of exported doca_sync_event data stream, created by doca_sync_event_export_to_remote_pci call.
[out]eventThe created doca_sync_event instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided doca_dev does not support creating Sync Event from export.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_sync_event.

◆ doca_sync_event_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_destroy ( struct doca_sync_event *  event)

Destroy a Sync Event instance.

Parameters
[in]eventdoca_sync_event to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_export_to_remote_net()

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.

Create export data stream used for synchronize between the origin system to a remote peer. Sync Event should be properly configured, publisher must be declared as remote net location. The underlying DOCA Device should be capable of exporting to a remote net (see doca_sync_event_get_export_to_remote_net_supported capability).

The exported data stream should be used on a remote peer to created a Sync Event remote handle. (see doca_sync_event_remote_net_create_from_export).

Note
The exported data contains sensitive information - please make sure to pass this data through a secure channel
Parameters
[in]eventTarget doca_sync_event instance to export.
[out]dataThe created export data stream.
[out]szSize of created export data stream.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support this Sync Event action.
  • DOCA_ERROR_NO_MEMORY - failed to alloc data stream.

◆ doca_sync_event_export_to_remote_pci()

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.

Create export data stream used for synchronize between CPU (HOST or DPU) and remote PCI. Sync Event should be properly configured, both subscriber and publisher must be declared as either CPU or remote PCI location. The underlying DOCA Device should be capable of exporting to remote PCI (see doca_sync_event_cap_is_export_to_remote_pci_supported capability).

The exported data stream an be used from the remote PCI to created an exported Sync Event (see doca_sync_event_create_from_export).

Note
The exported data contains sensitive information - please make sure to pass this data through a secure channel
Parameters
[in]eventTarget doca_sync_event instance to export.
[in]devTarget dev to export.
[out]dataThe created export data stream.
[out]szSize of created export data stream.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support this Sync Event action.
  • DOCA_ERROR_NO_MEMORY - failed to alloc data stream.

◆ doca_sync_event_get()

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.

Parameters
[in]eventTarget doca_sync_event instance to read its value.
[out]valueThe returned doca_sync_event value.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_get_dpa_handle()

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.

Create Sync Event DPA handle used for synchronize between the x86 CPU HOST and the DPA. Sync Event should be properly configured, either subscriber or publisher should be declared as DPA location. The underlying DOCA Device should be capable of exporting to DPA (see doca_sync_event_cap_is_export_to_dpa_supported capability). A Sync Event can be exported from the Host CPU only.

The DOCA DPA Sync Event is an handle to be used from the DPA to perform operations on the associated Sync Event.

Parameters
[in]eventTarget doca_sync_event instance to export.
[in]dpaThe associated DOCA DPA Context.
[out]dpa_dev_se_handleDOCA DPA device sync event handle that can be passed to a kernel.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support this Sync Event action.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_dpa_sync_event.

◆ doca_sync_event_get_gpu_handle()

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.

Create Sync Event GPU handle used for synchronize between the x86 CPU HOST and the DPA. Sync Event should be properly configured, either subscriber or publisher should be declared as GPU location. The underlying DOCA Device should be capable of exporting to GPU (see doca_sync_event_cap_is_export_to_gpu_supported capability). A Sync Event can be exported from the Host CPU only.

The DOCA GPU Sync Event is an handle to be used from the GPU to perform operations on the associated Sync Event.

Parameters
[in]eventTarget doca_sync_event instance to export.
[in]gpuThe associated DOCA GPU Context.
[out]gpu_dev_seDOCA GPU device sync event handle that can be passed to a kernel.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support this Sync Event action.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_gpu_sync_event.

◆ doca_sync_event_remote_net_create_from_export()

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.

Creates a remote handle. The DOCA Device should be capable of importing an exported Sync Event (see doca_sync_event_cap_remote_net_is_create_from_export_supported capability).

Note
The Sync Event can not be configured.
Parameters
[in]devdoca_dev instance to be attached to the create doca_sync_event.
[in]dataExported doca_sync_event data stream, created by doca_sync_event_export_to_remote_net call.
[in]szSize of exported doca_sync_event data stream, created by doca_sync_event_export_to_remote_net call.
[out]eventThe created doca_sync_event instance.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_NOT_SUPPORTED - provided doca_dev does not support creating a remote Sync Event from export.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_sync_event_remote_net.

◆ doca_sync_event_remote_net_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_sync_event_remote_net_destroy ( struct doca_sync_event_remote_net *  event)

Destroy a Sync Event instance.

Parameters
[in]eventdoca_sync_event_remote_net to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_remote_net_get_dpa_handle()

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.

Create remote Sync Event DPA handle used for synchronize between a remote peer and the local DPA. The underlying DOCA Device should be capable of exporting a remote sync event to DPA (see doca_sync_event_cap_remote_net_is_export_to_dpa_supported capability). A Sync Event can be exported from the Host CPU only.

The DOCA DPA Remote Sync Event is an handle to be used from the DPA to perform operations on the associated remote Sync Event.

Parameters
[in]eventTarget doca_sync_event_remote_net instance to export.
[in]dpaThe associated DOCA DPA Context.
[out]dpa_remote_eventDOCA DPA device remote sync event handle that can be passed to a kernel.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support this Sync Event action.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_dpa_dev_sync_event_remote_net_t.

◆ doca_sync_event_remote_net_get_gpu_handle()

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.

Create remote Sync Event GPU handle used for synchronize between a remote peer and the local GPU. The underlying DOCA Device should be capable of exporting a remote sync event to GPU (see doca_sync_event_cap_remote_net_is_export_to_gpu_supported capability). A Sync Event can be exported from the Host CPU only.

The DOCA GPU Remote Sync Event is an handle to be used from the GPU to perform operations on the associated remote Sync Event.

Parameters
[in]eventTarget doca_sync_event_remote_net instance to export.
[in]gpuThe associated DOCA GPU Context.
[out]gpu_remote_eventDOCA GPU device remote sync event handle that can be passed to a kernel.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.
  • DOCA_ERROR_NOT_SUPPORTED - provided devinfo does not support this Sync Event action.
  • DOCA_ERROR_NO_MEMORY - failed to alloc doca_gpu_dev_sync_event_remote_net_t .

◆ doca_sync_event_set_addr()

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.

Parameters
[in]eventPointer to a sync event instance to be configured.
[in]addrPointer to an 8-bytes memory - should points to a memory on the same address space where the sync event was created (using doca_sync_event_create)
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_BAD_STATE - setting address for event which has already been started is not allowed.
  • DOCA_ERROR_NOT_SUPPORTED - addr is in unsupported address space.

◆ doca_sync_event_set_doca_buf()

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.

The DOCA buffer can be associated with a dma_buf fd by using mmap dmabuf feature Allows Thread-to-Thread, Process-to-Process, VM-to-VM notifications on the same PCI domain by sharing (using the below API) this buffer with multiple DOCA Sync Event instances. DOCA Sync Event then uses this buffer to store its value

User may utilize doca_mmap and doca_buf dmabuf feature to access GPU memory within the host.

Parameters
[in]eventPointer to se event instance to be configured.
[in]bufA DOCA buffer.
Note
Buffer must be configured with read, write and atomic permissions (local and remote). For exporting the sync event, remote pci read/write permissions should be set too. Data section of the given doca_buf must be 8-bytes length. Buffer list is not supported.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received invalid input.
  • DOCA_ERROR_BAD_STATE - setting address for event which has already been started is not allowed.
  • DOCA_ERROR_NOT_PERMITTED - invalid buffer permissions or length

◆ doca_sync_event_start()

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.

Starting a Sync Event with doca_sync_event_start means it can't be operate as (and converted to) DOCA Context.

Parameters
[in]eventPointer to se event instance to be started.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_stop()

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'.

Parameters
[in]eventPointer to se event instance to be stopped.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - event argument is a NULL pointer.

◆ doca_sync_event_task_get_alloc_init()

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.

Note
This task gets the value of the sync event.
Parameters
[in]eventThe associated sync event.
[in]ret_val_ptrA pointer to the return value.
[in]user_datadoca_data to attach the task, which is later passed to the task's completion CBs.
[out]taskThe allocated get task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_sync_event_task_get_as_doca_task()

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.

Parameters
[in]taskThe doca sync event get task.
Returns
The matching doca task in case of success, NULL otherwise.

◆ doca_sync_event_task_get_get_ret_val_ptr()

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.

Parameters
[in]taskThe task to get its return value pointer.
Returns
The task's return value pointer.

◆ doca_sync_event_task_get_set_conf()

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.

Parameters
[in]eventThe associated sync event.
[in]completion_cbThe get task completion callback.
[in]error_cbThe get task error callback.
[in]num_tasksNumber of sync event's inflight get tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received null parameter.
  • DOCA_ERROR_NOT_PERMITTED - context not in idle state.

◆ doca_sync_event_task_get_set_ret_val_ptr()

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.

Parameters
[in]taskThe task to set.
[in]ret_val_ptrThe return value pointer to set.

◆ doca_sync_event_task_notify_add_alloc_init()

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.

Note
This task atomically increment the value of the sync event by a given value.
Parameters
[in]eventThe associated sync event.
[in]inc_valA value to increment the sync event by.
[in]fetched_val_ptrA pointer to the fetched sync event value (prior to the increment).
[in]user_datadoca_data to attach the task, which is later passed to the task's completion CBs.
[out]taskThe allocated notify-add task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_sync_event_task_notify_add_as_doca_task()

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.

Parameters
[in]taskThe doca sync event notify-add task.
Returns
The matching doca task in case of success, NULL otherwise.

◆ doca_sync_event_task_notify_add_get_fetched_val_ptr()

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.

Parameters
[in]taskThe task to get its fetched value pointer.
Returns
The task's fetched value pointer.

◆ doca_sync_event_task_notify_add_get_inc_val()

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.

Parameters
[in]taskThe doca sync event notify-add task.
Returns
The task's increment value.

◆ doca_sync_event_task_notify_add_set_conf()

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.

Parameters
[in]eventThe associated sync event
[in]completion_cbThe get task completion callback
[in]error_cbThe get task error callback
[in]num_tasksNumber of sync event's inflight notify-add tasks
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received null parameter.
  • DOCA_ERROR_NOT_PERMITTED - context not in idle state.

◆ doca_sync_event_task_notify_add_set_fetched_val_ptr()

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.

Parameters
[in]taskThe task to set.
[in]fetched_val_ptrThe fetched value pointer to set.

◆ doca_sync_event_task_notify_add_set_inc_val()

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.

Parameters
[in]taskThe task to set.
[in]inc_valThe increment value to set.

◆ doca_sync_event_task_notify_set_alloc_init()

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.

Note
This task sets the value of the sync event to a given value.
Parameters
[in]eventThe associated sync event.
[in]set_valA value to set the sync event to.
[in]user_datadoca_data to attach the task, which is later passed to the task's completion CBs.
[out]taskThe allocated notify-set task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_sync_event_task_notify_set_as_doca_task()

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.

Parameters
[in]taskThe doca sync event notify-set task.
Returns
The matching doca task in case of success, NULL otherwise.

◆ doca_sync_event_task_notify_set_get_set_val()

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.

Parameters
[in]taskThe doca sync event notify-set task.
Returns
The task's set value.

◆ doca_sync_event_task_notify_set_set_conf()

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.

Parameters
[in]eventThe associated sync event.
[in]completion_cbThe get task completion callback.
[in]error_cbThe get task error callback.
[in]num_tasksNumber of sync event's inflight notify-set tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received null parameter.
  • DOCA_ERROR_NOT_PERMITTED - context not in idle state.

◆ doca_sync_event_task_notify_set_set_set_val()

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.

Parameters
[in]taskThe task to set.
[in]set_valThe set value to set.

◆ doca_sync_event_task_wait_eq_alloc_init()

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.

Note
This task applies a given mask on the sync event value and waits for the result to be equal to a given value.
Parameters
[in]eventThe associated sync event.
[in]wait_valThreshold to wait for the Sync Event to be equal to.
[in]maskMask for comparing the Sync Event value - mask must be consistent only of 0, 1, 2, 4 or 8 consecutive FFs.
[in]user_datadoca_data to attach the task, which is later passed to the task's completion CBs.
[out]taskThe allocated wait-equal task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_sync_event_task_wait_eq_as_doca_task()

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.

Parameters
[in]taskThe doca sync event wait-equal task.
Returns
The matching doca task in case of success, NULL otherwise.

◆ doca_sync_event_task_wait_eq_get_mask()

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.

Parameters
[in]taskThe doca sync event wait-equal task.
Returns
The task's mask.

◆ doca_sync_event_task_wait_eq_get_wait_val()

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.

Parameters
[in]taskThe doca sync event wait-equal task.
Returns
The task's wait value.

◆ doca_sync_event_task_wait_eq_set_conf()

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.

Parameters
[in]eventThe associated sync event.
[in]completion_cbThe get task completion callback.
[in]error_cbThe get task error callback.
[in]num_tasksNumber of sync event's inflight wait-equal tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received null parameter.
  • DOCA_ERROR_NOT_PERMITTED - context not in idle state.

◆ doca_sync_event_task_wait_eq_set_mask()

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.

Parameters
[in]taskThe task to set.
[in]maskThe mask to set.

◆ doca_sync_event_task_wait_eq_set_wait_val()

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.

Parameters
[in]taskThe task to set.
[in]wait_valThe wait value to set.

◆ doca_sync_event_task_wait_neq_alloc_init()

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.

Note
This task applies a given mask on the sync event value and waits for the result to be different than a given value.
Parameters
[in]eventThe associated sync event.
[in]wait_valThreshold to wait for the Sync Event to be different than.
[in]maskMask for comparing the Sync Event value - mask must be consistent only of 0, 1, 2, 4 or 8 consecutive FFs.
[in]user_datadoca_data to attach the task, which is later passed to the task's completion CBs.
[out]taskThe allocated wait-not-equal task.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NO_MEMORY - no more tasks to allocate.

◆ doca_sync_event_task_wait_neq_as_doca_task()

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.

Parameters
[in]taskThe doca sync event wait-not-equal task.
Returns
The matching doca task in case of success, NULL otherwise.

◆ doca_sync_event_task_wait_neq_get_mask()

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.

Parameters
[in]taskThe doca sync event wait-not-equal task.
Returns
The task's mask.

◆ doca_sync_event_task_wait_neq_get_wait_val()

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.

Parameters
[in]taskThe doca sync event wait-not-equal task.
Returns
The task's wait value.

◆ doca_sync_event_task_wait_neq_set_conf()

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.

Parameters
[in]eventThe associated sync event.
[in]completion_cbThe get task completion callback.
[in]error_cbThe get task error callback.
[in]num_tasksNumber of sync event's inflight wait-not-equal tasks.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - received null parameter.
  • DOCA_ERROR_NOT_PERMITTED - context not in idle state.

◆ doca_sync_event_task_wait_neq_set_mask()

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.

Parameters
[in]taskThe task to set.
[in]maskThe mask to set.

◆ doca_sync_event_task_wait_neq_set_wait_val()

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.

Parameters
[in]taskThe task to set.
[in]wait_valThe wait value to set.

◆ doca_sync_event_update_add()

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.

Parameters
[in]eventTarget doca_sync_event instance to increment.
[in]valueThe value to increment the doca_sync_event value by.
[out]fetchedThe value of the doca_sync_event before the operation.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_update_set()

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.

Parameters
[in]eventTarget doca_sync_event instance to set its value.
[in]valueThe value to set the doca_sync_event to.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_wait_eq()

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.

Parameters
[in]eventTarget doca_sync_event instance to wait on.
[in]valueThe value to wait for the doca_sync_event to be equal to.
[in]maskMask to apply (bitwise AND) on the doca_sync_event value for comparison with wait threshold.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_wait_eq_yield()

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.

After each polling iteration, call sched_yield sched_yield() causes the calling thread to relinquish the CPU. The thread is moved to the end of the queue for its static priority and a new thread gets to run.

Parameters
[in]eventTarget doca_sync_event instance to wait on.
[in]valueThe value to wait for the doca_sync_event to be equal to.
[in]maskMask to apply (bitwise AND) on the doca_sync_event value for comparison with wait threshold.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_wait_gt()

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.

Parameters
[in]eventTarget doca_sync_event instance to wait on.
[in]valueThe value to wait for the doca_sync_event to be greater than.
[in]maskMask to apply (bitwise AND) on the doca_sync_event value for comparison with wait threshold.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_wait_gt_yield()

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.

After each polling iteration, call sched_yield sched_yield() causes the calling thread to relinquish the CPU. The thread is moved to the end of the queue for its static priority and a new thread gets to run.

Parameters
[in]eventTarget doca_sync_event instance to wait on.
[in]valueThe value to wait for the doca_sync_event to be greater than.
[in]maskMask to apply (bitwise AND) on the doca_sync_event value for comparison with wait threshold.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_wait_neq()

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.

Parameters
[in]eventTarget doca_sync_event instance to wait on.
[in]valueThe value to wait for the doca_sync_event to be not equal to.
[in]maskMask to apply (bitwise AND) on the doca_sync_event value for comparison with wait threshold.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.

◆ doca_sync_event_wait_neq_yield()

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.

After each polling iteration, call sched_yield sched_yield() causes the calling thread to relinquish the CPU. The thread is moved to the end of the queue for its static priority and a new thread gets to run.

Parameters
[in]eventTarget doca_sync_event instance to wait on.
[in]valueThe value to wait for the doca_sync_event to be not equal to.
[in]maskMask to apply (bitwise AND) on the doca_sync_event value for comparison with wait threshold.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - any of the arguments is a NULL pointer.