NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
eth_l2_fwd.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 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 <signal.h>
27 #include <stdint.h>
28 
29 #include <doca_argp.h>
30 #include <doca_log.h>
31 
32 #include <utils.h>
33 
34 #include "eth_l2_fwd_core.h"
35 
36 DOCA_LOG_REGISTER(ETH_L2_FWD);
37 
38 extern uint32_t max_forwardings;
39 
40 /*
41  * Signal handler
42  *
43  * @signum [in]: The signal received to handle
44  */
45 static void signal_handler(int signum)
46 {
47  if (signum == SIGINT || signum == SIGTERM) {
48  DOCA_LOG_INFO("Signal %d received, preparing to exit", signum);
50  }
51 }
52 
53 /*
54  * ARGP Callback - Handle IB devices names parameter
55  *
56  * @param [in]: Input parameter
57  * @config [in/out]: Program configuration context
58  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
59  */
60 static doca_error_t mlxdevs_names_callback(void *param, void *config)
61 {
62  struct eth_l2_fwd_cfg *app_cfg = (struct eth_l2_fwd_cfg *)config;
63  char *mlxdevs_names = (char *)param;
64  char *current_dev_name;
65  int len;
66 
67  /* Split the devices names */
68  /* First device name */
69  current_dev_name = strtok(mlxdevs_names, ",");
70  if (current_dev_name == NULL) {
71  DOCA_LOG_ERR("Expected two IB devices names, but none entered");
73  }
74 
75  len = strnlen(current_dev_name, DOCA_DEVINFO_IBDEV_NAME_SIZE);
77  DOCA_LOG_ERR("First entered IB device name exceeding the maximum size of %d",
80  }
81  strlcpy(app_cfg->mlxdev_name1, current_dev_name, len + 1);
82 
83  /* Second device name */
84  current_dev_name = strtok(NULL, ",");
85  if (current_dev_name == NULL) {
86  DOCA_LOG_ERR("Expected two IB devices names, but only one entered");
88  }
89 
90  len = strnlen(current_dev_name, DOCA_DEVINFO_IBDEV_NAME_SIZE);
92  DOCA_LOG_ERR("Second entered IB device name exceeding the maximum size of %d",
95  }
96  strlcpy(app_cfg->mlxdev_name2, current_dev_name, len + 1);
97 
98  /* Check that no more names were entered */
99  current_dev_name = strtok(NULL, ",");
100  if (current_dev_name != NULL) {
101  DOCA_LOG_ERR("Entered more than two IB devices names");
103  }
104 
105  if (strncmp(app_cfg->mlxdev_name1, app_cfg->mlxdev_name2, DOCA_DEVINFO_IBDEV_NAME_SIZE) == 0) {
106  DOCA_LOG_ERR("Identical devices names were provided, please enter different names");
108  }
109 
110  return DOCA_SUCCESS;
111 }
112 
113 /*
114  * ARGP Callback - Handle packets receive rate parameter
115  *
116  * @param [in]: Input parameter
117  * @config [in/out]: Program configuration context
118  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
119  */
120 static doca_error_t pkts_recv_rate_callback(void *param, void *config)
121 {
122  struct eth_l2_fwd_cfg *app_cfg = (struct eth_l2_fwd_cfg *)config;
123  int *pkts_recv_rate = (int *)param;
124 
125  if (*pkts_recv_rate <= 0) {
126  DOCA_LOG_ERR("Packets receive rate parameter must be a positive value");
128  }
129 
130  app_cfg->pkts_recv_rate = *pkts_recv_rate;
131 
132  return DOCA_SUCCESS;
133 }
134 
135 /*
136  * ARGP Callback - Handle max packet size parameter
137  *
138  * @param [in]: Input parameter
139  * @config [in/out]: Program configuration context
140  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
141  */
142 static doca_error_t max_pkt_size_callback(void *param, void *config)
143 {
144  struct eth_l2_fwd_cfg *app_cfg = (struct eth_l2_fwd_cfg *)config;
145  int *max_pkt_size = (int *)param;
146 
147  if (*max_pkt_size <= 0) {
148  DOCA_LOG_ERR("Max packet size parameter must be a positive value");
150  }
151 
152  app_cfg->max_pkt_size = *max_pkt_size;
153 
154  return DOCA_SUCCESS;
155 }
156 
157 /*
158  * ARGP Callback - Handle packet max process time parameter
159  *
160  * @param [in]: Input parameter
161  * @config [in/out]: Program configuration context
162  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
163  */
164 static doca_error_t pkt_max_process_time_callback(void *param, void *config)
165 {
166  struct eth_l2_fwd_cfg *app_cfg = (struct eth_l2_fwd_cfg *)config;
167  int *pkt_max_process_time = (int *)param;
168 
169  if (*pkt_max_process_time <= 0) {
170  DOCA_LOG_ERR("Packet max process time parameter must be a positive value");
172  }
173 
174  if (*pkt_max_process_time > UINT16_MAX) {
175  DOCA_LOG_ERR("Packet max process time parameter can not be larger than %d", UINT16_MAX);
177  }
178 
179  app_cfg->pkt_max_process_time = *pkt_max_process_time;
180 
181  return DOCA_SUCCESS;
182 }
183 
184 /*
185  * ARGP Callback - Handle number of task batches parameter
186  *
187  * @param [in]: Input parameter
188  * @config [in/out]: Program configuration context
189  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
190  */
191 static doca_error_t num_task_batches_callback(void *param, void *config)
192 {
193  struct eth_l2_fwd_cfg *app_cfg = (struct eth_l2_fwd_cfg *)config;
194  int *num_task_batches = (int *)param;
195 
196  if (*num_task_batches <= 0) {
197  DOCA_LOG_ERR("Number of task batches parameter must be a positive value");
199  }
200 
201  if (*num_task_batches > UINT16_MAX) {
202  DOCA_LOG_ERR("Number of task batches parameter can not be larger than %d", UINT16_MAX);
204  }
205 
206  app_cfg->num_task_batches = *num_task_batches;
207 
208  return DOCA_SUCCESS;
209 }
210 
211 /*
212  * ARGP Callback - Handle one sided forwarding parameter
213  *
214  * @param [in]: Input parameter
215  * @config [in/out]: Program configuration context
216  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
217  */
218 static doca_error_t one_sided_fwd_callback(void *param, void *config)
219 {
220  struct eth_l2_fwd_cfg *app_cfg = (struct eth_l2_fwd_cfg *)config;
221  int *one_sided_fwd = (int *)param;
222 
223  if (*one_sided_fwd < 0 || *one_sided_fwd > 2) {
224  DOCA_LOG_ERR("One-sided forwarding parameter must be 0, 1 or 2");
226  }
227 
228  app_cfg->one_sided_fwd = *one_sided_fwd;
229 
230  return DOCA_SUCCESS;
231 }
232 
233 /*
234  * ARGP Callback - Handle max forwardings parameter
235  *
236  * @param [in]: Input parameter
237  * @config [in/out]: Program configuration context
238  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
239  */
240 static doca_error_t max_forwardings_callback(void *param, void *config)
241 {
242  (void)config;
243  int *max_fwds = (int *)param;
244 
245  if (*max_fwds < 0) {
246  DOCA_LOG_ERR("Max forwardings parameter must be non-negative");
248  }
249 
250  max_forwardings = *max_fwds;
251 
252  return DOCA_SUCCESS;
253 }
254 
255 /*
256  * Registers all flags used by the application for DOCA argument parser, so that when parsing
257  * it can be parsed accordingly
258  *
259  * @return: DOCA_SUCCESS on success and DOCA_ERROR_... otherwise
260  */
262 {
264  struct doca_argp_param *mlxdevs_names, *pkts_recv_rate, *max_pkt_size, *pkt_max_process_time, *num_task_batches,
265  *one_sided_fwd, *max_fwds;
266 
267  /* Create and register IB devices names param */
268  result = doca_argp_param_create(&mlxdevs_names);
269  if (result != DOCA_SUCCESS) {
270  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
271  return result;
272  }
273  doca_argp_param_set_short_name(mlxdevs_names, "d");
274  doca_argp_param_set_long_name(mlxdevs_names, "devs-names");
275  doca_argp_param_set_arguments(mlxdevs_names, "<name1,name2>");
276  doca_argp_param_set_description(mlxdevs_names,
277  "Set two IB devices names separated by a comma, without spaces.");
280  doca_argp_param_set_mandatory(mlxdevs_names);
281  result = doca_argp_register_param(mlxdevs_names);
282  if (result != DOCA_SUCCESS) {
283  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
284  return result;
285  }
286 
287  /* Create and register packets receive rate param */
288  result = doca_argp_param_create(&pkts_recv_rate);
289  if (result != DOCA_SUCCESS) {
290  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
291  return result;
292  }
293  doca_argp_param_set_short_name(pkts_recv_rate, "r");
294  doca_argp_param_set_long_name(pkts_recv_rate, "rate");
295  doca_argp_param_set_arguments(pkts_recv_rate, "<rate>");
296  doca_argp_param_set_description(pkts_recv_rate, "Set packets receive rate (in [MB/s]), default is 12500.");
299  result = doca_argp_register_param(pkts_recv_rate);
300  if (result != DOCA_SUCCESS) {
301  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
302  return result;
303  }
304 
305  /* Create and register max packet size param */
306  result = doca_argp_param_create(&max_pkt_size);
307  if (result != DOCA_SUCCESS) {
308  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
309  return result;
310  }
311  doca_argp_param_set_short_name(max_pkt_size, "ps");
312  doca_argp_param_set_long_name(max_pkt_size, "pkt-size");
313  doca_argp_param_set_arguments(max_pkt_size, "<size>");
314  doca_argp_param_set_description(max_pkt_size, "Set max packet size (in [B]), default is 1600.");
317  result = doca_argp_register_param(max_pkt_size);
318  if (result != DOCA_SUCCESS) {
319  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
320  return result;
321  }
322 
323  /* Create and register packet max process time param */
324  result = doca_argp_param_create(&pkt_max_process_time);
325  if (result != DOCA_SUCCESS) {
326  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
327  return result;
328  }
329  doca_argp_param_set_short_name(pkt_max_process_time, "t");
330  doca_argp_param_set_long_name(pkt_max_process_time, "time");
331  doca_argp_param_set_arguments(pkt_max_process_time, "<time>");
332  doca_argp_param_set_description(pkt_max_process_time, "Set packet max process time (in [μs]), default is 1.");
334  doca_argp_param_set_type(pkt_max_process_time, DOCA_ARGP_TYPE_INT);
335  result = doca_argp_register_param(pkt_max_process_time);
336  if (result != DOCA_SUCCESS) {
337  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
338  return result;
339  }
340 
341  /* Create and register number of task batches param */
342  result = doca_argp_param_create(&num_task_batches);
343  if (result != DOCA_SUCCESS) {
344  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
345  return result;
346  }
347  doca_argp_param_set_short_name(num_task_batches, "nb");
348  doca_argp_param_set_long_name(num_task_batches, "num-batches");
349  doca_argp_param_set_arguments(num_task_batches, "<num>");
350  doca_argp_param_set_description(num_task_batches, "Set number of task batches, default is 32.");
352  doca_argp_param_set_type(num_task_batches, DOCA_ARGP_TYPE_INT);
353  result = doca_argp_register_param(num_task_batches);
354  if (result != DOCA_SUCCESS) {
355  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
356  return result;
357  }
358 
359  /* Create and register one-sided forwarding param */
360  result = doca_argp_param_create(&one_sided_fwd);
361  if (result != DOCA_SUCCESS) {
362  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
363  return result;
364  }
365  doca_argp_param_set_short_name(one_sided_fwd, "o");
366  doca_argp_param_set_long_name(one_sided_fwd, "one-sided-forwarding");
367  doca_argp_param_set_arguments(one_sided_fwd, "<num>");
369  one_sided_fwd,
370  "Set one-sided forwarding: 0 - two-sided forwarding, 1 - device 1 -> device 2, 2 - device 2 -> device 1. default is 0.");
373  result = doca_argp_register_param(one_sided_fwd);
374  if (result != DOCA_SUCCESS) {
375  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
376  return result;
377  }
378 
379  /* Create and register max forwardings param */
380  result = doca_argp_param_create(&max_fwds);
381  if (result != DOCA_SUCCESS) {
382  DOCA_LOG_ERR("Failed to create ARGP param: %s", doca_error_get_descr(result));
383  return result;
384  }
385  doca_argp_param_set_short_name(max_fwds, "f");
386  doca_argp_param_set_long_name(max_fwds, "max-forwardings");
387  doca_argp_param_set_arguments(max_fwds, "<num>");
389  max_fwds,
390  "Set max forwarded packet batches limit after which the application run will end, default is 0, meaning no limit.");
393  result = doca_argp_register_param(max_fwds);
394  if (result != DOCA_SUCCESS) {
395  DOCA_LOG_ERR("Failed to register program param: %s", doca_error_get_descr(result));
396  return result;
397  }
398 
399  return DOCA_SUCCESS;
400 }
401 
402 /*
403  * Ethernet L2 Forwarding application main function
404  *
405  * @argc [in]: command line arguments size
406  * @argv [in]: array of command line arguments
407  * @return: EXIT_SUCCESS on success and EXIT_FAILURE otherwise
408  */
409 int main(int argc, char **argv)
410 {
411  struct eth_l2_fwd_resources app_resources = {0};
412  struct eth_l2_fwd_cfg app_cfg = {.pkts_recv_rate = ETH_L2_FWD_PKTS_RECV_RATE_DEFAULT,
413  .max_pkt_size = ETH_L2_FWD_MAX_PKT_SIZE_DEFAULT,
414  .pkt_max_process_time = ETH_L2_FWD_PKT_MAX_PROCESS_TIME_DEFAULT,
415  .num_task_batches = ETH_L2_FWD_NUM_TASK_BATCHES_DEFAULT,
416  .one_sided_fwd = 0};
417  struct doca_log_backend *sdk_log;
419  int exit_status = EXIT_SUCCESS;
420 
421  /* Register a logger backend */
423  if (result != DOCA_SUCCESS)
424  return EXIT_FAILURE;
425 
426  /* Register a logger backend for internal SDK errors and warnings */
427  result = doca_log_backend_create_with_file_sdk(stderr, &sdk_log);
428  if (result != DOCA_SUCCESS)
429  return EXIT_FAILURE;
430 
432  if (result != DOCA_SUCCESS)
433  return EXIT_FAILURE;
434 
435  /* Parse cmdline/json arguments */
437  if (result != DOCA_SUCCESS) {
438  DOCA_LOG_ERR("Failed to init ARGP resources: %s", doca_error_get_descr(result));
439  return EXIT_FAILURE;
440  }
441 
442  /* Register application parameters */
444  if (result != DOCA_SUCCESS) {
445  DOCA_LOG_ERR("Failed to register application parameters: %s", doca_error_get_descr(result));
446  exit_status = EXIT_FAILURE;
447  goto destroy_argp;
448  }
449 
450  /* Start Arg Parser */
451  result = doca_argp_start(argc, argv);
452  if (result != DOCA_SUCCESS) {
453  DOCA_LOG_ERR("Failed to parse application input: %s", doca_error_get_descr(result));
454  exit_status = EXIT_FAILURE;
455  goto destroy_argp;
456  }
457 
458  /* Setting the max burst size separately after all the set parameters became permanent */
459  app_cfg.max_burst_size = app_cfg.num_task_batches * ETH_L2_FWD_NUM_TASKS_PER_BATCH;
460 
461  /* Signal handlers for graceful termination */
462  signal(SIGINT, signal_handler);
463  signal(SIGTERM, signal_handler);
464 
465  /* Execute Ethernet L2 Forwarding Application logic */
466  result = eth_l2_fwd_execute(&app_cfg, &app_resources);
467  if (result != DOCA_SUCCESS) {
468  DOCA_LOG_ERR("Failed to execute Ethernet L2 Forwarding Application: %s", doca_error_get_descr(result));
469  exit_status = EXIT_FAILURE;
470  }
471 
472  /* Ethernet L2 Forwarding Application resources cleanup */
473  result = eth_l2_fwd_cleanup(&app_resources);
474  if (result != DOCA_SUCCESS) {
475  DOCA_LOG_ERR("Failed to clean up Ethernet L2 Forwarding Application resources: %s",
477  exit_status = EXIT_FAILURE;
478  }
479 
480 destroy_argp:
481  /* Arg Parser cleanup */
483 
484  return exit_status;
485 }
#define NULL
Definition: __stddef_null.h:26
int32_t result
uint64_t len
DOCA_LOG_REGISTER(ETH_L2_FWD)
static doca_error_t pkt_max_process_time_callback(void *param, void *config)
Definition: eth_l2_fwd.c:164
int main(int argc, char **argv)
Definition: eth_l2_fwd.c:409
static doca_error_t pkts_recv_rate_callback(void *param, void *config)
Definition: eth_l2_fwd.c:120
static doca_error_t num_task_batches_callback(void *param, void *config)
Definition: eth_l2_fwd.c:191
static doca_error_t max_forwardings_callback(void *param, void *config)
Definition: eth_l2_fwd.c:240
static doca_error_t mlxdevs_names_callback(void *param, void *config)
Definition: eth_l2_fwd.c:60
uint32_t max_forwardings
static doca_error_t max_pkt_size_callback(void *param, void *config)
Definition: eth_l2_fwd.c:142
static void signal_handler(int signum)
Definition: eth_l2_fwd.c:45
static doca_error_t register_eth_l2_fwd_params(void)
Definition: eth_l2_fwd.c:261
static doca_error_t one_sided_fwd_callback(void *param, void *config)
Definition: eth_l2_fwd.c:218
doca_error_t eth_l2_fwd_cleanup(struct eth_l2_fwd_resources *state)
doca_error_t eth_l2_fwd_execute(struct eth_l2_fwd_cfg *cfg, struct eth_l2_fwd_resources *state)
void eth_l2_fwd_force_stop(void)
#define ETH_L2_FWD_MAX_PKT_SIZE_DEFAULT
#define ETH_L2_FWD_PKT_MAX_PROCESS_TIME_DEFAULT
#define ETH_L2_FWD_NUM_TASK_BATCHES_DEFAULT
#define ETH_L2_FWD_NUM_TASKS_PER_BATCH
#define ETH_L2_FWD_PKTS_RECV_RATE_DEFAULT
static struct app_gpu_cfg app_cfg
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_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
uint16_t num_task_batches
uint8_t one_sided_fwd
uint32_t max_pkt_size
uint32_t pkts_recv_rate
uint16_t pkt_max_process_time
size_t strlcpy(char *dst, const char *src, size_t size)
Definition: utils.c:123