NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
rdma_send_immediate_sample.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 NVIDIA CORPORATION AND AFFILIATES. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are permitted
5  * provided that the following conditions are met:
6  * * Redistributions of source code must retain the above copyright notice, this list of
7  * conditions and the following disclaimer.
8  * * Redistributions in binary form must reproduce the above copyright notice, this list of
9  * conditions and the following disclaimer in the documentation and/or other materials
10  * provided with the distribution.
11  * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used
12  * to endorse or promote products derived from this software without specific prior written
13  * permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21  * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  */
25 
26 #include <doca_error.h>
27 #include <doca_log.h>
28 #include <doca_buf_inventory.h>
29 #include <doca_buf.h>
30 #include <doca_ctx.h>
31 
32 #include "rdma_common.h"
33 
34 #define MAX_BUFF_SIZE (256) /* Maximum DOCA buffer size */
35 #define EXAMPLE_IMMEDIATE_VALUE (0xABCD) /* Example immediate value to send */
36 
37 DOCA_LOG_REGISTER(RDMA_SEND_IMMEDIATE::SAMPLE);
38 
39 /*
40  * Write the connection details for the receiver to read, and read the connection details of the receiver
41  * In DC transport mode it is only needed to read the remote connection details
42  *
43  * @cfg [in]: Configuration parameters
44  * @resources [in/out]: RDMA resources
45  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
46  */
48 {
50 
51  if (cfg->transport_type == DOCA_RDMA_TRANSPORT_TYPE_RC) {
52  /* Write the RDMA connection details */
53  result = write_file(cfg->local_connection_desc_path,
56  if (result != DOCA_SUCCESS) {
57  DOCA_LOG_ERR("Failed to write the RDMA connection details: %s", doca_error_get_descr(result));
58  return result;
59  }
60 
61  DOCA_LOG_INFO("You can now copy %s to the receiver", cfg->local_connection_desc_path);
62  }
63 
64  DOCA_LOG_INFO("Please copy %s from the receiver and then press enter after pressing enter in the receiver side",
65  cfg->remote_connection_desc_path);
66 
67  /* Wait for enter */
69 
70  /* Read the remote RDMA connection details */
71  result = read_file(cfg->remote_connection_desc_path,
74  if (result != DOCA_SUCCESS)
75  DOCA_LOG_ERR("Failed to read the remote RDMA connection details: %s", doca_error_get_descr(result));
76 
77  return result;
78 }
79 
80 /*
81  * RDMA send with immediate task completed callback
82  *
83  * @rdma_send_imm_task [in]: Completed task
84  * @task_user_data [in]: doca_data from the task
85  * @ctx_user_data [in]: doca_data from the context
86  */
87 static void rdma_send_imm_completed_callback(struct doca_rdma_task_send_imm *rdma_send_imm_task,
88  union doca_data task_user_data,
89  union doca_data ctx_user_data)
90 {
91  struct rdma_resources *resources = (struct rdma_resources *)ctx_user_data.ptr;
93  doca_error_t result = DOCA_SUCCESS, tmp_result;
94 
95  DOCA_LOG_INFO("RDMA send with immediate task was done successfully");
96 
99  if (tmp_result != DOCA_SUCCESS) {
100  DOCA_LOG_ERR("Failed to decrease src_buf count: %s", doca_error_get_descr(tmp_result));
101  DOCA_ERROR_PROPAGATE(result, tmp_result);
102  }
103 
104  /* Update that an error was encountered, if any */
106 
108  /* Stop context once all tasks are completed */
109  if (resources->num_remaining_tasks == 0) {
110  if (resources->cfg->use_rdma_cm == true)
113  }
114 }
115 
116 /*
117  * RDMA send with immediate task error callback
118  *
119  * @rdma_send_imm_task [in]: failed task
120  * @task_user_data [in]: doca_data from the task
121  * @ctx_user_data [in]: doca_data from the context
122  */
123 static void rdma_send_imm_error_callback(struct doca_rdma_task_send_imm *rdma_send_imm_task,
124  union doca_data task_user_data,
125  union doca_data ctx_user_data)
126 {
127  struct rdma_resources *resources = (struct rdma_resources *)ctx_user_data.ptr;
128  struct doca_task *task = doca_rdma_task_send_imm_as_task(rdma_send_imm_task);
131 
132  /* Update that an error was encountered */
135  DOCA_LOG_ERR("RDMA send with immediate task failed: %s", doca_error_get_descr(result));
136 
137  doca_task_free(task);
139  if (result != DOCA_SUCCESS)
140  DOCA_LOG_ERR("Failed to decrease src_buf count: %s", doca_error_get_descr(result));
141 
143  /* Stop context once all tasks are completed */
144  if (resources->num_remaining_tasks == 0) {
145  if (resources->cfg->use_rdma_cm == true)
148  }
149 }
150 
151 /*
152  * Export and receive connection details, and connect to the remote RDMA
153  *
154  * @resources [in]: RDMA resources
155  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
156  */
158 {
160 
161  if (resources->cfg->use_rdma_cm == true)
162  return rdma_cm_connect(resources);
163 
164  /* Export RDMA connection details */
168  &(resources->connections[0]));
169  if (result != DOCA_SUCCESS) {
170  DOCA_LOG_ERR("Failed to export RDMA: %s", doca_error_get_descr(result));
171  return result;
172  }
173 
174  /* Write and read connection details to the receiver */
176  if (result != DOCA_SUCCESS) {
177  DOCA_LOG_ERR("Failed to write and read connection details from receiver: %s",
179  return result;
180  }
181 
182  /* Connect RDMA */
186  resources->connections[0]);
187  if (result != DOCA_SUCCESS)
188  DOCA_LOG_ERR("Failed to connect the sender's RDMA to the receiver's RDMA: %s",
190 
191  return result;
192 }
193 
194 /*
195  * Prepare and submit RDMA send immediate task
196  *
197  * @resources [in]: RDMA resources
198  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
199  */
201 {
202  struct doca_rdma_task_send_imm *rdma_send_imm_task = NULL;
203  union doca_data task_user_data = {0};
204  void *src_buf_data;
205  doca_error_t result, tmp_result;
206 
207  if (resources->cfg->use_rdma_cm == true) {
209  "Please press enter after the receive task has been successfully submitted in the receiver side");
210 
211  /* Wait for enter */
212  wait_for_enter();
213  }
214 
215  /* Add src buffer to DOCA buffer inventory */
217  resources->mmap,
220  &resources->src_buf);
221  if (result != DOCA_SUCCESS) {
222  DOCA_LOG_ERR("Failed to allocate DOCA buffer to DOCA buffer inventory: %s",
224  return result;
225  }
226 
227  /* Set data of src buffer */
228  result = doca_buf_get_data(resources->src_buf, &src_buf_data);
229  if (result != DOCA_SUCCESS) {
230  DOCA_LOG_ERR("Failed to get source buffer data: %s", doca_error_get_descr(result));
231  goto destroy_src_buf;
232  }
233  strncpy(src_buf_data, resources->cfg->send_string, MAX_BUFF_SIZE + 1);
234 
235  /* Include first_encountered_error in user data of task to be used in the callbacks */
236  task_user_data.ptr = &(resources->first_encountered_error);
237  /* Allocate and construct RDMA send with immediate task */
242  task_user_data,
243  &rdma_send_imm_task);
244  if (result != DOCA_SUCCESS) {
245  DOCA_LOG_ERR("Failed to allocate RDMA send with immediate task: %s", doca_error_get_descr(result));
246  goto destroy_src_buf;
247  }
248 
249  /* Submit RDMA send with immediate task */
250  DOCA_LOG_INFO("Submitting RDMA send with immediate task that sends \"%s\" with immediate value %u to receiver",
255  if (result != DOCA_SUCCESS) {
256  DOCA_LOG_ERR("Failed to submit RDMA send with immediate task: %s", doca_error_get_descr(result));
257  goto free_task;
258  }
259 
260  return result;
261 
262 free_task:
263  doca_task_free(doca_rdma_task_send_imm_as_task(rdma_send_imm_task));
264 destroy_src_buf:
266  if (tmp_result != DOCA_SUCCESS) {
267  DOCA_LOG_ERR("Failed to decrease src_buf count: %s", doca_error_get_descr(tmp_result));
268  DOCA_ERROR_PROPAGATE(result, tmp_result);
269  }
270  return result;
271 }
272 
273 /*
274  * RDMA send with immediate state change callback
275  * This function represents the state machine for this RDMA program
276  *
277  * @user_data [in]: doca_data from the context
278  * @ctx [in]: DOCA context
279  * @prev_state [in]: Previous DOCA context state
280  * @next_state [in]: Next DOCA context state
281  */
282 static void rdma_send_immediate_state_change_callback(const union doca_data user_data,
283  struct doca_ctx *ctx,
284  enum doca_ctx_states prev_state,
285  enum doca_ctx_states next_state)
286 {
287  struct rdma_resources *resources = (struct rdma_resources *)user_data.ptr;
288  struct rdma_config *cfg = resources->cfg;
290  (void)prev_state;
291  (void)ctx;
292 
293  switch (next_state) {
295  DOCA_LOG_INFO("RDMA context entered starting state");
296  break;
298  DOCA_LOG_INFO("RDMA context is running");
299 
301  if (result != DOCA_SUCCESS) {
302  DOCA_LOG_ERR("rdma_send_immediate_export_and_connect() failed: %s",
304  break;
305  } else
306  DOCA_LOG_INFO("RDMA context finished initialization");
307 
308  if (cfg->use_rdma_cm == true)
309  break;
310 
312  if (result != DOCA_SUCCESS)
313  DOCA_LOG_ERR("rdma_send_immediate_prepare_and_submit_task() failed: %s",
315  break;
324  DOCA_LOG_INFO("RDMA context entered into stopping state. Any inflight tasks will be flushed");
325  break;
326  case DOCA_CTX_STATE_IDLE:
327  DOCA_LOG_INFO("RDMA context has been stopped");
328 
329  /* We can stop progressing the PE */
330  resources->run_pe_progress = false;
331  break;
332  default:
333  break;
334  }
335 
336  /* If something failed - update that an error was encountered and stop the ctx */
337  if (result != DOCA_SUCCESS) {
339  (void)doca_ctx_stop(ctx);
340  }
341 }
342 
343 /*
344  * Send a message to the receiver with immediate
345  *
346  * @cfg [in]: Configuration parameters
347  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
348  */
350 {
351  struct rdma_resources resources = {0};
352  union doca_data ctx_user_data = {0};
353  const uint32_t mmap_permissions = DOCA_ACCESS_FLAG_LOCAL_READ_WRITE;
354  const uint32_t rdma_permissions = DOCA_ACCESS_FLAG_LOCAL_READ_WRITE;
355  struct timespec ts = {
356  .tv_sec = 0,
357  .tv_nsec = SLEEP_IN_NANOS,
358  };
359  doca_error_t result, tmp_result;
360 
361  /* Allocating resources */
363  mmap_permissions,
364  rdma_permissions,
366  &resources);
367  if (result != DOCA_SUCCESS) {
368  DOCA_LOG_ERR("Failed to allocate RDMA Resources: %s", doca_error_get_descr(result));
369  return result;
370  }
371 
376  if (result != DOCA_SUCCESS) {
377  DOCA_LOG_ERR("Unable to set configurations for RDMA send with immediate task: %s",
379  goto destroy_resources;
380  }
381 
383  if (result != DOCA_SUCCESS) {
384  DOCA_LOG_ERR("Unable to set state change callback for RDMA context: %s", doca_error_get_descr(result));
385  goto destroy_resources;
386  }
387 
388  /* Include the program's resources in user data of context to be used in callbacks */
389  ctx_user_data.ptr = &(resources);
391  if (result != DOCA_SUCCESS) {
392  DOCA_LOG_ERR("Failed to set context user data: %s", doca_error_get_descr(result));
393  goto destroy_resources;
394  }
395 
396  /* Create DOCA buffer inventory */
398  if (result != DOCA_SUCCESS) {
399  DOCA_LOG_ERR("Failed to create DOCA buffer inventory: %s", doca_error_get_descr(result));
400  goto destroy_resources;
401  }
402 
403  /* Start DOCA buffer inventory */
405  if (result != DOCA_SUCCESS) {
406  DOCA_LOG_ERR("Failed to start DOCA buffer inventory: %s", doca_error_get_descr(result));
407  goto destroy_buf_inventory;
408  }
409 
410  if (cfg->use_rdma_cm == true) {
411  /* Set rdma cm connection configuration callbacks */
415  /* need_send_mmap_info */ false,
416  /* need_recv_mmap_info */ false);
417  if (result != DOCA_SUCCESS) {
418  DOCA_LOG_ERR("Failed to config RDMA CM callbacks and negotiation functions: %s",
420  goto destroy_buf_inventory;
421  }
422  }
423 
424  /* Start RDMA context */
426  if (result != DOCA_SUCCESS) {
427  DOCA_LOG_ERR("Failed to start RDMA context: %s", doca_error_get_descr(result));
428  goto stop_buf_inventory;
429  }
430 
431  /*
432  * Run the progress engine which will run the state machine defined in
433  * rdma_send_immediate_state_change_callback() When the context moves to idle, the context change callback call
434  * will signal to stop running the progress engine.
435  */
436  while (resources.run_pe_progress) {
437  if (doca_pe_progress(resources.pe) == 0)
438  nanosleep(&ts, &ts);
439  }
440 
441  /* Assign the result we update in the callbacks */
443 
444 stop_buf_inventory:
446  if (tmp_result != DOCA_SUCCESS) {
447  DOCA_LOG_ERR("Failed to stop DOCA buffer inventory: %s", doca_error_get_descr(tmp_result));
448  DOCA_ERROR_PROPAGATE(result, tmp_result);
449  }
450 destroy_buf_inventory:
452  if (tmp_result != DOCA_SUCCESS) {
453  DOCA_LOG_ERR("Failed to destroy DOCA buffer inventory: %s", doca_error_get_descr(tmp_result));
454  DOCA_ERROR_PROPAGATE(result, tmp_result);
455  }
456 destroy_resources:
457  tmp_result = destroy_rdma_resources(&resources, cfg);
458  if (tmp_result != DOCA_SUCCESS) {
459  DOCA_LOG_ERR("Failed to destroy DOCA RDMA resources: %s", doca_error_get_descr(tmp_result));
460  DOCA_ERROR_PROPAGATE(result, tmp_result);
461  }
462  return result;
463 }
#define NULL
Definition: __stddef_null.h:26
int32_t result
#define SLEEP_IN_NANOS
Definition: comch_utils.c:40
doca_error_t destroy_rdma_resources(struct rdma_resources *resources)
Definition: rdma_common.c:470
void wait_for_enter(void)
Definition: rdma_common.c:1771
doca_error_t write_file(const char *file_path, const char *string, size_t string_len)
Definition: rdma_common.c:1087
doca_error_t rdma_cm_connect(struct rdma_resources *resources)
Definition: rdma_common.c:1172
doca_error_t allocate_rdma_resources(struct rdma_config *cfg, const uint32_t mmap_permissions, const uint32_t rdma_permissions, task_check func, struct rdma_resources *resources)
Definition: rdma_common.c:758
doca_error_t config_rdma_cm_callback_and_negotiation_task(struct rdma_resources *resources, bool need_send_task, bool need_recv_task)
Definition: rdma_common.c:1720
doca_error_t rdma_cm_disconnect(struct rdma_resources *resources)
Definition: rdma_common.c:1244
#define INVENTORY_NUM_INITIAL_ELEMENTS
Definition: rdma_common.h:47
#define NUM_RDMA_TASKS
Definition: rdma_common.h:57
struct rdma_resources resources
DOCA_STABLE doca_error_t doca_buf_inventory_destroy(struct doca_buf_inventory *inventory)
Destroy buffer inventory structure.
static doca_error_t doca_buf_inventory_buf_get_by_data(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *data, size_t data_len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by data & data_len a...
DOCA_STABLE doca_error_t doca_buf_inventory_start(struct doca_buf_inventory *inventory)
Start element retrieval from inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_create(size_t num_elements, struct doca_buf_inventory **inventory)
Allocates buffer inventory with default/unset attributes.
DOCA_STABLE doca_error_t doca_buf_inventory_stop(struct doca_buf_inventory *inventory)
Stop element retrieval from inventory.
DOCA_STABLE doca_error_t doca_buf_dec_refcount(struct doca_buf *buf, uint16_t *refcount)
Decrease the object reference count by 1, if 0 reached, return the element back to the inventory.
DOCA_STABLE doca_error_t doca_buf_get_data(const struct doca_buf *buf, void **data)
Get the buffer's data.
DOCA_STABLE doca_error_t doca_ctx_start(struct doca_ctx *ctx)
Finalizes all configurations, and starts the DOCA CTX.
DOCA_STABLE doca_error_t doca_ctx_set_state_changed_cb(struct doca_ctx *ctx, doca_ctx_state_changed_callback_t cb)
Set state changed callback.
DOCA_STABLE doca_error_t doca_ctx_set_user_data(struct doca_ctx *ctx, union doca_data user_data)
set user data to context
DOCA_STABLE doca_error_t doca_ctx_stop(struct doca_ctx *ctx)
Stops the context allowing reconfiguration.
doca_ctx_states
This enum defines the states of a context.
Definition: doca_ctx.h:83
@ DOCA_CTX_STATE_STARTING
Definition: doca_ctx.h:93
@ DOCA_CTX_STATE_STOPPING
Definition: doca_ctx.h:106
@ DOCA_CTX_STATE_IDLE
Definition: doca_ctx.h:88
@ DOCA_CTX_STATE_RUNNING
Definition: doca_ctx.h:98
#define DOCA_ERROR_PROPAGATE(r, t)
Save the first encountered doca_error_t.
Definition: doca_error.h:83
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_SUCCESS
Definition: doca_error.h:38
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
Definition: doca_log.h:466
#define DOCA_LOG_INFO(format,...)
Generates an INFO application log message.
Definition: doca_log.h:486
DOCA_STABLE doca_error_t doca_task_get_status(const struct doca_task *task)
Get task status.
DOCA_STABLE doca_error_t doca_task_submit(struct doca_task *task)
Submit a task to a progress engine.
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 doca_error_t doca_rdma_task_send_imm_allocate_init(struct doca_rdma *rdma, struct doca_rdma_connection *rdma_connection, const struct doca_buf *src_buf, doca_be32_t immediate_data, union doca_data user_data, struct doca_rdma_task_send_imm **task)
This method allocates and initializes a send with immediate task.
DOCA_EXPERIMENTAL struct doca_task * doca_rdma_task_send_imm_as_task(struct doca_rdma_task_send_imm *task)
This method converts a send with immediate task to a doca_task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_send_imm_set_conf(struct doca_rdma *rdma, doca_rdma_task_send_imm_completion_cb_t successful_task_completion_cb, doca_rdma_task_send_imm_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
This method sets the send with immediate tasks configuration.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_cap_task_send_imm_is_supported(const struct doca_devinfo *devinfo)
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_connect(struct doca_rdma *rdma, const void *remote_rdma_conn_details, size_t remote_rdma_conn_details_size, struct doca_rdma_connection *rdma_connection)
Connect to remote doca_rdma peer. Can only be called when the ctx is in DOCA_CTX_STATE_STARTING state...
@ DOCA_RDMA_TRANSPORT_TYPE_RC
Definition: doca_rdma.h:46
@ DOCA_ACCESS_FLAG_LOCAL_READ_WRITE
Definition: doca_types.h:83
const struct ip_frag_config * cfg
Definition: ip_frag_dp.c:0
static void rdma_send_imm_error_callback(struct doca_rdma_task_send_imm *rdma_send_imm_task, union doca_data task_user_data, union doca_data ctx_user_data)
#define MAX_BUFF_SIZE
doca_error_t rdma_send_immediate(struct rdma_config *cfg)
static void rdma_send_immediate_state_change_callback(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
static void rdma_send_imm_completed_callback(struct doca_rdma_task_send_imm *rdma_send_imm_task, union doca_data task_user_data, union doca_data ctx_user_data)
#define EXAMPLE_IMMEDIATE_VALUE
static doca_error_t rdma_send_immediate_prepare_and_submit_task(struct rdma_resources *resources)
static doca_error_t write_read_connection(struct rdma_config *cfg, struct rdma_resources *resources)
DOCA_LOG_REGISTER(RDMA_SEND_IMMEDIATE::SAMPLE)
static doca_error_t rdma_send_immediate_export_and_connect(struct rdma_resources *resources)
char send_string[MAX_ARG_SIZE]
Definition: rdma_common.h:80
bool use_rdma_cm
Definition: rdma_common.h:71
size_t remote_rdma_conn_descriptor_size
Definition: rdma_common.h:127
doca_error_t first_encountered_error
Definition: rdma_common.h:132
bool require_remote_mmap
Definition: rdma_common.h:152
struct doca_ctx * rdma_ctx
Definition: rdma_common.h:85
size_t num_remaining_tasks
Definition: rdma_common.h:134
prepare_and_submit_task_fn task_fn
Definition: rdma_common.h:150
const void * rdma_conn_descriptor
Definition: rdma_common.h:124
void * remote_rdma_conn_descriptor
Definition: rdma_common.h:126
struct doca_rdma_connection * connections[MAX_NUM_CONNECTIONS]
Definition: rdma_common.h:138
struct rdma_config * cfg
Definition: rdma_common.h:80
struct doca_rdma * rdma
Definition: rdma_common.h:83
struct doca_pe * pe
Definition: rdma_common.h:86
struct doca_mmap * mmap
Definition: rdma_common.h:112
bool run_pe_progress
Definition: rdma_common.h:133
struct doca_buf * src_buf
Definition: rdma_common.h:122
struct doca_buf_inventory * buf_inventory
Definition: rdma_common.h:117
size_t rdma_conn_descriptor_size
Definition: rdma_common.h:125
char * mmap_memrange
Definition: rdma_common.h:116
Convenience type for representing opaque data.
Definition: doca_types.h:56
void * ptr
Definition: doca_types.h:57
struct upf_accel_ctx * ctx
doca_error_t read_file(char const *path, char **out_bytes, size_t *out_bytes_len)
Definition: utils.c:56