89 const uint8_t *se_blob =
NULL;
90 size_t se_blob_sz = 0;
91 struct doca_comch_task_send *task;
99 DOCA_LOG_INFO(
"Sending exported DOCA Sync Event to remote side");
126 DOCA_LOG_INFO(
"Exported DOCA Sync Event has been sent to remote side successfully");
141 uint64_t fetched = 0;
142 uint64_t se_value = 1;
158 DOCA_LOG_INFO(
"Waiting for sync event to be signaled from remote side");
181 struct doca_sync_event_task_wait_eq *wait_eq_task;
182 struct doca_sync_event_task_notify_add *notify_add_task;
183 struct doca_sync_event_task_notify_set *notify_set_task;
184 uint64_t fetched = 0;
187 uint64_t se_value = 1;
230 DOCA_LOG_INFO(
"Waiting for sync event to be signaled from remote side");
247 uint8_t *recv_buffer,
249 struct doca_comch_connection *comch_connection)
255 (void)comch_connection;
doca_error_t open_doca_device_rep_with_pci(struct doca_dev *local, enum doca_devinfo_rep_filter filter, const char *pci_addr, struct doca_dev_rep **retval)
void sync_event_tear_down(struct sync_event_runtime_objects *se_rt_objs)
doca_error_t sync_event_async_task_submit(struct sync_event_runtime_objects *se_rt_objs, struct doca_task *se_task)
doca_error_t sync_event_start_async(const struct sync_event_config *se_cfg, struct sync_event_runtime_objects *se_rt_objs)
doca_error_t sync_event_cc_handshake(struct sync_event_runtime_objects *se_rt_objs)
doca_error_t sync_event_config_validate(const struct sync_event_config *se_cfg, const struct sync_event_runtime_objects *se_rt_objs)
static doca_error_t open_doca_device_with_pci(const char *pcie_value, struct doca_dev **retval)
DOCA_STABLE doca_error_t doca_comch_client_task_send_alloc_init(struct doca_comch_client *comch_client, struct doca_comch_connection *peer, const void *msg, uint32_t len, struct doca_comch_task_send **task)
DOCA_STABLE struct doca_task * doca_comch_task_send_as_task(struct doca_comch_task_send *task)
DOCA_STABLE doca_error_t doca_comch_server_task_send_alloc_init(struct doca_comch_server *comch_server, struct doca_comch_connection *peer, const void *msg, uint32_t len, struct doca_comch_task_send **task)
@ DOCA_DEVINFO_REP_FILTER_NET
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
#define DOCA_LOG_INFO(format,...)
Generates an INFO application log message.
DOCA_STABLE doca_error_t doca_task_submit(struct doca_task *task)
Submit a task to a progress engine.
DOCA_STABLE void doca_task_free(struct doca_task *task)
Free a task back to where it was allocated from.
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_add_publisher_location_remote_pci(struct doca_sync_event *event)
Declare Sync Event publisher as remote pci.
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_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 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 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_is_export_to_remote_pci_supported(const struct doca_devinfo *devinfo)
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 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_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 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_subscriber_location_cpu(struct doca_sync_event *event, struct doca_dev *dev)
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.
char rep_pci_addr[DOCA_DEVINFO_REP_PCI_ADDR_SIZE]
char dev_pci_addr[DOCA_DEVINFO_PCI_ADDR_SIZE]
struct doca_comch_connection * comch_connection
struct doca_comch_server * server
doca_comch_event_msg_recv_cb_t comch_recv_event_cb
struct doca_comch_client * client
struct doca_sync_event * se
struct doca_dev_rep * rep
static doca_error_t se_export(struct sync_event_runtime_objects *se_rt_objs)
static doca_error_t se_init(struct sync_event_runtime_objects *se_rt_objs)
static doca_error_t se_communicate_sync(const struct sync_event_config *se_cfg, struct sync_event_runtime_objects *se_rt_objs)
doca_error_t sync_event_run(const struct sync_event_config *se_cfg, struct sync_event_runtime_objects *se_rt_objs)
static void comch_recv_event_cb(struct doca_comch_event_msg_recv *event, uint8_t *recv_buffer, uint32_t msg_len, struct doca_comch_connection *comch_connection)
DOCA_LOG_REGISTER(SYNC_EVENT::SAMPLE)
static doca_error_t se_communicate_async(const struct sync_event_config *se_cfg, struct sync_event_runtime_objects *se_rt_objs)
doca_error_t sync_event_get_export_to_dpu_supported(struct doca_devinfo *devinfo)
Convenience type for representing opaque data.