| NVIDIA DOCA SDK | Data Center on a Chip Framework Documentation |
#include <stdlib.h>#include <unistd.h>#include <doca_dev.h>#include <doca_dpa.h>#include <doca_error.h>#include <doca_log.h>#include <doca_types.h>#include <doca_argp.h>#include <doca_sync_event.h>#include <doca_mmap.h>#include <doca_rdma.h>#include <doca_ctx.h>

Go to the source code of this file.
Data Structures | |
| struct | dpa_resources |
| A struct that includes all the resources needed for DPA. More... | |
| struct | dpa_config |
| Configuration struct. More... | |
| struct | dpa_thread_obj |
| A struct that includes all the resources needed for DPA thread. More... | |
| struct | dpa_completion_obj |
| A struct that includes all the resources needed for DPA completion. More... | |
| struct | dpa_notification_completion_obj |
| A struct that includes all the resources needed for DPA notification completion. More... | |
| struct | dpa_rdma_obj |
| A struct that includes all the resources needed for DPA RDMA. More... | |
| struct | doca_mmap_obj |
| A struct that includes all the resources needed for DOCA Mmap. More... | |
Macros | |
| #define | SLEEP(SECONDS) for (int i = 0; i < 1 + SECONDS * 30000; i++) |
| Macro for sleep (wait) in seconds. More... | |
| #define | DEVICE_DEFAULT_NAME "NOT_SET" |
| device default name More... | |
| #define | SYNC_EVENT_MASK_FFS (0xFFFFFFFFFFFFFFFF) |
| Mask for doca_sync_event_wait_gt() wait value. More... | |
| #define | RDMA_DEVICE_DEFAULT_GID_INDEX (1) |
| default RDMA device GID index More... | |
| #define | RDMA_DEFAULT_BUF_LIST_LEN (1) |
| default RDMA connection receive buffer length More... | |
| #define | DPA_RESOURCES_PATH_MAX_SIZE 1024 |
| DPA resources file path size. More... | |
| #define | DPA_APP_KEY_MAX_SIZE 1024 |
| DPA application key size. More... | |
Enumerations | |
| enum | mmap_type { MMAP_TYPE_CPU , MMAP_TYPE_DPA } |
| DOCA Mmap type definition. More... | |
Functions | |
| doca_error_t | register_dpa_params (void) |
| Register the command line parameters for the sample. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| doca_error_t | allocate_dpa_resources (struct dpa_config *cfg, struct dpa_resources *resources) |
| Allocate DOCA DPA resources. More... | |
| doca_error_t | destroy_dpa_resources (struct dpa_resources *resources) |
| Destroy DOCA DPA resources. More... | |
| doca_error_t | dpa_thread_obj_init (struct dpa_thread_obj *dpa_thread_obj) |
| Initialize DPA thread. More... | |
| doca_error_t | dpa_thread_obj_destroy (struct dpa_thread_obj *dpa_thread_obj) |
| Destroy DPA thread. More... | |
| doca_error_t | dpa_completion_obj_init (struct dpa_completion_obj *dpa_completion_obj) |
| Initialize DPA completion. More... | |
| doca_error_t | dpa_completion_obj_destroy (struct dpa_completion_obj *dpa_completion_obj) |
| Destroy DPA completion. More... | |
| doca_error_t | dpa_notification_completion_obj_init (struct dpa_notification_completion_obj *notification_completion_obj) |
| Initialize DPA notification completion. More... | |
| doca_error_t | dpa_notification_completion_obj_destroy (struct dpa_notification_completion_obj *notification_completion_obj) |
| Destroy DPA notification completion. More... | |
| doca_error_t | dpa_rdma_obj_init (struct dpa_rdma_obj *dpa_rdma_obj) |
| Initialize DPA RDMA without starting it. More... | |
| doca_error_t | dpa_rdma_obj_start (struct dpa_rdma_obj *dpa_rdma_obj) |
| Start DPA RDMA. More... | |
| doca_error_t | dpa_rdma_obj_destroy (struct dpa_rdma_obj *dpa_rdma_obj) |
| Destroy DPA RDMA. More... | |
| doca_error_t | doca_mmap_obj_init (struct doca_mmap_obj *doca_mmap_obj) |
| Initialize DOCA Mmap. More... | |
| doca_error_t | doca_mmap_obj_destroy (struct doca_mmap_obj *doca_mmap_obj) |
| Destroy DOCA Mmap. More... | |
| #define DEVICE_DEFAULT_NAME "NOT_SET" |
device default name
Definition at line 55 of file dpa_common.h.
| #define DPA_APP_KEY_MAX_SIZE 1024 |
DPA application key size.
Definition at line 80 of file dpa_common.h.
| #define DPA_RESOURCES_PATH_MAX_SIZE 1024 |
DPA resources file path size.
Definition at line 75 of file dpa_common.h.
| #define RDMA_DEFAULT_BUF_LIST_LEN (1) |
default RDMA connection receive buffer length
Definition at line 70 of file dpa_common.h.
| #define RDMA_DEVICE_DEFAULT_GID_INDEX (1) |
default RDMA device GID index
Definition at line 65 of file dpa_common.h.
| #define SLEEP | ( | SECONDS | ) | for (int i = 0; i < 1 + SECONDS * 30000; i++) |
Macro for sleep (wait) in seconds.
Definition at line 50 of file dpa_common.h.
| #define SYNC_EVENT_MASK_FFS (0xFFFFFFFFFFFFFFFF) |
Mask for doca_sync_event_wait_gt() wait value.
Definition at line 60 of file dpa_common.h.
| enum mmap_type |
DOCA Mmap type definition.
| Enumerator | |
|---|---|
| MMAP_TYPE_CPU | |
| MMAP_TYPE_DPA | |
Definition at line 170 of file dpa_common.h.
| doca_error_t allocate_dpa_resources | ( | struct dpa_config * | cfg, |
| struct dpa_resources * | resources | ||
| ) |
Allocate DOCA DPA resources.
@cfg [in]: DOCA DPA configurations @resources [out]: DOCA DPA resources to allocate
Definition at line 660 of file dpa_common.c.
| 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_dpa [in]: DOCA DPA context @doca_device [in]: DOCA device @comp_event [out]: Created DOCA sync event that is published by the DPA and subscribed by the CPU @handle [out]: Created DOCA sync event handle
Definition at line 354 of file dpa_common.c.
| 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.
@doca_dpa [in]: DOCA DPA context @kernel_event [out]: Created DOCA sync event that is published and subscribed by the DPA
Definition at line 404 of file dpa_common.c.
| 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_dpa [in]: DOCA DPA context @doca_device [in]: DOCA device @wait_event [out]: Created DOCA sync event that is published by the CPU and subscribed by the DPA
Definition at line 313 of file dpa_common.c.
| 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.
@doca_device [in]: DOCA device @remote_net_event [out]: Created DOCA sync event that is published by a remote net and subscribed by the CPU
Definition at line 443 of file dpa_common.c.
| doca_error_t destroy_dpa_resources | ( | struct dpa_resources * | resources | ) |
Destroy DOCA DPA resources.
@resources [in]: DOCA DPA resources to destroy
Definition at line 769 of file dpa_common.c.
| doca_error_t doca_mmap_obj_destroy | ( | struct doca_mmap_obj * | doca_mmap_obj | ) |
Destroy DOCA Mmap.
@doca_mmap_obj [in]: DOCA Mmap object
Definition at line 1209 of file dpa_common.c.
| doca_error_t doca_mmap_obj_init | ( | struct doca_mmap_obj * | doca_mmap_obj | ) |
Initialize DOCA Mmap.
@doca_mmap_obj [in/out]: DOCA Mmap object
Definition at line 1126 of file dpa_common.c.
| doca_error_t dpa_completion_obj_destroy | ( | struct dpa_completion_obj * | dpa_completion_obj | ) |
Destroy DPA completion.
@dpa_completion_obj [in]: DPA completion object
Definition at line 916 of file dpa_common.c.
| doca_error_t dpa_completion_obj_init | ( | struct dpa_completion_obj * | dpa_completion_obj | ) |
Initialize DPA completion.
@dpa_completion_obj [in/out]: DPA completion object
Definition at line 877 of file dpa_common.c.
| doca_error_t dpa_notification_completion_obj_destroy | ( | struct dpa_notification_completion_obj * | notification_completion_obj | ) |
Destroy DPA notification completion.
@notification_completion_obj [in]: DPA notification completion object
Definition at line 962 of file dpa_common.c.
| doca_error_t dpa_notification_completion_obj_init | ( | struct dpa_notification_completion_obj * | notification_completion_obj | ) |
Initialize DPA notification completion.
@notification_completion_obj [in/out]: DPA notification completion object
Definition at line 929 of file dpa_common.c.
| doca_error_t dpa_rdma_obj_destroy | ( | struct dpa_rdma_obj * | dpa_rdma_obj | ) |
Destroy DPA RDMA.
@dpa_rdma_obj [in]: DPA RDMA object
Definition at line 1107 of file dpa_common.c.
| doca_error_t dpa_rdma_obj_init | ( | struct dpa_rdma_obj * | dpa_rdma_obj | ) |
Initialize DPA RDMA without starting it.
This function creates DPA RDMA object. Please note that this function doesn't start the created DPA RDMA object, this need to be done using dpa_rdma_obj_start() API
@dpa_rdma_obj [in/out]: DPA RDMA object
Definition at line 976 of file dpa_common.c.
| doca_error_t dpa_rdma_obj_start | ( | struct dpa_rdma_obj * | dpa_rdma_obj | ) |
Start DPA RDMA.
@dpa_rdma_obj [in]: DPA RDMA object
Definition at line 1058 of file dpa_common.c.
| doca_error_t dpa_thread_obj_destroy | ( | struct dpa_thread_obj * | dpa_thread_obj | ) |
Destroy DPA thread.
@dpa_thread_obj [in]: DPA thread object
Definition at line 864 of file dpa_common.c.
| doca_error_t dpa_thread_obj_init | ( | struct dpa_thread_obj * | dpa_thread_obj | ) |
Initialize DPA thread.
@dpa_thread_obj [in/out]: DPA thread object
Definition at line 817 of file dpa_common.c.
| 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_device [in]: DOCA device @doca_dpa [in]: DOCA DPA context @remote_net_event [in]: remote net DOCA sync event @remote_net_exported_event [out]: Created from export remote net DOCA sync event @remote_net_event_dpa_handle [out]: DPA handle of the created from export remote net DOCA sync event
Definition at line 483 of file dpa_common.c.
| doca_error_t register_dpa_params | ( | void | ) |
Register the command line parameters for the sample.
Definition at line 126 of file dpa_common.c.