71 DOCA_LOG_ERR(
"Failed to retrieve set task progress: timeout");
82 (
const uint8_t *)export_data->
se_blob,
104 uint64_t fetched = 0;
106 uint64_t se_value = 1;
108 DOCA_LOG_INFO(
"Waiting for sync event to be signaled from remote side");
144 struct doca_sync_event_task_wait_eq *wait_eq_task;
145 struct doca_sync_event_task_notify_add *notify_add_task;
146 struct doca_sync_event_task_notify_set *notify_set_task;
147 uint64_t fetched = 0;
152 uint64_t se_value = 1;
159 DOCA_LOG_INFO(
"Waiting for sync event to be signaled from remote side");
216 uint8_t *recv_buffer,
218 struct doca_comch_connection *comch_connection)
223 struct doca_ctx *
ctx;
246 memcpy(recv_data->
se_blob, recv_buffer, msg_len);
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)
#define SYNC_EVENT_CC_MAX_MSG_SIZE
#define SYNC_EVENT_CC_TIMEOUT_SEC
static doca_error_t open_doca_device_with_pci(const char *pcie_value, struct doca_dev **retval)
DOCA_STABLE struct doca_comch_server * doca_comch_server_get_server_ctx(const struct doca_comch_connection *connection)
DOCA_STABLE struct doca_ctx * doca_comch_client_as_ctx(struct doca_comch_client *comch_client)
DOCA_STABLE struct doca_comch_client * doca_comch_client_get_client_ctx(const struct doca_comch_connection *connection)
DOCA_STABLE struct doca_ctx * doca_comch_server_as_ctx(struct doca_comch_server *comch_server)
DOCA_STABLE doca_error_t doca_ctx_get_user_data(const struct doca_ctx *ctx, union doca_data *user_data)
get user data from context
@ 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 uint8_t doca_pe_progress(struct doca_pe *pe)
Run the 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_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_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_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_cap_is_create_from_export_supported(const struct doca_devinfo *devinfo)
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_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 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.
char se_blob[SYNC_EVENT_CC_MAX_MSG_SIZE]
char rep_pci_addr[DOCA_DEVINFO_REP_PCI_ADDR_SIZE]
char dev_pci_addr[DOCA_DEVINFO_PCI_ADDR_SIZE]
struct doca_pe * comch_pe
doca_comch_event_msg_recv_cb_t comch_recv_event_cb
struct doca_sync_event * se
struct doca_dev_rep * rep
static doca_error_t se_init(struct export_blob *export_data, struct sync_event_runtime_objects *se_rt_objs)
static doca_error_t sync_event_get_create_from_export_supported(struct doca_devinfo *devinfo)
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)
Convenience type for representing opaque data.
struct upf_accel_ctx * ctx