28 #include "libflexio/flexio_ver.h"
30 #define DPA_BASIC_INITIATOR_TARGET_FLEXIO_MAJOR_VERSION (25)
31 #define DPA_BASIC_INITIATOR_TARGET_FLEXIO_MINOR_VERSION (4)
32 #define DPA_BASIC_INITIATOR_TARGET_FLEXIO_PATCH_VERSION (0)
34 #define FLEXIO_VER_USED \
35 FLEXIO_VER(DPA_BASIC_INITIATOR_TARGET_FLEXIO_MAJOR_VERSION, \
36 DPA_BASIC_INITIATOR_TARGET_FLEXIO_MINOR_VERSION, \
37 DPA_BASIC_INITIATOR_TARGET_FLEXIO_PATCH_VERSION)
38 #include "libflexio/flexio.h"
42 #define DPA_THREADS_MAX 256
60 char *device_name = (
char *)param;
79 DOCA_LOG_ERR(
"Entered DPA resources file path exceeding the maximum size of %d",
91 const char *
path = (
char *)param;
109 static doca_error_t rdma_device_name_param_callback(
void *param,
void *config)
112 char *device_name = (
char *)param;
130 struct doca_argp_param *pf_device_param;
141 "PF device name that supports DPA (optional). If not provided then a random device will be chosen");
150 struct doca_argp_param *dpa_resources_file_param;
167 struct doca_argp_param *dpa_app_key_param;
185 struct doca_argp_param *rdma_device_param;
196 "device name that supports RDMA (optional). If not provided then a random device will be chosen");
223 const char *rdma_device_name,
224 struct doca_dev **pf_doca_device,
225 struct doca_dev **rdma_doca_device)
227 struct doca_devinfo **dev_list;
228 uint32_t nb_devs = 0;
235 strcmp(pf_device_name, rdma_device_name) == 0) {
236 DOCA_LOG_ERR(
"RDMA DOCA device must be different than PF DOCA device (%s)", pf_device_name);
246 for (i = 0; i < nb_devs; i++) {
261 if (strcmp(ibdev_name, actual_base_ibdev_name) == 0) {
265 strcmp(rdma_device_name, ibdev_name) == 0) {
278 if (*pf_doca_device ==
NULL) {
280 strcmp(pf_device_name, ibdev_name) == 0) {
296 if (*pf_doca_device ==
NULL) {
302 if (*rdma_doca_device ==
NULL) {
307 *rdma_doca_device = *pf_doca_device;
314 struct doca_dev *doca_device,
315 struct doca_sync_event **wait_event)
328 goto destroy_wait_event;
334 goto destroy_wait_event;
340 goto destroy_wait_event;
355 struct doca_dev *doca_device,
356 struct doca_sync_event **comp_event,
370 goto destroy_comp_event;
376 goto destroy_comp_event;
382 goto destroy_comp_event;
385 if (handle !=
NULL) {
389 goto destroy_comp_event;
417 goto destroy_kernel_event;
423 goto destroy_kernel_event;
429 goto destroy_kernel_event;
434 destroy_kernel_event:
455 DOCA_LOG_ERR(
"Failed to set remote net as publisher for DOCA sync event: %s",
457 goto destroy_remote_net_event;
463 goto destroy_remote_net_event;
469 goto destroy_remote_net_event;
474 destroy_remote_net_event:
484 struct doca_dpa *doca_dpa,
485 struct doca_sync_event *remote_net_event,
486 struct doca_sync_event_remote_net **remote_net_exported_event,
490 const uint8_t *remote_net_event_export_data;
491 size_t remote_net_event_export_size;
494 &remote_net_event_export_data,
495 &remote_net_event_export_size);
502 remote_net_event_export_data,
503 remote_net_event_export_size,
504 remote_net_exported_event);
512 remote_net_event_dpa_handle);
515 goto destroy_export_remote_net_event;
520 destroy_export_remote_net_event:
541 file = fopen(
path,
"rb");
545 if (fseek(file, 0, SEEK_END) != 0) {
550 nb_file_bytes = ftell(file);
553 if (nb_file_bytes == -1)
556 if (nb_file_bytes == 0)
559 *file_size = (
size_t)nb_file_bytes;
574 size_t read_byte_count;
576 file = fopen(
path,
"rb");
580 read_byte_count = fread(buffer, 1, *bytes_read, file);
583 if (read_byte_count != *bytes_read)
586 *bytes_read = read_byte_count;
602 uint32_t *threads_list,
603 uint32_t *threads_num)
607 struct flexio_resource *res;
617 file_buffer = (
char *)malloc(bytes_read);
618 if (file_buffer ==
NULL) {
619 DOCA_LOG_ERR(
"Error: Failed to allocate memory for DPA resources file");
631 const char *app_key =
cfg->dpa_app_key;
632 flexio_status res_created = flexio_resources_create(app_key, file_buffer, bytes_read, &res);
633 if (res_created != FLEXIO_STATUS_SUCCESS) {
634 DOCA_LOG_ERR(
"Error: Failed creating DPA resources object!");
639 int num_eu_groups = flexio_resources_get_eugs_num(res);
640 if (num_eu_groups > 0) {
641 DOCA_LOG_ERR(
"Execution unit groups are currently unsupported!");
643 flexio_resources_destroy(res);
647 uint32_t num_eus = flexio_resources_get_eus_num(res);
648 uint32_t *eus = flexio_resources_get_eus(res);
650 DOCA_LOG_INFO(
"Info: Found %d execution units in DPA resources file", num_eus);
651 for (uint32_t i = 0; i < num_eus; i++) {
652 threads_list[i] = eus[i];
654 *threads_num = num_eus;
655 flexio_resources_destroy(res);
664 uint32_t threads_num = 0;
668 cfg->rdma_device_name,
685 goto destroy_doca_dpa;
691 goto destroy_doca_dpa;
701 goto destroy_doca_dpa;
707 goto destroy_rdma_doca_dpa;
718 if (get_execution_ids_status ==
DOCA_SUCCESS && threads_num > 0) {
719 resources->affinities = malloc(threads_num *
sizeof(
struct doca_dpa_eu_affinity *));
721 DOCA_LOG_ERR(
"Failed to allocate memory for affinities");
722 goto destroy_doca_dpa;
726 for (uint32_t i = 0; i < threads_num; ++i) {
729 DOCA_LOG_ERR(
"Function doca_dpa_eu_affinity_create failed (%s)",
731 goto destroy_target_thread_affinity;
736 DOCA_LOG_ERR(
"Function doca_dpa_eu_affinity_set failed (%s)",
738 goto destroy_target_thread_affinity;
746 destroy_rdma_doca_dpa:
750 destroy_target_thread_affinity:
751 for (uint32_t i = 0; i < threads_num; ++i) {
774 for (uint32_t i = 0; i <
resources->num_affinities; ++i) {
777 DOCA_LOG_ERR(
"Function doca_dpa_eu_affinity_destroy failed: %s",
837 DOCA_LOG_ERR(
"Function doca_dpa_thread_set_local_storage failed (%s)",
847 DOCA_LOG_ERR(
"Function doca_dpa_thread_set_affinity failed (%s)",
892 DOCA_LOG_ERR(
"Function doca_dpa_completion_set_thread failed (%s)",
934 notification_completion_obj->
thread,
937 DOCA_LOG_ERR(
"Function doca_dpa_notification_completion_create failed (%s)",
944 DOCA_LOG_ERR(
"Function doca_dpa_notification_completion_start failed (%s)",
951 &(notification_completion_obj->
handle));
953 DOCA_LOG_ERR(
"Function doca_dpa_notification_completion_get_dpa_handle failed (%s)",
968 DOCA_LOG_ERR(
"Function doca_dpa_notification_completion_destroy failed (%s)",
1012 DOCA_LOG_ERR(
"Function doca_rdma_set_recv_queue_size failed (%s)\n",
1022 DOCA_LOG_ERR(
"Function doca_rdma_task_receive_set_dst_buf_list_len failed (%s)\n",
1041 DOCA_LOG_ERR(
"Function doca_rdma_set_max_num_connections failed (%s)\n",
char path[MAX_PATH_LEN+1]
doca_error_t dpa_rdma_obj_destroy(struct dpa_rdma_obj *dpa_rdma_obj)
Destroy DPA RDMA.
doca_error_t export_doca_remote_net_sync_event_to_dpa(struct doca_dev *doca_device, struct doca_dpa *doca_dpa, struct doca_sync_event *remote_net_event, struct doca_sync_event_remote_net **remote_net_exported_event, doca_dpa_dev_sync_event_remote_net_t *remote_net_event_dpa_handle)
Create DOCA sync event to be published by a remote net and subscribed by the CPU.
doca_error_t dpa_notification_completion_obj_init(struct dpa_notification_completion_obj *notification_completion_obj)
Initialize DPA notification completion.
doca_error_t destroy_dpa_resources(struct dpa_resources *resources)
Destroy DOCA DPA resources.
static doca_error_t dpa_app_key_param_callback(void *param, void *config)
doca_error_t dpa_rdma_obj_start(struct dpa_rdma_obj *dpa_rdma_obj)
Start DPA RDMA.
doca_error_t register_dpa_params(void)
Register the command line parameters for the sample.
doca_error_t dpa_thread_obj_init(struct dpa_thread_obj *dpa_thread_obj)
Initialize DPA thread.
static doca_error_t get_eu_ids_from_resources_file(struct dpa_config *cfg, uint32_t *threads_list, uint32_t *threads_num)
Get execution unit IDs from FlexIO resources.
doca_error_t dpa_notification_completion_obj_destroy(struct dpa_notification_completion_obj *notification_completion_obj)
Destroy DPA notification completion.
doca_error_t create_doca_dpa_wait_sync_event(struct doca_dpa *doca_dpa, struct doca_dev *doca_device, struct doca_sync_event **wait_event)
Create DOCA sync event to be published by the CPU and subscribed by the DPA.
doca_error_t doca_mmap_obj_destroy(struct doca_mmap_obj *doca_mmap_obj)
Destroy DOCA Mmap.
DOCA_LOG_REGISTER(DPA_COMMON)
doca_error_t dpa_completion_obj_init(struct dpa_completion_obj *dpa_completion_obj)
Initialize DPA completion.
struct doca_dpa_app * dpa_sample_app
static doca_error_t pf_device_name_param_callback(void *param, void *config)
doca_error_t allocate_dpa_resources(struct dpa_config *cfg, struct dpa_resources *resources)
Allocate DOCA DPA resources.
doca_error_t create_doca_remote_net_sync_event(struct doca_dev *doca_device, struct doca_sync_event **remote_net_event)
Create DOCA sync event to be published by a remote net and subscribed by the CPU.
static doca_error_t read_file_into_buffer(const char *path, char *buffer, size_t *bytes_read)
Read file content into a pre-allocated buffer.
doca_error_t dpa_rdma_obj_init(struct dpa_rdma_obj *dpa_rdma_obj)
Initialize DPA RDMA without starting it.
static doca_error_t open_dpa_device(const char *pf_device_name, const char *rdma_device_name, struct doca_dev **pf_doca_device, struct doca_dev **rdma_doca_device)
doca_error_t create_doca_dpa_completion_sync_event(struct doca_dpa *doca_dpa, struct doca_dev *doca_device, struct doca_sync_event **comp_event, doca_dpa_dev_sync_event_t *handle)
Create DOCA sync event to be published by the DPA and subscribed by the CPU.
doca_error_t doca_mmap_obj_init(struct doca_mmap_obj *doca_mmap_obj)
Initialize DOCA Mmap.
doca_error_t dpa_completion_obj_destroy(struct dpa_completion_obj *dpa_completion_obj)
Destroy DPA completion.
static doca_error_t get_file_size(const char *path, size_t *file_size)
Get the size of a file.
doca_error_t dpa_thread_obj_destroy(struct dpa_thread_obj *dpa_thread_obj)
Destroy DPA thread.
static doca_error_t dpa_resources_file_param_callback(void *param, void *config)
doca_error_t create_doca_dpa_kernel_sync_event(struct doca_dpa *doca_dpa, struct doca_sync_event **kernel_event)
Create DOCA sync event to be published and subscribed by the DPA.
#define DEVICE_DEFAULT_NAME
device default name
#define DPA_APP_KEY_MAX_SIZE
DPA application key size.
#define DPA_RESOURCES_PATH_MAX_SIZE
DPA resources file path size.
struct rdma_resources resources
DOCA_EXPERIMENTAL void doca_argp_param_set_description(struct doca_argp_param *param, const char *description)
Set the description of the program param, used during program usage.
DOCA_EXPERIMENTAL void doca_argp_param_set_long_name(struct doca_argp_param *param, const char *name)
Set the long name of the program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_arguments(struct doca_argp_param *param, const char *arguments)
Set the description of the expected arguments of the program param, used during program usage.
DOCA_EXPERIMENTAL void doca_argp_param_set_callback(struct doca_argp_param *param, doca_argp_param_cb_t callback)
Set the callback function of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_param_create(struct doca_argp_param **param)
Create new program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_type(struct doca_argp_param *param, enum doca_argp_type type)
Set the type of the param arguments.
DOCA_EXPERIMENTAL void doca_argp_param_set_short_name(struct doca_argp_param *param, const char *name)
Set the short name of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_register_param(struct doca_argp_param *input_param)
Register a program flag.
DOCA_STABLE doca_error_t doca_ctx_start(struct doca_ctx *ctx)
Finalizes all configurations, and starts the DOCA CTX.
DOCA_EXPERIMENTAL doca_error_t doca_ctx_set_datapath_on_dpa(struct doca_ctx *ctx, struct doca_dpa *dpa_dev)
This function binds the DOCA context to a dpa device.
DOCA_STABLE doca_error_t doca_ctx_stop(struct doca_ctx *ctx)
Stops the context allowing reconfiguration.
DOCA_STABLE doca_error_t doca_devinfo_create_list(struct doca_devinfo ***dev_list, uint32_t *nb_devs)
Creates list of all available local devices.
DOCA_STABLE doca_error_t doca_devinfo_get_ibdev_name(const struct doca_devinfo *devinfo, char *ibdev_name, uint32_t size)
Get the name of the IB device represented by a DOCA devinfo.
#define DOCA_DEVINFO_IBDEV_NAME_SIZE
Buffer size to hold Infiniband/RoCE device name. Including a null terminator.
DOCA_STABLE doca_error_t doca_devinfo_destroy_list(struct doca_devinfo **dev_list)
Destroy list of local device info structures.
DOCA_STABLE doca_error_t doca_dev_open(struct doca_devinfo *devinfo, struct doca_dev **dev)
Initialize local device for use.
DOCA_STABLE doca_error_t doca_dev_close(struct doca_dev *dev)
Destroy allocated local device instance.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_start(struct doca_dpa_notification_completion *notify_comp)
Start DPA notification completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_create(struct doca_dpa *dpa, struct doca_dpa_thread **dpa_thread)
Create DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_destroy(struct doca_dpa_completion *dpa_comp)
Destroy DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_create(struct doca_dev *dev, struct doca_dpa **dpa)
Create a DOCA DPA Context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_destroy(struct doca_dpa_notification_completion *notify_comp)
Destroy DPA notification completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_get_dpa_handle(struct doca_dpa *dpa, doca_dpa_dev_t *handle)
Get DPA context handle.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_set_thread(struct doca_dpa_completion *dpa_comp, struct doca_dpa_thread *dpa_thread)
Set DPA completion context thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_device_extend(struct doca_dpa *dpa, struct doca_dev *other_dev, struct doca_dpa **extended_dpa)
Create an extended DPA context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_create(struct doca_dpa *dpa, struct doca_dpa_thread *dpa_thread, struct doca_dpa_notification_completion **notify_comp)
Create DPA notification completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_start(struct doca_dpa_completion *dpa_comp)
Start DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_destroy(struct doca_dpa *dpa)
Destroy a DOCA DPA context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_local_storage(struct doca_dpa_thread *dpa_thread, doca_dpa_dev_uintptr_t dev_ptr)
Set DPA thread local storage.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_get_dpa_handle(struct doca_dpa_completion *dpa_comp, doca_dpa_dev_completion_t *handle)
Get DPA completion context handle.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_notification_completion_get_dpa_handle(struct doca_dpa_notification_completion *notify_comp, doca_dpa_dev_notification_completion_t *handle)
Get DPA notification completion context handle.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_completion_create(struct doca_dpa *dpa, unsigned int queue_size, struct doca_dpa_completion **dpa_comp)
Create DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_create(struct doca_dpa *dpa, struct doca_dpa_eu_affinity **affinity)
Create DPA EU affinity.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_start(struct doca_dpa *dpa)
Start a DPA context.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_func_arg(struct doca_dpa_thread *dpa_thread, doca_dpa_func_t *func, uint64_t arg)
Set DPA thread entry point and its argument.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_cap_is_supported(const struct doca_devinfo *devinfo)
Get whether the DOCA device supports DPA.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_set_affinity(struct doca_dpa_thread *dpa_thread, const struct doca_dpa_eu_affinity *affinity)
Set DPA thread affinity.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_destroy(struct doca_dpa_eu_affinity *affinity)
Destroy DPA EU affinity.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_start(struct doca_dpa_thread *dpa_thread)
Start DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_eu_affinity_set(struct doca_dpa_eu_affinity *affinity, unsigned int eu_id)
Set EU ID in DPA EU affinity.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_thread_destroy(struct doca_dpa_thread *dpa_thread)
Destroy DPA thread.
DOCA_EXPERIMENTAL doca_error_t doca_dpa_set_app(struct doca_dpa *dpa, struct doca_dpa_app *app)
Set program app for DPA context.
#define DOCA_ERROR_PROPAGATE(r, t)
Save the first encountered doca_error_t.
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.
@ DOCA_ERROR_INVALID_VALUE
@ DOCA_ERROR_NOT_SUPPORTED
#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_mmap_set_memrange(struct doca_mmap *mmap, void *addr, size_t len)
Set the memory range of DOCA memory map.
DOCA_STABLE doca_error_t doca_mmap_destroy(struct doca_mmap *mmap)
Destroy DOCA Memory Map structure.
DOCA_STABLE doca_error_t doca_mmap_create(struct doca_mmap **mmap)
Allocates zero size memory map object with default/unset attributes.
DOCA_STABLE doca_error_t doca_mmap_set_permissions(struct doca_mmap *mmap, uint32_t access_mask)
Set access flags of the registered memory.
DOCA_STABLE doca_error_t doca_mmap_start(struct doca_mmap *mmap)
Start DOCA Memory Map.
DOCA_EXPERIMENTAL doca_error_t doca_mmap_dev_get_dpa_handle(struct doca_mmap *mmap, const struct doca_dev *dev, doca_dpa_dev_mmap_t *dpa_mmap_handle)
Extract mmap handle associated with the given DOCA device, for the DPA to operate on.
DOCA_EXPERIMENTAL doca_error_t doca_mmap_set_dpa_memrange(struct doca_mmap *mmap, struct doca_dpa *dpa, uint64_t dpa_addr, size_t len)
Set the memory range of DOCA memory map to be a DPA heap memory.
DOCA_STABLE doca_error_t doca_mmap_add_dev(struct doca_mmap *mmap, struct doca_dev *dev)
Register DOCA memory map on a given device.
DOCA_STABLE doca_error_t doca_mmap_export_rdma(struct doca_mmap *mmap, const struct doca_dev *dev, const void **export_desc, size_t *export_desc_len)
Compose memory map representation for later import with doca_mmap_create_from_export() for one of the...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_destroy(struct doca_rdma *rdma)
Destroy a DOCA RDMA instance.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_dpa_completion_attach(struct doca_rdma *rdma, struct doca_dpa_completion *dpa_comp)
Attach DOCA RDMA to DPA completion context.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_grh_enabled(struct doca_rdma *rdma, uint8_t grh_enabled)
Set whether to use GRH in connection. The value can be queried using doca_rdma_get_grh_enabled()....
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_permissions(struct doca_rdma *rdma, uint32_t permissions)
Set rdma permissions for doca_rdma. The value can be queried using doca_rdma_get_permissions()....
DOCA_EXPERIMENTAL doca_error_t doca_rdma_get_dpa_handle(struct doca_rdma *rdma, doca_dpa_dev_rdma_t *dpa_rdma)
Retrieve the handle in the dpa memory space of a doca_rdma.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_connection_get_id(const struct doca_rdma_connection *rdma_connection, uint32_t *connection_id)
Get connection ID from an rdma connection.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_recv_queue_size(struct doca_rdma *rdma, uint32_t recv_queue_size)
Set recv queue size property for doca_rdma. The value can be queried using doca_rdma_get_recv_queue_s...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_max_num_connections(struct doca_rdma *rdma, uint16_t max_num_connections)
Set the maximum number of connections property for a context. The value can be queried using doca_rdm...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_receive_set_dst_buf_list_len(struct doca_rdma *rdma, uint32_t buf_list_len)
Set the maximal destination buffer list length property for receive tasks. After starting the DOCA RD...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_export(struct doca_rdma *rdma, const void **local_rdma_conn_details, size_t *local_rdma_conn_details_size, struct doca_rdma_connection **rdma_connection)
Export doca_rdma connection details object The doca_rdma_conn_details are used in doca_rdma_connect()...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_gid_index(struct doca_rdma *rdma, uint32_t gid_index)
Set GID index for doca_rdma. The value can be queried using doca_rdma_get_gid_index()....
DOCA_EXPERIMENTAL struct doca_ctx * doca_rdma_as_ctx(struct doca_rdma *rdma)
Convert doca_rdma instance into a generalized context for use with doca core objects.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_create(struct doca_dev *dev, struct doca_rdma **rdma)
Create a DOCA RDMA instance.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_cap_task_send_is_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.
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.
uint64_t doca_dpa_dev_sync_event_t
DOCA Sync Event DPA handle.
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_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_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_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 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)
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_destroy(struct doca_sync_event *event)
Destroy a Sync Event instance.
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_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_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.
const struct ip_frag_config * cfg
A struct that includes all the resources needed for DOCA Mmap.
struct doca_dev * doca_device
struct doca_dpa * doca_dpa
doca_dpa_dev_mmap_t dpa_mmap_handle
A struct that includes all the resources needed for DPA completion.
struct doca_dpa_thread * thread
doca_dpa_dev_completion_t handle
struct doca_dpa_completion * dpa_comp
struct doca_dpa * doca_dpa
char rdma_device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]
char dpa_resources_file[DPA_RESOURCES_PATH_MAX_SIZE]
char pf_device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]
char dpa_app_key[DPA_APP_KEY_MAX_SIZE]
A struct that includes all the resources needed for DPA notification completion.
struct doca_dpa_thread * thread
doca_dpa_dev_notification_completion_t handle
struct doca_dpa * doca_dpa
struct doca_dpa_notification_completion * notification_comp
A struct that includes all the resources needed for DPA RDMA.
struct doca_ctx * rdma_as_ctx
doca_dpa_dev_rdma_t dpa_rdma
struct doca_rdma_connection * connection
bool second_connection_needed
uint32_t max_connections_count
const void * connection2_details
struct doca_rdma_connection * connection2
struct doca_dev * doca_device
struct doca_dpa_completion * dpa_comp
struct doca_dpa * doca_dpa
const void * connection_details
A struct that includes all the resources needed for DPA.
A struct that includes all the resources needed for DPA thread.
struct doca_dpa_thread * thread
doca_dpa_dev_uintptr_t tls_dev_ptr
struct doca_dpa * doca_dpa
struct doca_dpa_eu_affinity * affinity