NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
worker_sandbox.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_buf.h>
27 #include <doca_buf_inventory.h>
28 #include <doca_error.h>
29 #include <doca_mmap.h>
30 #include <doca_pe.h>
31 #include <doca_types.h>
32 #include <doca_log.h>
33 
34 #include <doca_urom.h>
35 #include <doca_urom_plugin.h>
36 
37 #include <worker_sandbox.h>
38 #include <urom_sandbox.h>
39 
40 DOCA_LOG_REGISTER(UROM::WORKER::SANDBOX);
41 
42 /* SANDBOX task metadata */
44  union doca_data cookie; /* User cookie */
45  union {
46  urom_sandbox_mem_map_finished mem_map_cb; /* User memory map task callback */
47  urom_sandbox_send_finished send_cb; /* User tag send task callback */
48  urom_sandbox_recv_finished recv_cb; /* User tag recv task callback */
49  };
50 };
51 
52 static uint64_t sandbox_id; /* Sandbox plugin id, id is generated by UROM lib and
53  * will be updated in init function
54  */
55 static uint64_t sandbox_version = 0x01; /* Sandbox plugin host version */
56 
57 /*
58  * Sandbox notification unpack function
59  *
60  * @packed_notif [in]: packed sandbox notification buffer
61  * @sandbox_notif [out]: set unpacked sandbox notification
62  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
63  */
65  struct urom_worker_notify_sandbox **sandbox_notif)
66 {
67  void *ptr;
68 
69  *sandbox_notif = packed_notif;
70  ptr = packed_notif + sizeof(struct urom_worker_notify_sandbox);
71 
72  switch ((*sandbox_notif)->type) {
74  if ((*sandbox_notif)->tag_recv.buffer)
75  (*sandbox_notif)->tag_recv.buffer = ptr;
76  break;
77  }
78 
79  return DOCA_SUCCESS;
80 }
81 
82 /*
83  * Calculate sandbox packed command size
84  *
85  * @sandbox_cmd [in]: sandbox command
86  * @return: command packed size
87  */
89 {
90  size_t pack_len;
91 
92  pack_len = sizeof(struct urom_worker_sandbox_cmd);
93 
94  /* pack inline data */
95  switch (sandbox_cmd->type) {
97  pack_len += sandbox_cmd->mem_map.exported_memh_buffer_len;
98  break;
100  if (!sandbox_cmd->tag_send.memh_id)
101  pack_len += sandbox_cmd->tag_send.count;
102  break;
103  }
104 
105  return pack_len;
106 }
107 
108 /*
109  * Pack sandbox command
110  *
111  * @sandbox_cmd [in]: sandbox command
112  * @packed_cmd_len [in/out]: packed command buffer size
113  * @packed_cmd [out]: packed command buffer
114  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
115  */
117  size_t *packed_cmd_len,
118  void *packed_cmd)
119 {
120  void *pack_tail = packed_cmd;
121  void *pack_head;
122  size_t pack_len;
123 
124  pack_len = urom_worker_sandbox_cmd_packed_len(sandbox_cmd);
125  if (pack_len > *packed_cmd_len)
127 
128  /* pack base command */
129  pack_len = sizeof(struct urom_worker_sandbox_cmd);
130  pack_head = urom_sandbox_serialize_next_raw(&pack_tail, void, pack_len);
131  memcpy(pack_head, sandbox_cmd, pack_len);
132  *packed_cmd_len = pack_len;
133 
134  /* pack inline data */
135  switch (sandbox_cmd->type) {
137  pack_len = sandbox_cmd->mem_map.exported_memh_buffer_len;
138  pack_head = urom_sandbox_serialize_next_raw(&pack_tail, void, pack_len);
139  memcpy(pack_head, sandbox_cmd->mem_map.map_params.exported_memh_buffer, pack_len);
140  *packed_cmd_len += pack_len;
141  break;
143  if (!sandbox_cmd->tag_send.memh_id) {
144  pack_len = sandbox_cmd->tag_send.count;
145  pack_head = urom_sandbox_serialize_next_raw(&pack_tail, void, pack_len);
146  memcpy(pack_head, (void *)sandbox_cmd->tag_send.buffer, pack_len);
147  *packed_cmd_len += pack_len;
148  }
149  break;
150  }
151 
152  return DOCA_SUCCESS;
153 }
154 
155 /*
156  * Sandbox tag send command completion callback function, user callback will be called inside the function
157  *
158  * @task [in]: UROM worker task
159  * @task_user_data [in]: task user data
160  * @ctx_user_data [in]: worker context user data
161  */
162 static void urom_sandbox_send_completed(struct doca_urom_worker_cmd_task *task,
163  union doca_data task_user_data,
164  union doca_data ctx_user_data)
165 {
166  (void)task_user_data;
167  (void)ctx_user_data;
168 
169  size_t data_len;
171  struct doca_buf *response;
172  struct urom_worker_notify_sandbox notify_error = {0};
173  struct urom_worker_notify_sandbox *sandbox_notify = &notify_error;
174  struct doca_sandbox_task_data *task_data;
175  union doca_data context = {0};
176 
178  if (task_data == NULL) {
179  DOCA_LOG_ERR("Failed to get task data buffer");
180  goto task_release;
181  }
182 
184  if (response == NULL) {
185  DOCA_LOG_ERR("Failed to get task response buffer");
187  goto error_exit;
188  }
189 
190  result = doca_buf_get_data(response, (void **)&sandbox_notify);
191  if (result != DOCA_SUCCESS)
192  goto error_exit;
193 
194  result = doca_buf_get_data_len(response, &data_len);
195  if (result != DOCA_SUCCESS) {
196  DOCA_LOG_ERR("Failed to get response data length");
197  goto error_exit;
198  }
199 
201  if (result != DOCA_SUCCESS)
202  goto error_exit;
203 
204  if (data_len != sizeof(*sandbox_notify)) {
205  DOCA_LOG_ERR("Task response data length is different from notification expected length");
207  goto error_exit;
208  }
209 
210 error_exit:
211  context.u64 = sandbox_notify->tag_send.context;
212  (task_data->send_cb)(result, task_data->cookie, context, sandbox_notify->tag_send.status);
213 
214 task_release:
216  if (result != DOCA_SUCCESS)
217  DOCA_LOG_ERR("Failed to release worker command task %s", doca_error_get_descr(result));
218 }
219 
221  union doca_data cookie,
222  union doca_data context,
223  uint64_t dest,
224  uint64_t buffer,
225  uint64_t count,
226  uint64_t tag,
227  uint64_t memh_id,
229 {
231  size_t cmd_len = 0;
232  struct doca_buf *payload;
233  struct doca_urom_worker_cmd_task *task;
234  struct doca_sandbox_task_data *task_data;
235  struct urom_worker_sandbox_cmd *sandbox_cmd;
236 
237  /* Allocate task */
239  if (result != DOCA_SUCCESS)
240  return result;
241 
243  result = doca_buf_get_data(payload, (void **)&sandbox_cmd);
244  if (result != DOCA_SUCCESS)
245  goto task_destroy;
246 
247  result = doca_buf_get_data_len(payload, &cmd_len);
248  if (result != DOCA_SUCCESS)
249  goto task_destroy;
250 
251  /* Populate commands attributes */
252  sandbox_cmd->type = UROM_WORKER_CMD_SANDBOX_TAG_SEND;
253  sandbox_cmd->tag_send.context = context.u64;
254  sandbox_cmd->tag_send.dest = dest;
255  sandbox_cmd->tag_send.buffer = (uint64_t)buffer;
256  sandbox_cmd->tag_send.count = count;
257  sandbox_cmd->tag_send.tag = tag;
258  sandbox_cmd->tag_send.memh_id = memh_id;
259 
260  urom_worker_sandbox_cmd_pack(sandbox_cmd, &cmd_len, (void *)sandbox_cmd);
261 
262  doca_buf_set_data(payload, sandbox_cmd, cmd_len);
263 
265  task_data->send_cb = cb;
266  task_data->cookie = cookie;
267 
270  if (result != DOCA_SUCCESS)
271  goto task_destroy;
272 
273  return DOCA_SUCCESS;
274 task_destroy:
276  return result;
277 }
278 
279 /*
280  * Sandbox tag recv command completion callback function, user callback will be called inside the function
281  *
282  * @task [in]: UROM worker task
283  * @task_user_data [in]: task user data
284  * @ctx_user_data [in]: worker context user data
285  */
286 static void urom_sandbox_recv_completed(struct doca_urom_worker_cmd_task *task,
287  union doca_data task_user_data,
288  union doca_data ctx_user_data)
289 {
290  (void)task_user_data;
291  (void)ctx_user_data;
292 
293  size_t data_len, extended_mem = 0;
295  struct doca_buf *response;
296  struct urom_worker_notify_sandbox notify_error = {0};
297  struct urom_worker_notify_sandbox *sandbox_notify = &notify_error;
298  struct doca_sandbox_task_data *task_data;
299  union doca_data context;
300 
302  if (task_data == NULL) {
303  DOCA_LOG_ERR("Failed to get task data buffer");
304  goto task_release;
305  }
306 
308  if (response == NULL) {
309  DOCA_LOG_ERR("Failed to get task response buffer");
311  goto error_exit;
312  }
313 
314  result = doca_buf_get_data_len(response, &data_len);
315  if (result != DOCA_SUCCESS) {
316  DOCA_LOG_ERR("Failed to get response data length");
317  goto error_exit;
318  }
319 
320  result = doca_buf_get_data(response, (void **)&sandbox_notify);
321  if (result != DOCA_SUCCESS)
322  goto error_exit;
323 
324  result = urom_worker_sandbox_notif_unpack((void *)sandbox_notify, &sandbox_notify);
325  if (result != DOCA_SUCCESS)
326  goto error_exit;
327 
329  if (result != DOCA_SUCCESS)
330  goto error_exit;
331 
332  if (sandbox_notify->tag_recv.buffer != NULL)
333  extended_mem = sandbox_notify->tag_recv.count;
334 
335  if (data_len != sizeof(*sandbox_notify) + extended_mem) {
336  DOCA_LOG_ERR("Task response data length is different from notification expected length");
338  goto error_exit;
339  }
340 
341 error_exit:
342  context.u64 = sandbox_notify->tag_recv.context;
343  (task_data->recv_cb)(result,
344  task_data->cookie,
345  context,
346  sandbox_notify->tag_recv.buffer,
347  sandbox_notify->tag_recv.count,
348  sandbox_notify->tag_recv.sender_tag,
349  sandbox_notify->tag_recv.status);
350 
351 task_release:
353  if (result != DOCA_SUCCESS)
354  DOCA_LOG_ERR("Failed to release worker command task %s", doca_error_get_descr(result));
355 }
356 
358  union doca_data cookie,
359  union doca_data context,
360  uint64_t buffer,
361  uint64_t count,
362  uint64_t tag,
363  uint64_t tag_mask,
364  uint64_t memh_id,
366 {
368  size_t pack_len = 0;
369  struct doca_buf *payload;
370  struct doca_urom_worker_cmd_task *task;
371  struct doca_sandbox_task_data *task_data;
372  struct urom_worker_sandbox_cmd *sandbox_cmd;
373 
374  /* Allocate task */
376  if (result != DOCA_SUCCESS)
377  return result;
378 
380  result = doca_buf_get_data(payload, (void **)&sandbox_cmd);
381  if (result != DOCA_SUCCESS)
382  goto task_destroy;
383  result = doca_buf_get_data_len(payload, &pack_len);
384  if (result != DOCA_SUCCESS)
385  goto task_destroy;
386 
387  /* Populate commands attributes */
388  sandbox_cmd->type = UROM_WORKER_CMD_SANDBOX_TAG_RECV;
389  sandbox_cmd->tag_recv.context = context.u64;
390  sandbox_cmd->tag_recv.buffer = (uint64_t)buffer;
391  sandbox_cmd->tag_recv.count = count;
392  sandbox_cmd->tag_recv.tag = tag;
393  sandbox_cmd->tag_recv.tag_mask = tag_mask;
394  sandbox_cmd->tag_recv.memh_id = memh_id;
395 
396  urom_worker_sandbox_cmd_pack(sandbox_cmd, &pack_len, (void *)sandbox_cmd);
397 
398  doca_buf_set_data(payload, sandbox_cmd, pack_len);
399 
401  task_data->recv_cb = cb;
402  task_data->cookie = cookie;
403 
406  if (result != DOCA_SUCCESS)
407  goto task_destroy;
408 
409  return DOCA_SUCCESS;
410 
411 task_destroy:
413  return result;
414 }
415 
416 /*
417  * Sandbox memory map command completion callback function, user callback will be called inside the function
418  *
419  * @task [in]: UROM worker task
420  * @task_user_data [in]: task user data
421  * @ctx_user_data [in]: worker context user data
422  */
423 static void urom_sandbox_mem_map_completed(struct doca_urom_worker_cmd_task *task,
424  union doca_data task_user_data,
425  union doca_data ctx_user_data)
426 {
427  (void)task_user_data;
428  (void)ctx_user_data;
429 
430  size_t data_len;
432  struct doca_buf *response;
433  struct urom_worker_notify_sandbox notify_error = {0};
434  struct urom_worker_notify_sandbox *sandbox_notify = &notify_error;
435  struct doca_sandbox_task_data *task_data;
436  union doca_data context = {0};
437 
439  if (task_data == NULL) {
440  DOCA_LOG_ERR("Failed to get task data buffer");
441  goto task_release;
442  }
443 
445  if (response == NULL) {
446  DOCA_LOG_ERR("Failed to get task response buffer");
448  goto error_exit;
449  }
450 
451  result = doca_buf_get_data(response, (void **)&sandbox_notify);
452  if (result != DOCA_SUCCESS)
453  goto error_exit;
454 
455  result = doca_buf_get_data_len(response, &data_len);
456  if (result != DOCA_SUCCESS) {
457  DOCA_LOG_ERR("Failed to get response data length");
458  goto error_exit;
459  }
460 
462  if (result != DOCA_SUCCESS)
463  goto error_exit;
464 
465  if (data_len != sizeof(*sandbox_notify)) {
466  DOCA_LOG_ERR("Task response data length is different from notification expected length");
468  goto error_exit;
469  }
470 
471 error_exit:
472  context.u64 = sandbox_notify->mem_map.context;
473  (task_data->mem_map_cb)(result, task_data->cookie, context, sandbox_notify->mem_map.memh_id);
474 
475 task_release:
477  if (result != DOCA_SUCCESS)
478  DOCA_LOG_ERR("Failed to release worker command task %s", doca_error_get_descr(result));
479 }
480 
482  union doca_data cookie,
483  union doca_data context,
484  ucp_mem_map_params_t map_params,
485  size_t exported_memh_buffer_len,
487 {
488  size_t pack_len = 0;
490  struct doca_buf *payload;
491  struct doca_urom_worker_cmd_task *task;
492  struct doca_sandbox_task_data *task_data;
493  struct urom_worker_sandbox_cmd *sandbox_cmd;
494 
495  /* Allocate task */
497  if (result != DOCA_SUCCESS)
498  return result;
499 
501  result = doca_buf_get_data(payload, (void **)&sandbox_cmd);
502  if (result != DOCA_SUCCESS)
503  goto task_destroy;
504 
505  result = doca_buf_get_data_len(payload, &pack_len);
506  if (result != DOCA_SUCCESS)
507  goto task_destroy;
508 
509  /* Populate commands attributes */
510  sandbox_cmd->type = UROM_WORKER_CMD_SANDBOX_MEM_MAP;
511  sandbox_cmd->mem_map.context = context.u64;
512  memcpy(&sandbox_cmd->mem_map.map_params, &map_params, sizeof(ucp_mem_map_params_t));
513  sandbox_cmd->mem_map.exported_memh_buffer_len = exported_memh_buffer_len;
514 
515  urom_worker_sandbox_cmd_pack(sandbox_cmd, &pack_len, (void *)sandbox_cmd);
516 
517  doca_buf_set_data(payload, sandbox_cmd, pack_len);
518 
520  task_data->mem_map_cb = cb;
521  task_data->cookie = cookie;
522 
525  if (result != DOCA_SUCCESS)
526  goto task_destroy;
527 
528  return DOCA_SUCCESS;
529 
530 task_destroy:
532  return result;
533 }
534 
535 doca_error_t urom_sandbox_init(uint64_t plugin_id, uint64_t version)
536 {
537  if (version != sandbox_version)
539 
540  sandbox_id = plugin_id;
541 
542  return DOCA_SUCCESS;
543 }
#define NULL
Definition: __stddef_null.h:26
int32_t result
static const char tag[DOCA_VFS_TAG_SIZE+1]
uint64_t cookie
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_buf_get_data_len(const struct doca_buf *buf, size_t *data_len)
Get buffer's data length.
DOCA_STABLE doca_error_t doca_buf_set_data(struct doca_buf *buf, void *data, size_t data_len)
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_INITIALIZATION
Definition: doca_error.h:46
@ DOCA_ERROR_UNSUPPORTED_VERSION
Definition: doca_error.h:57
@ DOCA_SUCCESS
Definition: doca_error.h:38
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
Definition: doca_log.h:466
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_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_release(struct doca_urom_worker_cmd_task *task)
Release Worker Command task.
DOCA_EXPERIMENTAL void doca_urom_worker_cmd_task_set_cb(struct doca_urom_worker_cmd_task *task, doca_urom_worker_cmd_task_completion_cb_t cb)
Set Worker Command task callback.
DOCA_EXPERIMENTAL struct doca_buf * doca_urom_worker_cmd_task_get_response(struct doca_urom_worker_cmd_task *task)
Get Worker Command task response.
DOCA_EXPERIMENTAL void * doca_urom_worker_cmd_task_get_user_data(struct doca_urom_worker_cmd_task *task)
Get Worker Command user data to populate.
DOCA_EXPERIMENTAL doca_error_t doca_urom_worker_cmd_task_allocate_init(struct doca_urom_worker *worker_ctx, uint64_t plugin, struct doca_urom_worker_cmd_task **task)
Allocate and initialize Worker Command task.
DOCA_EXPERIMENTAL struct doca_buf * doca_urom_worker_cmd_task_get_payload(struct doca_urom_worker_cmd_task *task)
Get Worker Command task payload.
DOCA_EXPERIMENTAL struct doca_task * doca_urom_worker_cmd_task_as_task(struct doca_urom_worker_cmd_task *task)
This method converts a worker cmd task to doca_task.
urom_sandbox_recv_finished recv_cb
urom_sandbox_mem_map_finished mem_map_cb
union doca_data cookie
urom_sandbox_send_finished send_cb
struct urom_worker_sandbox_notify_mem_map mem_map
Definition: urom_sandbox.h:119
struct urom_worker_sandbox_notify_tag_recv tag_recv
Definition: urom_sandbox.h:121
struct urom_worker_sandbox_notify_tag_send tag_send
Definition: urom_sandbox.h:120
ucp_mem_map_params_t map_params
Definition: urom_sandbox.h:53
struct urom_worker_sandbox_cmd_tag_send tag_send
Definition: urom_sandbox.h:82
struct urom_worker_sandbox_cmd_tag_recv tag_recv
Definition: urom_sandbox.h:83
struct urom_worker_sandbox_cmd_mem_map mem_map
Definition: urom_sandbox.h:81
Convenience type for representing opaque data.
Definition: doca_types.h:56
uint64_t u64
Definition: doca_types.h:58
#define urom_sandbox_serialize_next_raw(_iter, _type, _offset)
Definition: urom_sandbox.h:36
@ UROM_WORKER_CMD_SANDBOX_MEM_MAP
Definition: urom_sandbox.h:45
@ UROM_WORKER_CMD_SANDBOX_TAG_RECV
Definition: urom_sandbox.h:47
@ UROM_WORKER_CMD_SANDBOX_TAG_SEND
Definition: urom_sandbox.h:46
doca_error_t urom_sandbox_tag_task_send(struct doca_urom_worker *worker_ctx, union doca_data cookie, union doca_data context, uint64_t dest, uint64_t buffer, uint64_t count, uint64_t tag, uint64_t memh_id, urom_sandbox_send_finished cb)
DOCA_LOG_REGISTER(UROM::WORKER::SANDBOX)
doca_error_t urom_sandbox_init(uint64_t plugin_id, uint64_t version)
static uint64_t sandbox_id
static doca_error_t urom_worker_sandbox_cmd_pack(struct urom_worker_sandbox_cmd *sandbox_cmd, size_t *packed_cmd_len, void *packed_cmd)
doca_error_t urom_sandbox_task_mem_map(struct doca_urom_worker *worker_ctx, union doca_data cookie, union doca_data context, ucp_mem_map_params_t map_params, size_t exported_memh_buffer_len, urom_sandbox_mem_map_finished cb)
static size_t urom_worker_sandbox_cmd_packed_len(struct urom_worker_sandbox_cmd *sandbox_cmd)
static void urom_sandbox_recv_completed(struct doca_urom_worker_cmd_task *task, union doca_data task_user_data, union doca_data ctx_user_data)
doca_error_t urom_sandbox_tag_task_recv(struct doca_urom_worker *worker_ctx, union doca_data cookie, union doca_data context, uint64_t buffer, uint64_t count, uint64_t tag, uint64_t tag_mask, uint64_t memh_id, urom_sandbox_recv_finished cb)
static uint64_t sandbox_version
static doca_error_t urom_worker_sandbox_notif_unpack(void *packed_notif, struct urom_worker_notify_sandbox **sandbox_notif)
static void urom_sandbox_mem_map_completed(struct doca_urom_worker_cmd_task *task, union doca_data task_user_data, union doca_data ctx_user_data)
static void urom_sandbox_send_completed(struct doca_urom_worker_cmd_task *task, union doca_data task_user_data, union doca_data ctx_user_data)
void(* urom_sandbox_recv_finished)(doca_error_t result, union doca_data cookie, union doca_data context, void *buffer, uint64_t count, uint64_t sender_tag, ucs_status_t status)
void(* urom_sandbox_send_finished)(doca_error_t result, union doca_data cookie, union doca_data context, ucs_status_t status)
void(* urom_sandbox_mem_map_finished)(doca_error_t result, union doca_data cookie, union doca_data context, uint64_t memh_id)