NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
rdma_write_immediate_responder_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_ctx.h>
27 #include <doca_error.h>
28 #include <doca_log.h>
29 
30 #include "rdma_common.h"
31 
32 #define MAX_BUFF_SIZE (256) /* Maximum buffer size */
33 #define EXPECTED_IMMEDIATE_VALUE (0xABCD) /* Expected immediate value to receive */
34 
35 DOCA_LOG_REGISTER(RDMA_WRITE_IMMEDIATE_RESPONDER::SAMPLE);
36 
37 /*
38  * Write the connection details and the mmap details for the requester to read,
39  * and read the connection details of the requester
40  * In DC transport mode it is only needed to read the remote connection details
41  *
42  * @cfg [in]: Configuration parameters
43  * @resources [in/out]: RDMA resources
44  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
45  */
47 {
49 
50  /* Write the RDMA connection details */
51  result = write_file(cfg->local_connection_desc_path,
54  if (result != DOCA_SUCCESS) {
55  DOCA_LOG_ERR("Failed to write the RDMA connection details: %s", doca_error_get_descr(result));
56  return result;
57  }
58 
59  /* Write the mmap connection details */
60  result = write_file(cfg->remote_resource_desc_path,
61  (char *)resources->mmap_descriptor,
63  if (result != DOCA_SUCCESS) {
64  DOCA_LOG_ERR("Failed to write the RDMA mmap details: %s", doca_error_get_descr(result));
65  return result;
66  }
67 
68  DOCA_LOG_INFO("You can now copy %s and %s to the requester",
69  cfg->local_connection_desc_path,
70  cfg->remote_resource_desc_path);
71 
72  if (cfg->transport_type == DOCA_RDMA_TRANSPORT_TYPE_DC) {
73  return result;
74  }
75  DOCA_LOG_INFO("Please copy %s from the receiver and then press enter", cfg->remote_connection_desc_path);
76 
77  /* Wait for enter */
79 
80  /* Read the remote RDMA connection details */
81  result = read_file(cfg->remote_connection_desc_path,
84  if (result != DOCA_SUCCESS)
85  DOCA_LOG_ERR("Failed to read the remote RDMA connection details: %s", doca_error_get_descr(result));
86 
87  return result;
88 }
89 
90 /*
91  * RDMA receive task completed callback
92  *
93  * @rdma_receive_task [in]: Completed task
94  * @task_user_data [in]: doca_data from the task
95  * @ctx_user_data [in]: doca_data from the context
96  */
97 static void rdma_receive_completed_callback(struct doca_rdma_task_receive *rdma_receive_task,
98  union doca_data task_user_data,
99  union doca_data ctx_user_data)
100 {
101  struct rdma_resources *resources = (struct rdma_resources *)ctx_user_data.ptr;
102  char buffer[MAX_BUFF_SIZE];
103  doca_be32_t immediate_data;
104  enum doca_rdma_opcode op_code;
107 
108  /*
109  * Retrieve immediate data.
110  * Immediate data is only valid if the task result is success and the task contains the correct opcode
111  */
112  op_code = doca_rdma_task_receive_get_result_opcode(rdma_receive_task);
113  if (op_code != DOCA_RDMA_OPCODE_RECV_WRITE_WITH_IMM) {
115  DOCA_LOG_ERR("Got incorrect opcode: %s", doca_error_get_descr(result));
116  goto free_task;
117  }
118 
119  immediate_data = doca_rdma_task_receive_get_result_immediate_data(rdma_receive_task);
120  if (immediate_data != EXPECTED_IMMEDIATE_VALUE) {
122  DOCA_LOG_ERR(
123  "RDMA receive task failed: immediate value that was received isn't the expected immediate value");
124  goto free_task;
125  }
126 
127  DOCA_LOG_INFO("RDMA receive task was done Successfully");
128 
129  /* Initialize buffer to zeros */
130  memset(buffer, 0, MAX_BUFF_SIZE);
131 
132  /* Read the data that was written on the mmap */
133  strncpy(buffer, resources->mmap_memrange, MAX_BUFF_SIZE - 1);
134 
135  /* Check if the buffer is null terminated and of legal size */
136  if (strnlen(buffer, MAX_BUFF_SIZE) == MAX_BUFF_SIZE) {
137  DOCA_LOG_ERR("The message that was written by the requester exceeds buffer size %d", MAX_BUFF_SIZE);
139  goto free_task;
140  }
141 
142  DOCA_LOG_INFO("Requester has written: \"%s\" with immediate data: %u", (char *)buffer, immediate_data);
143 
144 free_task:
146 
147  /* Update that an error was encountered, if any */
149 
151  /* Stop context once all tasks are completed */
152  if (resources->num_remaining_tasks == 0) {
153  if (resources->cfg->use_rdma_cm == true)
156  }
157 }
158 
159 /*
160  * RDMA receive task error callback
161  *
162  * @rdma_receive_task [in]: failed task
163  * @task_user_data [in]: doca_data from the task
164  * @ctx_user_data [in]: doca_data from the context
165  */
166 static void rdma_receive_error_callback(struct doca_rdma_task_receive *rdma_receive_task,
167  union doca_data task_user_data,
168  union doca_data ctx_user_data)
169 {
170  struct rdma_resources *resources = (struct rdma_resources *)ctx_user_data.ptr;
171  struct doca_task *task = doca_rdma_task_receive_as_task(rdma_receive_task);
174 
175  /* Update that an error was encountered */
178  DOCA_LOG_ERR("RDMA receive task failed: %s", doca_error_get_descr(result));
179 
180  doca_task_free(task);
181 
183  /* Stop context once all tasks are completed */
184  if (resources->num_remaining_tasks == 0) {
185  if (resources->cfg->use_rdma_cm == true)
188  }
189 }
190 
191 /*
192  * Export and receive connection details, and connect to the remote RDMA
193  *
194  * @resources [in]: RDMA resources
195  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
196  */
198 {
200 
201  if (resources->cfg->use_rdma_cm == true)
202  return rdma_cm_connect(resources);
203 
207  &(resources->connections[0]));
208  if (result != DOCA_SUCCESS) {
209  DOCA_LOG_ERR("Failed to export RDMA: %s", doca_error_get_descr(result));
210  return result;
211  }
212 
213  /* Export RDMA mmap */
216  (const void **)&(resources->mmap_descriptor),
218  if (result != DOCA_SUCCESS) {
219  DOCA_LOG_ERR("Failed to export DOCA mmap for RDMA: %s", doca_error_get_descr(result));
220  return result;
221  }
222 
223  /* write and read connection details from the requester */
225  if (result != DOCA_SUCCESS) {
226  DOCA_LOG_ERR("Failed to write and read connection details from the requester: %s",
228  return result;
229  }
230 
232  return result;
233  }
234  /* Connect RDMA */
238  resources->connections[0]);
239  if (result != DOCA_SUCCESS)
240  DOCA_LOG_ERR("Failed to connect the responder's RDMA to the requester's RDMA: %s",
242 
243  return result;
244 }
245 
246 /*
247  * Prepare and submit RDMA receive task
248  *
249  * @resources [in]: RDMA resources
250  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
251  */
253 {
254  struct doca_rdma_task_receive *rdma_receive_task = NULL;
255  union doca_data task_user_data = {0};
257 
258  /* Include first_encountered_error in user data of task to be used in the callbacks */
259  task_user_data.ptr = &(resources->first_encountered_error);
260  /*
261  * Allocate and construct RDMA receive task
262  * The receive task's destination buffer is NULL because we only need the receive task to receive the immediate
263  * value
264  */
265  result = doca_rdma_task_receive_allocate_init(resources->rdma, NULL, task_user_data, &rdma_receive_task);
266  if (result != DOCA_SUCCESS) {
267  DOCA_LOG_ERR("Failed to allocate RDMA receive task: %s", doca_error_get_descr(result));
268  return result;
269  }
270 
271  /* Submit RDMA receive task */
272  DOCA_LOG_INFO("Submitting RDMA receive task");
275  if (result != DOCA_SUCCESS) {
276  DOCA_LOG_ERR("Failed to submit RDMA receive task: %s", doca_error_get_descr(result));
277  goto free_task;
278  }
279 
280  return result;
281 
282 free_task:
284  return result;
285 }
286 
287 /*
288  * RDMA write with immediate responder state change callback
289  * This function represents the state machine for this RDMA program
290  *
291  * @user_data [in]: doca_data from the context
292  * @ctx [in]: DOCA context
293  * @prev_state [in]: Previous DOCA context state
294  * @next_state [in]: Next DOCA context state
295  */
297  struct doca_ctx *ctx,
298  enum doca_ctx_states prev_state,
299  enum doca_ctx_states next_state)
300 {
301  struct rdma_resources *resources = (struct rdma_resources *)user_data.ptr;
302  struct rdma_config *cfg = resources->cfg;
304  (void)prev_state;
305  (void)ctx;
306 
307  switch (next_state) {
309  DOCA_LOG_INFO("RDMA context entered starting state");
310  break;
312  DOCA_LOG_INFO("RDMA context is running");
313 
315  if (result != DOCA_SUCCESS) {
316  DOCA_LOG_ERR("rdma_write_immediate_export_and_connect() failed: %s",
318  break;
319  } else
320  DOCA_LOG_INFO("RDMA context finished initialization");
321 
322  if (cfg->use_rdma_cm == true)
323  break;
324 
326  if (result != DOCA_SUCCESS)
327  DOCA_LOG_ERR("rdma_receive_prepare_and_submit_task() failed: %s", doca_error_get_descr(result));
328  break;
337  DOCA_LOG_INFO("RDMA context entered into stopping state. Any inflight tasks will be flushed");
338  break;
339  case DOCA_CTX_STATE_IDLE:
340  DOCA_LOG_INFO("RDMA context has been stopped");
341 
342  /* We can stop progressing the PE */
343  resources->run_pe_progress = false;
344  break;
345  default:
346  break;
347  }
348 
349  /* If something failed - update that an error was encountered and stop the ctx */
350  if (result != DOCA_SUCCESS) {
352  (void)doca_ctx_stop(ctx);
353  }
354 }
355 
356 /*
357  * Responder side of the RDMA write with immediate
358  *
359  * @cfg [in]: Configuration parameters
360  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
361  */
363 {
364  struct rdma_resources resources = {0};
365  union doca_data ctx_user_data = {0};
366  const uint32_t mmap_permissions = DOCA_ACCESS_FLAG_LOCAL_READ_WRITE | DOCA_ACCESS_FLAG_RDMA_WRITE;
367  const uint32_t rdma_permissions = DOCA_ACCESS_FLAG_RDMA_WRITE;
368  struct timespec ts = {
369  .tv_sec = 0,
370  .tv_nsec = SLEEP_IN_NANOS,
371  };
372  doca_error_t result, tmp_result;
373 
374  /* Allocating resources */
376  mmap_permissions,
377  rdma_permissions,
379  &resources);
380  if (result != DOCA_SUCCESS) {
381  DOCA_LOG_ERR("Failed to allocate RDMA Resources: %s", doca_error_get_descr(result));
382  return result;
383  }
384 
389  if (result != DOCA_SUCCESS) {
390  DOCA_LOG_ERR("Unable to set configurations for RDMA receive task: %s", doca_error_get_descr(result));
391  goto destroy_resources;
392  }
393 
395  if (result != DOCA_SUCCESS) {
396  DOCA_LOG_ERR("Unable to set state change callback for RDMA context: %s", doca_error_get_descr(result));
397  goto destroy_resources;
398  }
399 
400  /* Include the program's resources in user data of context to be used in callbacks */
401  ctx_user_data.ptr = &(resources);
403  if (result != DOCA_SUCCESS) {
404  DOCA_LOG_ERR("Failed to set context user data: %s", doca_error_get_descr(result));
405  goto destroy_resources;
406  }
407 
408  if (cfg->use_rdma_cm == true) {
409  resources.is_requester = false;
413  /* need_send_mmap_info */ true,
414  /* need_recv_mmap_info */ false);
415  if (result != DOCA_SUCCESS) {
416  DOCA_LOG_ERR("Failed to config RDMA CM callbacks and negotiation functions: %s",
418  goto destroy_resources;
419  }
420  }
421 
422  /* Start RDMA context */
424  if (result != DOCA_SUCCESS) {
425  DOCA_LOG_ERR("Failed to start RDMA context: %s", doca_error_get_descr(result));
426  goto destroy_resources;
427  }
428 
429  /*
430  * Run the progress engine which will run the state machine defined in
431  * rdma_write_imm_responder_state_change_callback() When the context moves to idle, the context change callback
432  * call will signal to stop running the progress engine.
433  */
434  while (resources.run_pe_progress) {
435  if (doca_pe_progress(resources.pe) == 0)
436  nanosleep(&ts, &ts);
437  }
438 
439  /* Assign the result we update in the callbacks */
441 
442 destroy_resources:
443  if (resources.buf_inventory != NULL) {
445  if (tmp_result != DOCA_SUCCESS) {
446  DOCA_LOG_ERR("Failed to stop DOCA buffer inventory: %s", doca_error_get_descr(tmp_result));
447  DOCA_ERROR_PROPAGATE(result, tmp_result);
448  }
450  if (tmp_result != DOCA_SUCCESS) {
451  DOCA_LOG_ERR("Failed to destroy DOCA buffer inventory: %s", doca_error_get_descr(tmp_result));
452  DOCA_ERROR_PROPAGATE(result, tmp_result);
453  }
454  }
455  tmp_result = destroy_rdma_resources(&resources, cfg);
456  if (tmp_result != DOCA_SUCCESS) {
457  DOCA_LOG_ERR("Failed to destroy RDMA resources: %s", doca_error_get_descr(tmp_result));
458  DOCA_ERROR_PROPAGATE(result, tmp_result);
459  }
460  return result;
461 }
#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 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.
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_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_ERROR_UNEXPECTED
Definition: doca_error.h:60
@ 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_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_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_be32_t doca_rdma_task_receive_get_result_immediate_data(const struct doca_rdma_task_receive *task)
This method gets the immediate data received by the task.
DOCA_EXPERIMENTAL enum doca_rdma_opcode doca_rdma_task_receive_get_result_opcode(const struct doca_rdma_task_receive *task)
This method gets the opcode of the operation executed by the peer and received by the task.
doca_rdma_opcode
Definition: doca_rdma.h:1318
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_OPCODE_RECV_WRITE_WITH_IMM
Definition: doca_rdma.h:1321
@ DOCA_RDMA_TRANSPORT_TYPE_DC
Definition: doca_rdma.h:47
uint32_t doca_be32_t
Definition: doca_types.h:121
@ DOCA_ACCESS_FLAG_LOCAL_READ_WRITE
Definition: doca_types.h:83
@ DOCA_ACCESS_FLAG_RDMA_WRITE
Definition: doca_types.h:85
const struct ip_frag_config * cfg
Definition: ip_frag_dp.c:0
static void rdma_write_imm_responder_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)
DOCA_LOG_REGISTER(RDMA_WRITE_IMMEDIATE_RESPONDER::SAMPLE)
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)
#define EXPECTED_IMMEDIATE_VALUE
static doca_error_t rdma_write_immediate_export_and_connect(struct rdma_resources *resources)
static doca_error_t write_read_connection(struct rdma_config *cfg, struct rdma_resources *resources)
doca_error_t rdma_write_immediate_responder(struct rdma_config *cfg)
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)
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
const void * mmap_descriptor
Definition: rdma_common.h:118
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
size_t mmap_descriptor_size
Definition: rdma_common.h:119
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_dev * doca_device
Definition: rdma_common.h:81
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