29 #include "../common/dpa_initiator_target_common_defs.h"
63 uint64_t received_val = 0;
84 DOCA_DPA_DEV_LOG_INFO(
"%s: doca_dpa_dev_get_completion_user_data() returned %u\n", __func__, user_data);
108 DOCA_DPA_DEV_LOG_INFO(
"%s: Repost RDMA receive on DPA Mmap handle 0x%x, address 0x%lx, length %lu\n",
166 DOCA_DPA_DEV_LOG_INFO(
"%s: Target RDMA post receive on DPA Mmap handle 0x%x, address 0x%lx, length %lu\n",
171 if (rdma_dpa_ctx_handle) {
195 uint32_t connection_id,
202 "%s: Post RDMA send with connection_id %u, immediate %u on DPA Mmap handle 0x%x, address 0x%lx, length %lu\n",
209 if (rdma_dpa_ctx_handle) {
#define EXPECTED_NUM_RECEIVES
Number of expected receive completions.
static uint32_t num_receive
Number of current receive completions.
__dpa_rpc__ uint64_t rdma_post_send_imm_rpc(doca_dpa_dev_t rdma_dpa_ctx_handle, doca_dpa_dev_rdma_t rdma, uint32_t connection_id, uintptr_t local_buf_addr, doca_dpa_dev_mmap_t dpa_mmap_handle, size_t length, uint32_t immediate)
RPC function to post RDMA send with immediate operation.
__dpa_global__ void thread2_kernel(uint64_t arg)
Kernel function for DPA thread #2.
__dpa_global__ void thread1_kernel(uint64_t arg)
Kernel function for DPA thread #1.
__dpa_rpc__ uint64_t rdma_post_receive_rpc(doca_dpa_dev_t rdma_dpa_ctx_handle, doca_dpa_dev_rdma_t target_rdma, doca_dpa_dev_uintptr_t local_buf_addr, doca_dpa_dev_mmap_t dpa_mmap_handle, size_t length)
RPC function to post first RDMA receive operation on target RDMA.
static uint32_t received_values[EXPECTED_NUM_RECEIVES]
Array used to mark received data when completion is received.
struct dpa_thread_arg __dpa_global__
DOCA_EXPERIMENTAL void doca_dpa_dev_rdma_post_send_imm(doca_dpa_dev_rdma_t rdma, uint32_t connection_id, doca_dpa_dev_mmap_t mmap_handle, uint64_t addr, size_t length, uint32_t immediate, uint32_t flags)
Post an RDMA send with immediate operation.
DOCA_EXPERIMENTAL void doca_dpa_dev_rdma_post_receive(doca_dpa_dev_rdma_t rdma, doca_dpa_dev_mmap_t mmap_handle, uint64_t addr, size_t length)
Post an RDMA receive operation.
DOCA_EXPERIMENTAL void doca_dpa_dev_sync_event_update_set(doca_dpa_dev_sync_event_t dpa_dev_se_handle, uint64_t value)
Set the counter of a DOCA Sync Event to a given value.
DOCA_EXPERIMENTAL void doca_dpa_dev_completion_request_notification(doca_dpa_dev_completion_t dpa_comp_handle)
Request notification on the DPA completion.
DOCA_EXPERIMENTAL void doca_dpa_dev_thread_reschedule(void)
Reschedule a DPA thread.
DOCA_EXPERIMENTAL void doca_dpa_dev_device_set(doca_dpa_dev_t dpa_handle)
Set a DPA device.
DOCA_EXPERIMENTAL void doca_dpa_dev_thread_finish(void)
Finish a DPA thread.
DOCA_EXPERIMENTAL void doca_dpa_dev_thread_notify(doca_dpa_dev_notification_completion_t comp_handle)
Notify the completion handle and trigger the attached thread.
DOCA_EXPERIMENTAL uint32_t doca_dpa_dev_get_completion_user_data(doca_dpa_dev_completion_element_t comp_element)
Get completion element user data.
#define DOCA_DPA_DEV_LOG_ERR(...)
Generate a DOCA DPA device ERROR log message.
DOCA_EXPERIMENTAL void doca_dpa_dev_completion_ack(doca_dpa_dev_completion_t dpa_comp_handle, uint64_t num_comp)
Acknowledge that the completions have been read on the completion context.
__dpa_global__ typedef uint64_t doca_dpa_dev_completion_element_t
DPA completion element handle type definition.
#define DOCA_DPA_DEV_LOG_INFO(...)
Generate a DOCA DPA device INFO log message.
DOCA_EXPERIMENTAL doca_dpa_dev_completion_type_t doca_dpa_dev_get_completion_type(doca_dpa_dev_completion_element_t comp_element)
Get completion element type.
DOCA_EXPERIMENTAL int doca_dpa_dev_get_completion(doca_dpa_dev_completion_t dpa_comp_handle, doca_dpa_dev_completion_element_t *comp_element)
Get DPA completion element.
DOCA_EXPERIMENTAL uint32_t doca_dpa_dev_get_completion_immediate(doca_dpa_dev_completion_element_t comp_element)
Get completion element immediate data.
@ DOCA_DPA_DEV_SUBMIT_FLAG_OPTIMIZE_REPORTS
@ DOCA_DPA_DEV_SUBMIT_FLAG_FLUSH
uint64_t doca_dpa_dev_t
DPA context handle type definition.
uint64_t doca_dpa_dev_uintptr_t
DPA pointer type definition.
uint32_t doca_dpa_dev_mmap_t
Handle on the DPA for a doca_mmap instance.
uint64_t doca_dpa_dev_rdma_t
__UINTPTR_TYPE__ uintptr_t
DPA thread #1 device argument struct.
uint64_t notification_comp_handle
uint64_t target_rdma_handle
doca_dpa_dev_t dpa_ctx_handle
DPA thread #2 device argument struct.
uint64_t sync_event_handle
uint64_t completion_count