26 #ifndef DOCA_SYNC_EVENT_H_
27 #define DOCA_SYNC_EVENT_H_
46 struct doca_sync_event;
47 struct doca_sync_event_remote_net;
49 struct doca_dpa_sync_event;
63 struct doca_gpu_sync_event;
75 struct doca_sync_event_task_get;
76 struct doca_sync_event_task_notify_set;
77 struct doca_sync_event_task_notify_add;
78 struct doca_sync_event_task_wait_eq;
79 struct doca_sync_event_task_wait_neq;
218 struct doca_sync_event **event);
270 struct doca_sync_event_remote_net **event);
630 uint64_t *ret_val_ptr,
632 struct doca_sync_event_task_get **task);
731 struct doca_sync_event_task_notify_set **task);
831 uint64_t *fetched_val_ptr,
833 struct doca_sync_event_task_notify_add **task);
880 uint64_t *fetched_val_ptr);
960 struct doca_sync_event_task_wait_eq **task);
1057 uint32_t num_tasks);
1086 struct doca_sync_event_task_wait_neq **task);
1182 struct doca_dev *dev,
1183 const uint8_t **data,
1233 struct doca_dpa *dpa,
1283 struct doca_gpu *gpu,
1382 struct doca_dpa *dpa,
1431 struct doca_gpu *gpu,
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
enum doca_error doca_error_t
DOCA API return codes.
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.
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.
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.
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.
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_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.
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_remote_net_destroy(struct doca_sync_event_remote_net *event)
Destroy a Sync Event instance.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_dpa_supported(const struct doca_devinfo *devinfo)
uint64_t doca_dpa_dev_sync_event_t
DOCA Sync Event DPA handle.
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.
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.
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.
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.
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 wai...
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_create(struct doca_sync_event **event)
Create a Sync Event handle.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_remote_pci_supported(const struct doca_devinfo *devinfo)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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_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 ...
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.
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'.
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.
DOCA_EXPERIMENTAL struct doca_ctx * doca_sync_event_as_ctx(struct doca_sync_event *event)
Convert a Sync Event to a DOCA context.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_create_from_export_supported(const struct doca_devinfo *devinfo)
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.
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.
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 periodic...
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.
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_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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_remote_net_is_export_to_gpu_supported(const struct doca_devinfo *devinfo)
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.
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...
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_cap_is_export_to_remote_net_supported(const struct doca_devinfo *devinfo)
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.
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.
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.
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.
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.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_cpu(struct doca_sync_event *event, struct doca_dev *dev)
uint64_t doca_gpu_dev_sync_event_remote_net_t
DOCA Sync Event remote GPU handle.
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.
uint64_t doca_gpu_dev_sync_event_t
DOCA Sync Event GPU handle.
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.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_destroy(struct doca_sync_event *event)
Destroy a Sync Event instance.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
uint64_t doca_dpa_dev_sync_event_remote_net_t
DOCA Sync Event remote DPA handle.
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.
Convenience type for representing opaque data.