NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
gpunetio_rdma_client_server_write_main.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 <stdlib.h>
27 
28 #include <doca_log.h>
29 #include <doca_argp.h>
30 
31 #include "rdma_common.h"
32 
33 DOCA_LOG_REGISTER(GPURDMA_WRITE_REQUESTER::MAIN);
34 
35 /*
36  * ARGP Callback - Handle IB device name parameter
37  *
38  * @param [in]: Input parameter
39  * @config [in/out]: Program configuration context
40  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
41  */
42 static doca_error_t device_address_callback(void *param, void *config)
43 {
44  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
45  char *device_name = (char *)param;
46  int len;
47 
50  DOCA_LOG_ERR("Entered IB device name exceeding the maximum size of %d",
53  }
54  strncpy(rdma_cfg->device_name, device_name, len + 1);
55 
56  return DOCA_SUCCESS;
57 }
58 
59 /*
60  * ARGP Callback - Set GID index
61  *
62  * @param [in]: Input parameter
63  * @config [in/out]: Program configuration context
64  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
65  */
66 static doca_error_t gid_index_callback(void *param, void *config)
67 {
68  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
69  const int gid_index = *(uint32_t *)param;
70 
71  if (gid_index < 0) {
72  DOCA_LOG_ERR("GID index for DOCA RDMA must be non-negative");
74  }
75 
76  rdma_cfg->is_gid_index_set = true;
77  rdma_cfg->gid_index = (uint32_t)gid_index;
78 
79  return DOCA_SUCCESS;
80 }
81 
82 /*
83  * Get GPU PCIe address input.
84  *
85  * @param [in]: Command line parameter
86  * @config [in]: Application configuration structure
87  * @return: DOCA_SUCCESS on success and DOCA_ERROR_INVALID_VALUE otherwise
88  */
89 static doca_error_t gpu_pci_address_callback(void *param, void *config)
90 {
91  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
92  char *pci_address = (char *)param;
93  size_t len;
94 
95  len = strnlen(pci_address, MAX_PCI_ADDRESS_LEN);
96  if (len >= MAX_PCI_ADDRESS_LEN) {
97  DOCA_LOG_ERR("PCI address too long. Max %d", MAX_PCI_ADDRESS_LEN - 1);
99  }
100 
101  strncpy(rdma_cfg->gpu_pcie_addr, pci_address, len + 1);
102 
103  return DOCA_SUCCESS;
104 }
105 
106 /*
107  * ARGP Callback - Handle client parameter
108  *
109  * @param [in]: Input parameter
110  * @config [in/out]: Program configuration context
111  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
112  */
113 static doca_error_t client_param_callback(void *param, void *config)
114 {
115  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
116  char *server_ip_addr = (char *)param;
117  int len;
118 
121  DOCA_LOG_ERR("Entered IB device name exceeding the maximum size of %d",
124  }
125  strncpy(rdma_cfg->server_ip_addr, server_ip_addr, len + 1);
126  rdma_cfg->is_server = false;
127 
128  return DOCA_SUCCESS;
129 }
130 
131 /*
132  * ARGP Callback - Handle use_rdma_cm parameter
133  *
134  * @param [in]: Input parameter
135  * @config [in/out]: Program configuration context
136  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
137  */
138 static doca_error_t use_rdma_cm_param_callback(void *param, void *config)
139 {
140  (void)param;
141  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
142 
143  rdma_cfg->use_rdma_cm = true;
144 
145  return DOCA_SUCCESS;
146 }
147 
148 /*
149  * ARGP Callback - Handle cm_port parameter
150  *
151  * @param [in]: Input parameter
152  * @config [in/out]: Program configuration context
153  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
154  */
155 static doca_error_t cm_port_param_callback(void *param, void *config)
156 {
157  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
158  const int cm_port = *(uint32_t *)param;
159 
160  if (cm_port < 0) {
161  DOCA_LOG_ERR("Server listening port number for DOCA RDMA-CM must be non-negative");
163  }
164 
165  rdma_cfg->cm_port = (uint32_t)cm_port;
166 
167  return DOCA_SUCCESS;
168 }
169 
170 /*
171  * ARGP Callback - Handle cm server addr parameter
172  *
173  * @param [in]: Input parameter
174  * @config [in/out]: Program configuration context
175  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
176  */
177 static doca_error_t cm_addr_param_callback(void *param, void *config)
178 {
179  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
180  const char *addr = (char *)param;
181  int addr_len = strnlen(addr, SERVER_ADDR_LEN + 1);
182 
183  if (addr_len == SERVER_ADDR_LEN) {
184  DOCA_LOG_ERR("Entered server address exceeded buffer size: %d", SERVER_ADDR_LEN);
186  }
187 
188  /* The string will be '\0' terminated due to the strnlen check above */
189  strncpy(rdma_cfg->cm_addr, addr, addr_len + 1);
190 
191  return DOCA_SUCCESS;
192 }
193 
194 /*
195  * ARGP Callback - Handle cm server addr type parameter
196  *
197  * @param [in]: Input parameter
198  * @config [in/out]: Program configuration context
199  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
200  */
201 static doca_error_t cm_addr_type_param_callback(void *param, void *config)
202 {
203  struct rdma_config *rdma_cfg = (struct rdma_config *)config;
204  const char *type = (char *)param;
205  int type_len = strnlen(type, SERVER_ADDR_TYPE_LEN + 1);
206 
207  if (type_len == SERVER_ADDR_TYPE_LEN) {
208  DOCA_LOG_ERR("Entered server address type exceeded buffer size: %d", SERVER_ADDR_TYPE_LEN);
210  }
211 
212  if (strcasecmp(type, "ip4") == 0 || strcasecmp(type, "ipv4") == 0)
214  else if (strcasecmp(type, "ip6") == 0 || strcasecmp(type, "ipv6") == 0)
216  else if (strcasecmp(type, "gid") == 0)
218  else {
219  DOCA_LOG_ERR("Entered wrong server address type, the accepted server address type are: "
220  "ip4, ipv4, IP4, IPv4, IPV4, "
221  "ip6, ipv6, IP6, IPv6, IPV6, "
222  "gid, GID");
224  }
225 
226  return DOCA_SUCCESS;
227 }
228 
229 /*
230  * Register sample argp params
231  *
232  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
233  */
235 {
237  struct doca_argp_param *client_param;
238  struct doca_argp_param *device_param;
239  struct doca_argp_param *gid_index_param;
240  struct doca_argp_param *gpu_param;
241  struct doca_argp_param *use_rdma_cm_param;
242  struct doca_argp_param *cm_port_param;
243  struct doca_argp_param *cm_addr_param;
244  struct doca_argp_param *cm_addr_type_param;
245 
246  /* Create and register client param */
247  result = doca_argp_param_create(&client_param);
248  if (result != DOCA_SUCCESS) {
249  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
250  return result;
251  }
252  doca_argp_param_set_short_name(client_param, "c");
253  doca_argp_param_set_long_name(client_param, "client");
254  doca_argp_param_set_arguments(client_param, "<Sample is client, requires server OOB IP>");
255  doca_argp_param_set_description(client_param, "Sample is client, requires server OOB IP");
258  result = doca_argp_register_param(client_param);
259  if (result != DOCA_SUCCESS) {
260  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
261  return result;
262  }
263 
264  /* Create and register device param */
265  result = doca_argp_param_create(&device_param);
266  if (result != DOCA_SUCCESS) {
267  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
268  return result;
269  }
270  doca_argp_param_set_short_name(device_param, "d");
271  doca_argp_param_set_long_name(device_param, "device");
272  doca_argp_param_set_arguments(device_param, "<IB device name>");
273  doca_argp_param_set_description(device_param, "IB device name");
276  doca_argp_param_set_mandatory(device_param);
277  result = doca_argp_register_param(device_param);
278  if (result != DOCA_SUCCESS) {
279  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
280  return result;
281  }
282 
283  /* Create and register GPU param */
284  result = doca_argp_param_create(&gpu_param);
285  if (result != DOCA_SUCCESS) {
286  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
287  return result;
288  }
289  doca_argp_param_set_short_name(gpu_param, "gpu");
290  doca_argp_param_set_long_name(gpu_param, "gpu");
291  doca_argp_param_set_arguments(gpu_param, "<GPU PCIe address>");
292  doca_argp_param_set_description(gpu_param, "GPU PCIe address to be used by the sample");
296  result = doca_argp_register_param(gpu_param);
297  if (result != DOCA_SUCCESS) {
298  DOCA_LOG_ERR("Failed to register ARGP param: %s", doca_error_get_descr(result));
299  return result;
300  }
301 
302  /* Create and register gid_index param */
303  result = doca_argp_param_create(&gid_index_param);
304  if (result != DOCA_SUCCESS) {
305  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
306  return result;
307  }
308  doca_argp_param_set_short_name(gid_index_param, "gid");
309  doca_argp_param_set_long_name(gid_index_param, "gid-index");
310  doca_argp_param_set_description(gid_index_param, "GID index for DOCA RDMA (optional)");
313  result = doca_argp_register_param(gid_index_param);
314  if (result != DOCA_SUCCESS) {
315  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
316  return result;
317  }
318 
319  /* Create and register user_rdma_cm param */
320  result = doca_argp_param_create(&use_rdma_cm_param);
321  if (result != DOCA_SUCCESS) {
322  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
323  return result;
324  }
325  doca_argp_param_set_short_name(use_rdma_cm_param, "cm");
326  doca_argp_param_set_long_name(use_rdma_cm_param, "use-rdma-cm");
327  doca_argp_param_set_description(use_rdma_cm_param, "Whether to use rdma-cm or oob to setup connection");
330  result = doca_argp_register_param(use_rdma_cm_param);
331  if (result != DOCA_SUCCESS) {
332  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
333  return result;
334  }
335 
336  /* Create and register cm_port_param */
337  result = doca_argp_param_create(&cm_port_param);
338  if (result != DOCA_SUCCESS) {
339  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
340  return result;
341  }
342  doca_argp_param_set_short_name(cm_port_param, "p");
343  doca_argp_param_set_long_name(cm_port_param, "port");
344  doca_argp_param_set_arguments(cm_port_param, "<port-num>");
345  doca_argp_param_set_description(cm_port_param, "CM port number");
348  result = doca_argp_register_param(cm_port_param);
349  if (result != DOCA_SUCCESS) {
350  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
351  return result;
352  }
353 
354  /* Create and register cm_addr_param */
355  result = doca_argp_param_create(&cm_addr_param);
356  if (result != DOCA_SUCCESS) {
357  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
358  return result;
359  }
360  doca_argp_param_set_short_name(cm_addr_param, "sa");
361  doca_argp_param_set_long_name(cm_addr_param, "server-addr");
362  doca_argp_param_set_arguments(cm_addr_param, "<server address>");
363  doca_argp_param_set_description(cm_addr_param,
364  "RDMA cm server device address, required only when using rdma_cm");
367  result = doca_argp_register_param(cm_addr_param);
368  if (result != DOCA_SUCCESS) {
369  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
370  return result;
371  }
372 
373  /* Create and register cm_addr_type_param */
374  result = doca_argp_param_create(&cm_addr_type_param);
375  if (result != DOCA_SUCCESS) {
376  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
377  return result;
378  }
379  doca_argp_param_set_short_name(cm_addr_type_param, "sat");
380  doca_argp_param_set_long_name(cm_addr_type_param, "server-addr-type");
381  doca_argp_param_set_arguments(cm_addr_type_param, "<server address type>");
383  cm_addr_type_param,
384  "RDMA cm server device address type: IPv4, IPv6 or GID, required only when using rdma_cm");
386  doca_argp_param_set_type(cm_addr_type_param, DOCA_ARGP_TYPE_STRING);
387  result = doca_argp_register_param(cm_addr_type_param);
388  if (result != DOCA_SUCCESS) {
389  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
390  return result;
391  }
392 
393  return DOCA_SUCCESS;
394 }
395 
396 /*
397  * Verify CM's parameters received from the user
398  *
399  * @cfg [in]: Program configuration context
400  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
401  */
403 {
404  if (cfg->use_rdma_cm) {
405  if (cfg->is_server) {
406  if (cfg->cm_addr[0] != '\0') {
407  DOCA_LOG_ERR(
408  "Invalid input: when using CM, only client needs to provide the server cm_addr");
410  }
411  } else {
412  if (cfg->cm_addr[0] == '\0') {
413  DOCA_LOG_ERR("Invalid input: when using CM, client must provide the server cm_addr");
415  }
416  }
417  } else {
418  if (cfg->cm_addr[0] != '\0') {
419  DOCA_LOG_ERR("Invalid input: server cm_addr is needed only in case of RDMA CM");
421  }
422  }
423 
424  return DOCA_SUCCESS;
425 }
426 
427 /*
428  * Sample main function
429  *
430  * @argc [in]: command line arguments size
431  * @argv [in]: array of command line arguments
432  * @return: EXIT_SUCCESS on success and EXIT_FAILURE otherwise
433  */
434 int main(int argc, char **argv)
435 {
436  struct rdma_config cfg = {0};
438  struct doca_log_backend *sdk_log;
439  int exit_status = EXIT_FAILURE;
440 
441  /* Set the default configuration values (Example values) */
442  cfg.is_server = true;
443  cfg.cm_port = DEFAULT_CM_PORT;
444  cfg.cm_addr_type = DOCA_RDMA_ADDR_TYPE_IPv4;
445  cfg.gid_index = 0;
446  cfg.use_rdma_cm = false;
447 
448  /* Register a logger backend */
450  if (result != DOCA_SUCCESS)
451  goto sample_exit;
452 
453  /* Register a logger backend for internal SDK errors and warnings */
454  result = doca_log_backend_create_with_file_sdk(stderr, &sdk_log);
455  if (result != DOCA_SUCCESS)
456  goto sample_exit;
458  if (result != DOCA_SUCCESS)
459  goto sample_exit;
460 
461  DOCA_LOG_INFO("Starting the sample");
462 
463  /* Initialize argparser */
465  if (result != DOCA_SUCCESS) {
466  DOCA_LOG_ERR("Failed to init ARGP resources: %s", doca_error_get_descr(result));
467  goto sample_exit;
468  }
469 
470  /* Register RDMA common params */
472  if (result != DOCA_SUCCESS) {
473  DOCA_LOG_ERR("Failed to register sample parameters: %s", doca_error_get_descr(result));
474  goto argp_cleanup;
475  }
476 
477  /* Start argparser */
478  result = doca_argp_start(argc, argv);
479  if (result != DOCA_SUCCESS) {
480  DOCA_LOG_ERR("Failed to parse sample input: %s", doca_error_get_descr(result));
481  goto argp_cleanup;
482  }
483 
484  /* Verify params */
486  if (result != DOCA_SUCCESS) {
487  DOCA_LOG_ERR("Failed to parse sample input: %s", doca_error_get_descr(result));
488  goto argp_cleanup;
489  }
490 
491  /* Start sample */
492  if (cfg.is_server) {
494  if (result != DOCA_SUCCESS) {
495  DOCA_LOG_ERR("rdma_write_server() failed: %s", doca_error_get_descr(result));
496  goto argp_cleanup;
497  }
498  } else {
500  if (result != DOCA_SUCCESS) {
501  DOCA_LOG_ERR("rdma_write_client() failed: %s", doca_error_get_descr(result));
502  goto argp_cleanup;
503  }
504  }
505 
506  exit_status = EXIT_SUCCESS;
507 
508 argp_cleanup:
510 sample_exit:
511  if (exit_status == EXIT_SUCCESS)
512  DOCA_LOG_INFO("Sample finished successfully");
513  else
514  DOCA_LOG_INFO("Sample finished with errors");
515  return exit_status;
516 }
#define NULL
Definition: __stddef_null.h:26
int32_t result
uintptr_t addr
uint64_t len
#define DEFAULT_CM_PORT
Definition: rdma_common.h:62
#define SERVER_ADDR_TYPE_LEN
Definition: rdma_common.h:61
#define SERVER_ADDR_LEN
Definition: rdma_common.h:60
static doca_error_t client_param_callback(void *param, void *config)
DOCA_LOG_REGISTER(GPURDMA_WRITE_REQUESTER::MAIN)
int main(int argc, char **argv)
static doca_error_t register_rdma_params(void)
static doca_error_t cm_addr_type_param_callback(void *param, void *config)
static doca_error_t device_address_callback(void *param, void *config)
static doca_error_t verify_cm_params(struct rdma_config *cfg)
static doca_error_t gid_index_callback(void *param, void *config)
static doca_error_t use_rdma_cm_param_callback(void *param, void *config)
static doca_error_t cm_addr_param_callback(void *param, void *config)
static doca_error_t cm_port_param_callback(void *param, void *config)
static doca_error_t gpu_pci_address_callback(void *param, void *config)
doca_error_t rdma_write_client(struct rdma_config *cfg)
doca_error_t rdma_write_server(struct rdma_config *cfg)
#define MAX_PCI_ADDRESS_LEN
DOCA_EXPERIMENTAL void doca_argp_param_set_description(struct doca_argp_param *param, const char *description)
Set the description of the program param, used during program usage.
DOCA_EXPERIMENTAL void doca_argp_param_set_long_name(struct doca_argp_param *param, const char *name)
Set the long name of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_start(int argc, char **argv)
Parse incoming arguments (cmd line/json).
DOCA_EXPERIMENTAL void doca_argp_param_set_arguments(struct doca_argp_param *param, const char *arguments)
Set the description of the expected arguments of the program param, used during program usage.
DOCA_EXPERIMENTAL doca_error_t doca_argp_init(const char *program_name, void *program_config)
Initialize the parser interface.
DOCA_EXPERIMENTAL void doca_argp_param_set_callback(struct doca_argp_param *param, doca_argp_param_cb_t callback)
Set the callback function of the program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_mandatory(struct doca_argp_param *param)
Mark the program param as mandatory.
DOCA_EXPERIMENTAL doca_error_t doca_argp_param_create(struct doca_argp_param **param)
Create new program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_type(struct doca_argp_param *param, enum doca_argp_type type)
Set the type of the param arguments.
DOCA_EXPERIMENTAL void doca_argp_param_set_short_name(struct doca_argp_param *param, const char *name)
Set the short name of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_destroy(void)
ARG Parser destroy.
DOCA_EXPERIMENTAL doca_error_t doca_argp_register_param(struct doca_argp_param *input_param)
Register a program flag.
@ DOCA_ARGP_TYPE_STRING
Definition: doca_argp.h:56
@ DOCA_ARGP_TYPE_BOOLEAN
Definition: doca_argp.h:58
@ DOCA_ARGP_TYPE_INT
Definition: doca_argp.h:57
#define DOCA_DEVINFO_IBDEV_NAME_SIZE
Buffer size to hold Infiniband/RoCE device name. Including a null terminator.
Definition: doca_dev.h:309
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
DOCA_EXPERIMENTAL doca_error_t doca_log_backend_create_standard(void)
Create default, non configurable backend for application messages.
#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_EXPERIMENTAL doca_error_t doca_log_backend_create_with_file_sdk(FILE *fptr, struct doca_log_backend **backend)
Create a logging backend with a FILE* stream for SDK messages.
DOCA_EXPERIMENTAL doca_error_t doca_log_backend_set_sdk_level(struct doca_log_backend *backend, uint32_t level)
Set the log level limit for SDK logging backends.
@ DOCA_LOG_LEVEL_WARNING
Definition: doca_log.h:47
@ DOCA_RDMA_ADDR_TYPE_IPv6
Definition: doca_rdma.h:58
@ DOCA_RDMA_ADDR_TYPE_IPv4
Definition: doca_rdma.h:57
@ DOCA_RDMA_ADDR_TYPE_GID
Definition: doca_rdma.h:59
const struct ip_frag_config * cfg
Definition: ip_frag_dp.c:0
uint8_t type
Definition: packets.h:0
enum doca_rdma_addr_type cm_addr_type
Definition: rdma_common.h:74
char device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]
Definition: rdma_common.h:65
char cm_addr[SERVER_ADDR_LEN+1]
Definition: rdma_common.h:73
uint32_t gid_index
Definition: rdma_common.h:70
bool use_rdma_cm
Definition: rdma_common.h:71
uint32_t cm_port
Definition: rdma_common.h:72
char gpu_pcie_addr[MAX_PCI_ADDRESS_LEN]
Definition: rdma_common.h:66
char server_ip_addr[MAX_IP_ADDRESS_LEN]
Definition: rdma_common.h:67
bool is_gid_index_set
Definition: rdma_common.h:69
bool is_server
Definition: rdma_common.h:68