NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
rdma_receive_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 #include <doca_argp.h>
32 
33 #include "rdma_common.h"
34 
35 #define MAX_BUFF_SIZE (256) /* Maximum DOCA buffer size */
36 
37 DOCA_LOG_REGISTER(RDMA_RECEIVE::SAMPLE);
38 
39 /*
40  * Write the connection details for the sender to read, and read the connection details of the sender
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  /* Write the RDMA connection details */
52  result = write_file(cfg->local_connection_desc_path,
55  if (result != DOCA_SUCCESS) {
56  DOCA_LOG_ERR("Failed to write the RDMA connection details: %s", doca_error_get_descr(result));
57  return result;
58  }
59 
60  DOCA_LOG_INFO("You can now copy %s to the sender", cfg->local_connection_desc_path);
61 
62  if (cfg->transport_type == DOCA_RDMA_TRANSPORT_TYPE_DC) {
63  return result;
64  }
65  DOCA_LOG_INFO("Please copy %s from the sender and then press enter", 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 receive task completed callback
82  *
83  * @rdma_receive_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_receive_completed_callback(struct doca_rdma_task_receive *rdma_receive_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;
92  void *dst_buf_data;
94  doca_error_t result = DOCA_SUCCESS, tmp_result;
95 
96  DOCA_LOG_INFO("RDMA receive task was done Successfully");
97 
98  /* Read the data that was received */
99  result = doca_buf_get_data(resources->dst_buf, &dst_buf_data);
100  if (result != DOCA_SUCCESS) {
101  DOCA_LOG_ERR("Failed to get destination buffer data: %s", doca_error_get_descr(result));
102  goto free_task;
103  }
104 
105  /* Check if dst_buf_data is null terminated and of legal size */
106  if (strnlen(dst_buf_data, MAX_BUFF_SIZE) == MAX_BUFF_SIZE) {
107  DOCA_LOG_ERR("The message that was received from sender exceeds buffer size %d", MAX_BUFF_SIZE);
109  goto free_task;
110  }
111 
112  DOCA_LOG_INFO("Got from sender: \"%s\"", (char *)dst_buf_data);
113 
114 free_task:
117  if (tmp_result != DOCA_SUCCESS) {
118  DOCA_LOG_ERR("Failed to decrease dst_buf count: %s", doca_error_get_descr(tmp_result));
119  DOCA_ERROR_PROPAGATE(result, tmp_result);
120  }
121 
122  /* Update that an error was encountered, if any */
124 
126  /* Stop context once all tasks are completed */
127  if (resources->num_remaining_tasks == 0) {
128  if (resources->cfg->use_rdma_cm == true)
131  }
132 }
133 
134 /*
135  * RDMA receive task error callback
136  *
137  * @rdma_receive_task [in]: failed task
138  * @task_user_data [in]: doca_data from the task
139  * @ctx_user_data [in]: doca_data from the context
140  */
141 static void rdma_receive_error_callback(struct doca_rdma_task_receive *rdma_receive_task,
142  union doca_data task_user_data,
143  union doca_data ctx_user_data)
144 {
145  struct rdma_resources *resources = (struct rdma_resources *)ctx_user_data.ptr;
146  struct doca_task *task = doca_rdma_task_receive_as_task(rdma_receive_task);
149 
150  /* Update that an error was encountered */
153  DOCA_LOG_ERR("RDMA receive task failed: %s", doca_error_get_descr(result));
154 
155  doca_task_free(task);
157  if (result != DOCA_SUCCESS)
158  DOCA_LOG_ERR("Failed to decrease dst_buf count: %s", doca_error_get_descr(result));
159 
161  /* Stop context once all tasks are completed */
162  if (resources->num_remaining_tasks == 0) {
163  if (resources->cfg->use_rdma_cm == true)
166  }
167 }
168 
169 /*
170  * Export and receive connection details, and connect to the remote RDMA
171  *
172  * @resources [in]: RDMA resources
173  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
174  */
176 {
178 
179  if (resources->cfg->use_rdma_cm == true)
180  return rdma_cm_connect(resources);
181 
182  /* Export RDMA connection details */
186  &(resources->connections[0]));
187  if (result != DOCA_SUCCESS) {
188  DOCA_LOG_ERR("Failed to export RDMA: %s", doca_error_get_descr(result));
189  return result;
190  }
191 
192  /* write and read connection details to the sender */
194  if (result != DOCA_SUCCESS) {
195  DOCA_LOG_ERR("Failed to write and read connection details from sender: %s",
197  return result;
198  }
199 
201  return result;
202  }
203  /* Connect RDMA */
207  resources->connections[0]);
208  if (result != DOCA_SUCCESS)
209  DOCA_LOG_ERR("Failed to connect the receiver's RDMA to the sender's RDMA: %s",
211 
212  return result;
213 }
214 
215 /*
216  * Prepare and submit RDMA receive task
217  *
218  * @resources [in]: RDMA resources
219  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
220  */
222 {
223  struct doca_rdma_task_receive *rdma_receive_task = NULL;
224  union doca_data task_user_data = {0};
225  doca_error_t result, tmp_result;
226 
227  /* Add dst buffer to DOCA buffer inventory */
229  resources->mmap,
232  &resources->dst_buf);
233  if (result != DOCA_SUCCESS) {
234  DOCA_LOG_ERR("Failed to allocate DOCA buffer to DOCA buffer inventory: %s",
236  return result;
237  }
238 
239  /* Include first_encountered_error in user data of task to be used in the callbacks */
240  task_user_data.ptr = &(resources->first_encountered_error);
241  /* Allocate and construct RDMA receive task */
244  task_user_data,
245  &rdma_receive_task);
246  if (result != DOCA_SUCCESS) {
247  DOCA_LOG_ERR("Failed to allocate RDMA receive task: %s", doca_error_get_descr(result));
248  goto destroy_dst_buf;
249  }
250 
251  /* Submit RDMA receive task */
252  DOCA_LOG_INFO("Submitting RDMA receive task");
255  if (result != DOCA_SUCCESS) {
256  DOCA_LOG_ERR("Failed to submit RDMA receive task: %s", doca_error_get_descr(result));
257  goto free_task;
258  }
259 
260  if (resources->cfg->use_rdma_cm == true)
261  DOCA_LOG_INFO("RDMA receive task successfully submitted");
262 
263  return result;
264 
265 free_task:
267 destroy_dst_buf:
269  if (tmp_result != DOCA_SUCCESS) {
270  DOCA_LOG_ERR("Failed to decrease dst_buf count: %s", doca_error_get_descr(tmp_result));
271  DOCA_ERROR_PROPAGATE(result, tmp_result);
272  }
273  return result;
274 }
275 
276 /*
277  * RDMA receive state change callback
278  * This function represents the state machine for this RDMA program
279  *
280  * @user_data [in]: doca_data from the context
281  * @ctx [in]: DOCA context
282  * @prev_state [in]: Previous DOCA context state
283  * @next_state [in]: Next DOCA context state
284  */
285 static void rdma_receive_state_change_callback(const union doca_data user_data,
286  struct doca_ctx *ctx,
287  enum doca_ctx_states prev_state,
288  enum doca_ctx_states next_state)
289 {
290  struct rdma_resources *resources = (struct rdma_resources *)user_data.ptr;
291  struct rdma_config *cfg = resources->cfg;
293  (void)prev_state;
294  (void)ctx;
295 
296  switch (next_state) {
298  DOCA_LOG_INFO("RDMA context entered starting state");
299  break;
301  DOCA_LOG_INFO("RDMA context is running");
302 
304  if (result != DOCA_SUCCESS) {
305  DOCA_LOG_ERR("rdma_receive_export_and_connect() failed: %s", doca_error_get_descr(result));
306  break;
307  } else
308  DOCA_LOG_INFO("RDMA context finished initialization");
309 
310  if (cfg->use_rdma_cm == true)
311  break;
312 
314  if (result != DOCA_SUCCESS)
315  DOCA_LOG_ERR("rdma_receive_prepare_and_submit_task() failed: %s", doca_error_get_descr(result));
316  break;
325  DOCA_LOG_INFO("RDMA context entered into stopping state. Any inflight tasks will be flushed");
326  break;
327  case DOCA_CTX_STATE_IDLE:
328  DOCA_LOG_INFO("RDMA context has been stopped");
329 
330  /* We can stop progressing the PE */
331  resources->run_pe_progress = false;
332  break;
333  default:
334  break;
335  }
336 
337  /* If something failed - update that an error was encountered and stop the ctx */
338  if (result != DOCA_SUCCESS) {
340  (void)doca_ctx_stop(ctx);
341  }
342 }
343 
344 /*
345  * Receive a message from the sender
346  *
347  * @cfg [in]: Configuration parameters
348  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
349  */
351 {
352  struct rdma_resources resources = {0};
353  union doca_data ctx_user_data = {0};
354  uint32_t mmap_permissions = DOCA_ACCESS_FLAG_LOCAL_READ_WRITE;
355  uint32_t rdma_permissions = DOCA_ACCESS_FLAG_LOCAL_READ_WRITE;
356  struct timespec ts = {
357  .tv_sec = 0,
358  .tv_nsec = SLEEP_IN_NANOS,
359  };
360  doca_error_t result, tmp_result;
361 
362  /* Allocating resources */
364  mmap_permissions,
365  rdma_permissions,
367  &resources);
368  if (result != DOCA_SUCCESS) {
369  DOCA_LOG_ERR("Failed to allocate RDMA Resources: %s", doca_error_get_descr(result));
370  return result;
371  }
372 
377  if (result != DOCA_SUCCESS) {
378  DOCA_LOG_ERR("Unable to set configurations for RDMA receive task: %s", doca_error_get_descr(result));
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 rdma_receive_state_change_callback()
433  * When the context moves to idle, the context change callback call will signal to stop running the progress
434  * 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_addr(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *addr, size_t len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by addr & len argume...
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_ERROR_INVALID_VALUE
Definition: doca_error.h:44
@ 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 struct doca_task * doca_rdma_task_receive_as_task(struct doca_rdma_task_receive *task)
This method converts a receive task to a doca_task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_receive_set_conf(struct doca_rdma *rdma, doca_rdma_task_receive_completion_cb_t successful_task_completion_cb, doca_rdma_task_receive_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
This method sets the receive tasks configuration.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_receive_allocate_init(struct doca_rdma *rdma, struct doca_buf *dst_buf, union doca_data user_data, struct doca_rdma_task_receive **task)
This method allocates and initializes a receive task.
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_cap_task_receive_is_supported(const struct doca_devinfo *devinfo)
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_DC
Definition: doca_rdma.h:47
@ 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_receive_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)
#define MAX_BUFF_SIZE
static doca_error_t rdma_receive_prepare_and_submit_task(struct rdma_resources *resources)
static void rdma_receive_error_callback(struct doca_rdma_task_receive *rdma_receive_task, union doca_data task_user_data, union doca_data ctx_user_data)
static doca_error_t rdma_receive_export_and_connect(struct rdma_resources *resources)
static doca_error_t write_read_connection(struct rdma_config *cfg, struct rdma_resources *resources)
DOCA_LOG_REGISTER(RDMA_RECEIVE::SAMPLE)
static void rdma_receive_completed_callback(struct doca_rdma_task_receive *rdma_receive_task, union doca_data task_user_data, union doca_data ctx_user_data)
doca_error_t rdma_receive(struct rdma_config *cfg)
enum doca_rdma_transport_type transport_type
Definition: rdma_common.h:90
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 doca_buf * dst_buf
Definition: rdma_common.h:123
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_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