CNDP  22.08.0
jcfg.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2019-2022 Intel Corporation.
3  */
4 
5 #ifndef _JCFG_H_
6 #define _JCFG_H_
7 
13 #include <pthread.h> // for pthread_t
14 #include <sched.h> // for cpu_set_t
15 #include <stdint.h> // for uint16_t, uint32_t, uint64_t, int64_t
16 #include <sys/socket.h> // for accept, bind, listen, socket, AF_UNIX
17 #include <sys/queue.h> // for STAILQ_ENTRY, STAILQ_HEAD
18 #include <sys/un.h> // for sockaddr_un
19 #include <bsd/sys/bitstring.h>
20 #include <json-c/json_object.h>
21 #include <json-c/json_tokener.h>
22 #include <json-c/json_util.h>
23 #include <json-c/json_visit.h> // for json_c_visit_userfunc
24 #include <json-c/linkhash.h>
25 #include <cne_common.h> // for CNDP_API, CNE_STD_C11
26 #include <cne_log.h>
27 #include <cne_mmap.h> // for mmap_t
28 #include <cne_thread.h>
29 #include <pktmbuf.h> // for pktmbuf_info_t
30 
31 #define DEFAULT_CHUNK_SIZE 1024
32 #define UMEM_MAX_REGIONS 128
33 #define JCFG_MAX_STRING_SIZE 32
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 struct json_object;
40 
44 #define APP_TAG "application"
45 #define DEFAULT_TAG "defaults"
46 #define OPTION_TAG "options"
47 #define UMEM_TAG "umems"
48 #define LPORT_TAG "lports"
49 #define LGROUP_TAG "lcore-groups"
50 #define THREAD_TAG "threads"
51 #define LPORT_GROUP_TAG "lport-groups"
52 #define USER_TAG "users"
53 
59 #define JCFG_TAG_NAMES \
60  { \
61  APP_TAG, DEFAULT_TAG, OPTION_TAG, UMEM_TAG, LPORT_TAG, LGROUP_TAG, THREAD_TAG, \
62  LPORT_GROUP_TAG, USER_TAG, \
63  }
64 
68 typedef enum {
69  /* jcfg_opt_t types */
73  /* Non jcfg_opt_t types */
83 
87 typedef enum {
88  UNKNOWN_OPT_TYPE,
89  BOOLEAN_OPT_TYPE,
90  STRING_OPT_TYPE,
91  INTEGER_OPT_TYPE,
92  ARRAY_OPT_TYPE,
93  OBJECT_OPT_TYPE
94 } obj_type_t;
95 
99 typedef struct obj_value {
101  uint16_t array_sz;
102  uint16_t reserved; /* reserved space */
103  CNE_STD_C11 union { /* Use union members directly */
104  int boolean;
105  int64_t value;
106  char *str;
107  struct obj_value **arr;
108  };
110 
114 #define JCFG_COMMON_HDR(_t) \
115  STAILQ_ENTRY(_t) next; \
116  char *name; \
117  char *desc; \
118  void *priv_; \
119  jcfg_cb_type_t cbtype
124 typedef struct jcfg_hdr {
126 } jcfg_hdr_t;
127 
131 typedef struct jcfg_opt {
133  obj_value_t val;
134 } jcfg_opt_t;
135 
136 typedef struct region_info {
137  char *addr;
139  uint32_t bufcnt;
140 } region_info_t;
141 
145 typedef struct jcfg_umem {
147  mmap_t *mm;
148  uint32_t bufcnt;
149  uint32_t bufsz;
150  uint16_t mtype;
151  uint16_t rxdesc;
152  uint16_t txdesc;
153  uint16_t idx;
154  uint16_t shared_umem;
155  uint16_t region_cnt;
156  region_info_t *rinfo;
158 
162 typedef struct jcfg_lport {
164  char *netdev;
165  char *pmd_name;
166  char *pmd_opts;
167  char *umem_name;
169  uint16_t region_idx;
170  uint16_t lpid;
171  uint16_t qid;
172  uint16_t busy_timeout;
173  uint16_t busy_budget;
174  uint16_t flags;
176 
178 #define JCFG_LPORT_PMD_NAME "pmd"
179 #define JCFG_LPORT_UMEM_NAME "umem"
180 #define JCFG_LPORT_REGION_NAME "region"
181 #define JCFG_LPORT_QID_NAME "qid"
182 #define JCFG_LPORT_DESCRIPTION_NAME "description"
183 #define JCFG_LPORT_DESC_NAME "desc"
184 #define JCFG_LPORT_BUSY_POLL_NAME "busy_poll"
185 #define JCFG_LPORT_BUSY_POLLING_NAME "busy_polling"
186 #define JCFG_LPORT_BUSY_TIMEOUT_NAME "busy_timeout"
187 #define JCFG_LPORT_BUSY_BUDGET_NAME "busy_budget"
188 #define JCFG_LPORT_UNPRIVILEGED_NAME "unprivileged"
189 #define JCFG_LPORT_FORCE_WAKEUP_NAME "force_wakeup"
190 #define JCFG_LPORT_SKB_MODE_NAME "skb_mode"
191 
195 typedef struct jcfg_lgroup {
197  uint16_t lcore_cnt;
198  cpu_set_t lcore_bitmap;
199 } jcfg_lgroup_t;
200 
204 typedef struct jcfg_thd {
206  char *group_name;
207  char *thread_type;
209  uint16_t lport_cnt;
210  uint16_t lport_sz;
211  uint16_t idx;
212  char **lport_names;
214  int tid;
215  volatile uint16_t quit;
216  volatile uint16_t pause;
218 
222 typedef struct jcfg_lport_group {
224  char **netdev_names;
225  int num_netdev_names;
226  char **thread_names;
228  void *qlist;
229  uint16_t *max_q;
230  uint16_t total_q;
231  char *pmd_name;
232  char *pmd_opts;
233  char *umem_name;
235  uint16_t busy_timeout;
236  uint16_t busy_budget;
237  uint16_t flags;
239 
241 #define JCFG_LPORT_GROUP_NETDEV_NAMES_NAME "netdevs"
242 #define JCFG_LPORT_GROUP_QUEUES_NAME "queues"
243 #define JCFG_LPORT_GROUP_THREAD_NAMES_NAME "threads"
244 
248 typedef struct jcfg_user {
250  obj_value_t val;
251 } jcfg_user_t;
252 
258 typedef struct jcfg_list {
259  int cnt;
260  int sz;
261  void **list;
262 } jcfg_list_t;
263 
267 typedef struct jcfg_data {
268  STAILQ_HEAD(, jcfg_opt) application;
269  STAILQ_HEAD(, jcfg_opt) defaults;
270  STAILQ_HEAD(, jcfg_opt) options;
271  STAILQ_HEAD(, jcfg_umem) umems;
274  STAILQ_HEAD(, jcfg_thd) threads;
276  STAILQ_HEAD(, jcfg_lport_group) lport_groups;
284  int app_count;
286  int opt_count;
291 
295 typedef union {
296  jcfg_hdr_t *hdr;
297  jcfg_opt_t *app;
298  jcfg_opt_t *def;
299  jcfg_opt_t *opt;
300  jcfg_umem_t *umem;
301  jcfg_lport_t *lport;
302  jcfg_lgroup_t *lgroup;
303  jcfg_thd_t *thd;
305  jcfg_user_t *usr;
307 
308 struct jcfg_info_s;
309 
324 typedef int jcfg_parse_cb_t(struct jcfg_info_s *jinfo, void *obj, void *arg, int idx);
325 
329 typedef struct jcfg_info_s {
330  uint32_t flags;
331  int listen_sock;
332  struct sockaddr_un sun;
333  volatile int running;
334  void *cfg;
337 
341 enum {
342  JCFG_NO_FLAGS = 0,
343  JCFG_INFO_VERBOSE = (1 << 0),
344  JCFG_DEBUG_DECODING = (1 << 1),
345  JCFG_DEBUG_PARSING = (1 << 2),
346  JCFG_INFO_STRICT_FLAG = (1 << 3),
347  JCFG_PARSE_FILE = (1 << 4),
348  JCFG_PARSE_SOCKET = (1 << 5),
349  JCFG_PARSE_STRING = (1 << 6),
350 };
351 
366 typedef int jcfg_cb_t(jcfg_info_t *jinfo, void *obj, void *arg, int idx);
367 
382 CNDP_API int jcfg_object_foreach(jcfg_info_t *jinfo, jcfg_cb_type_t cbtype, jcfg_cb_t *func,
383  void *arg);
384 
388 #define jcfg_application_foreach(j, f, a) jcfg_object_foreach(j, JCFG_APPLICATION_TYPE, f, a)
389 #define jcfg_defaults_foreach(j, f, a) jcfg_object_foreach(j, JCFG_DEFAULT_TYPE, f, a)
390 #define jcfg_option_foreach(j, f, a) jcfg_object_foreach(j, JCFG_OPTION_TYPE, f, a)
391 #define jcfg_umem_foreach(j, f, a) jcfg_object_foreach(j, JCFG_UMEM_TYPE, f, a)
392 #define jcfg_lport_foreach(j, f, a) jcfg_object_foreach(j, JCFG_LPORT_TYPE, f, a)
393 #define jcfg_lgroup_foreach(j, f, a) jcfg_object_foreach(j, JCFG_LGROUP_TYPE, f, a)
394 #define jcfg_thread_foreach(j, f, a) jcfg_object_foreach(j, JCFG_THREAD_TYPE, f, a)
395 #define jcfg_lport_group_foreach(j, f, a) jcfg_object_foreach(j, JCFG_LPORT_GROUP_TYPE, f, a)
396 #define jcfg_user_foreach(j, f, a) jcfg_object_foreach(j, JCFG_USER_TYPE, f, a)
397 
410 CNDP_API void *jcfg_object_lookup(jcfg_info_t *jinfo, jcfg_cb_type_t cbtype, const char *name);
411 
412 #define jcfg_lookup_option(j, n) (jcfg_opt_t *)jcfg_object_lookup(j, JCFG_OPTION_TYPE, n)
413 #define jcfg_lookup_default(j, n) (jcfg_opt_t *)jcfg_object_lookup(j, JCFG_DEFAULT_TYPE, n)
414 #define jcfg_lookup_application(j, n) (jcfg_opt_t *)jcfg_object_lookup(j, JCFG_APPLICATION_TYPE, n)
415 #define jcfg_lookup_umem(j, n) (jcfg_umem_t *)jcfg_object_lookup(j, JCFG_UMEM_TYPE, n)
416 #define jcfg_lookup_lport(j, n) (jcfg_lport_t *)jcfg_object_lookup(j, JCFG_LPORT_TYPE, n)
417 #define jcfg_lookup_lport(j, n) (jcfg_lport_t *)jcfg_object_lookup(j, JCFG_LPORT_TYPE, n)
418 #define jcfg_lookup_lgroup(j, n) (jcfg_lgroup_t *)jcfg_object_lookup(j, JCFG_LGROUP_TYPE, n)
419 #define jcfg_lookup_thread(j, n) (jcfg_thd_t *)jcfg_object_lookup(j, JCFG_THREAD_TYPE, n)
420 #define jcfg_lookup_lport_group(j, n) \
421  (jcfg_lport_group_t *)jcfg_object_lookup(j, JCFG_LPORT_GROUP_TYPE, n)
422 #define jcfg_lookup_user(j, n) (jcfg_user_t *)jcfg_object_lookup(j, JCFG_USER_TYPE, n)
423 
434 CNDP_API int jcfg_num_objects(jcfg_info_t *jinfo, jcfg_cb_type_t cbtype);
435 
439 #define jcfg_num_applications(j) jcfg_num_objects(j, JCFG_APPLICATION_TYPE)
440 #define jcfg_num_defaults(j) jcfg_num_objects(j, JCFG_DEFAULT_TYPE)
441 #define jcfg_num_options(j) jcfg_num_objects(j, JCFG_OPTION_TYPE)
442 #define jcfg_num_lports(j) jcfg_num_objects(j, JCFG_LPORT_TYPE)
443 #define jcfg_num_lgroups(j) jcfg_num_objects(j, JCFG_LGROUP_TYPE)
444 #define jcfg_num_threads(j) jcfg_num_objects(j, JCFG_THREAD_TYPE)
445 #define jcfg_num_lport_groups(j) jcfg_num_objects(j, JCFG_LPORT_GROUP_TYPE)
446 #define jcfg_num_umems(j) jcfg_num_objects(j, JCFG_UMEM_TYPE)
447 
460 CNDP_API int jcfg_default_get(jcfg_info_t *jinfo, const char *name, uint64_t *val);
461 
474 CNDP_API int jcfg_default_array_get(jcfg_info_t *jinfo, const char *name, obj_value_t **val_arr);
475 
488 static inline int
489 jcfg_default_get_bool(jcfg_info_t *jinfo, const char *name, uint32_t *v)
490 {
491  uint64_t val;
492 
493  if (jcfg_default_get(jinfo, name, &val) < 0)
494  return -1;
495  *v = (uint32_t)val;
496  return 0;
497 }
498 
511 static inline int
512 jcfg_default_get_u32(jcfg_info_t *jinfo, const char *name, uint32_t *v)
513 {
514  uint64_t val;
515 
516  if (jcfg_default_get(jinfo, name, &val) < 0)
517  return -1;
518  *v = (uint32_t)val;
519  return 0;
520 }
521 
534 static inline int
535 jcfg_default_get_u16(jcfg_info_t *jinfo, const char *name, uint16_t *v)
536 {
537  uint64_t val;
538 
539  if (jcfg_default_get(jinfo, name, &val) < 0)
540  return -1;
541  *v = (uint16_t)val;
542  return 0;
543 }
544 
557 static inline int
558 jcfg_default_get_string(jcfg_info_t *jinfo, const char *name, char **v)
559 {
560  uint64_t val;
561 
562  if (jcfg_default_get(jinfo, name, &val) < 0)
563  return -1;
564  *v = (char *)val;
565  return 0;
566 }
567 
580 CNDP_API int jcfg_option_get(jcfg_info_t *jinfo, const char *name, uint64_t *val);
581 
594 CNDP_API int jcfg_option_array_get(jcfg_info_t *jinfo, const char *name, obj_value_t **val_arr);
595 
608 static inline int
609 jcfg_option_get_string(jcfg_info_t *jinfo, const char *name, char **v)
610 {
611  uint64_t val;
612 
613  if (jcfg_option_get(jinfo, name, &val) < 0)
614  return -1;
615  *v = (char *)val;
616  return 0;
617 }
618 
630 CNDP_API jcfg_info_t *jcfg_parser(int flags, const char *s);
631 
638 CNDP_API void jcfg_destroy(jcfg_info_t *jinfo);
639 
653 CNDP_API int jcfg_decode(jcfg_info_t *jinfo, const char *key, void *arg);
654 
655 /********************************************************************
656  * Routines to create and destroy a Unix Domain Socket for jcfg parsing
657  */
658 
669 CNDP_API int jcfg_socket_create(jcfg_info_t *jinfo, const char *runtime_dir);
670 
677 CNDP_API void jcfg_socket_destroy(jcfg_info_t *jinfo);
678 
679 /********************************************************************
680  * Routine to add, remove or find decoders for parsing jcfg sections
681  */
682 
693 CNDP_API int jcfg_add_decoder(const char *section, json_c_visit_userfunc *func);
694 
703 CNDP_API int jcfg_del_decoder(const char *section);
704 
713 CNDP_API json_c_visit_userfunc *jcfg_get_decoder(const char *section);
714 
715 /********************************************************************
716  * Helper routine(s) for accessing internal data or dumping information
717  */
718 
727 CNDP_API jcfg_data_t *jcfg_get_data(jcfg_info_t *jinfo);
728 
739 CNDP_API jcfg_umem_t *jcfg_umem_by_index(jcfg_info_t *jinfo, int idx);
740 
751 CNDP_API char *jcfg_lport_region(jcfg_lport_t *lport, uint32_t *objcnt);
752 
763 CNDP_API int jcfg_json_string_set(jcfg_info_t *jinfo, const char *str);
764 
775 CNDP_API struct json_object *jcfg_object_by_name(jcfg_info_t *jinfo, const char *key);
776 
787 CNDP_API jcfg_lport_t *jcfg_lport_by_index(jcfg_info_t *jinfo, int idx);
788 
799 CNDP_API jcfg_thd_t *jcfg_thd_by_index(jcfg_info_t *jinfo, int idx);
800 
809 CNDP_API int jcfg_dump_object(struct json_object *obj);
810 
821 CNDP_API int jcfg_dump_at(jcfg_info_t *jinfo, const char *key);
822 
831 CNDP_API int jcfg_dump(jcfg_info_t *jinfo);
832 
836 CNDP_API void jcfg_dump_info(void);
837 
838 #ifdef __cplusplus
839 }
840 #endif
841 
842 #endif /* _JCFG_H_ */
#define CNE_STD_C11
Definition: cne_common.h:91
void mmap_t
Definition: cne_mmap.h:55
CNDP_API int jcfg_default_get(jcfg_info_t *jinfo, const char *name, uint64_t *val)
CNDP_API int jcfg_option_array_get(jcfg_info_t *jinfo, const char *name, obj_value_t **val_arr)
CNDP_API jcfg_info_t * jcfg_parser(int flags, const char *s)
CNDP_API int jcfg_option_get(jcfg_info_t *jinfo, const char *name, uint64_t *val)
static int jcfg_default_get_u32(jcfg_info_t *jinfo, const char *name, uint32_t *v)
Definition: jcfg.h:517
CNDP_API int jcfg_num_objects(jcfg_info_t *jinfo, jcfg_cb_type_t cbtype)
struct jcfg_thd jcfg_thd_t
CNDP_API void jcfg_dump_info(void)
CNDP_API int jcfg_default_array_get(jcfg_info_t *jinfo, const char *name, obj_value_t **val_arr)
CNDP_API jcfg_thd_t * jcfg_thd_by_index(jcfg_info_t *jinfo, int idx)
int jcfg_parse_cb_t(struct jcfg_info_s *jinfo, void *obj, void *arg, int idx)
Definition: jcfg.h:329
CNDP_API int jcfg_socket_create(jcfg_info_t *jinfo, const char *runtime_dir)
int jcfg_cb_t(jcfg_info_t *jinfo, void *obj, void *arg, int idx)
Definition: jcfg.h:371
static int jcfg_default_get_bool(jcfg_info_t *jinfo, const char *name, uint32_t *v)
Definition: jcfg.h:494
CNDP_API int jcfg_object_foreach(jcfg_info_t *jinfo, jcfg_cb_type_t cbtype, jcfg_cb_t *func, void *arg)
static int jcfg_default_get_u16(jcfg_info_t *jinfo, const char *name, uint16_t *v)
Definition: jcfg.h:540
@ JCFG_DEBUG_PARSING
Definition: jcfg.h:350
@ JCFG_PARSE_STRING
Definition: jcfg.h:354
@ JCFG_PARSE_FILE
Definition: jcfg.h:352
@ JCFG_PARSE_SOCKET
Definition: jcfg.h:353
@ JCFG_INFO_STRICT_FLAG
Definition: jcfg.h:351
@ JCFG_DEBUG_DECODING
Definition: jcfg.h:349
@ JCFG_INFO_VERBOSE
Definition: jcfg.h:348
CNDP_API int jcfg_dump_object(struct json_object *obj)
struct jcfg_opt jcfg_opt_t
jcfg_cb_type_t
Definition: jcfg.h:68
@ JCFG_USER_TYPE
Definition: jcfg.h:79
@ JCFG_DEFAULT_TYPE
Definition: jcfg.h:71
@ JCFG_OPTION_TYPE
Definition: jcfg.h:72
@ JCFG_THREAD_TYPE
Definition: jcfg.h:77
@ JCFG_APPLICATION_TYPE
Definition: jcfg.h:70
@ JCFG_LPORT_TYPE
Definition: jcfg.h:75
@ JCFG_MAX_TYPES
Definition: jcfg.h:81
@ JCFG_LGROUP_TYPE
Definition: jcfg.h:76
@ JCFG_UMEM_TYPE
Definition: jcfg.h:74
@ JCFG_LPORT_GROUP_TYPE
Definition: jcfg.h:78
CNDP_API int jcfg_decode(jcfg_info_t *jinfo, const char *key, void *arg)
CNDP_API int jcfg_dump(jcfg_info_t *jinfo)
struct obj_value obj_value_t
struct jcfg_lport_group jcfg_lport_group_t
CNDP_API struct json_object * jcfg_object_by_name(jcfg_info_t *jinfo, const char *key)
CNDP_API json_c_visit_userfunc * jcfg_get_decoder(const char *section)
struct jcfg_info_s jcfg_info_t
struct jcfg_user jcfg_user_t
CNDP_API int jcfg_del_decoder(const char *section)
CNDP_API int jcfg_json_string_set(jcfg_info_t *jinfo, const char *str)
CNDP_API char * jcfg_lport_region(jcfg_lport_t *lport, uint32_t *objcnt)
CNDP_API jcfg_lport_t * jcfg_lport_by_index(jcfg_info_t *jinfo, int idx)
struct jcfg_lport jcfg_lport_t
CNDP_API jcfg_data_t * jcfg_get_data(jcfg_info_t *jinfo)
CNDP_API void * jcfg_object_lookup(jcfg_info_t *jinfo, jcfg_cb_type_t cbtype, const char *name)
obj_type_t
Definition: jcfg.h:87
CNDP_API void jcfg_destroy(jcfg_info_t *jinfo)
CNDP_API int jcfg_dump_at(jcfg_info_t *jinfo, const char *key)
struct jcfg_hdr jcfg_hdr_t
CNDP_API void jcfg_socket_destroy(jcfg_info_t *jinfo)
struct jcfg_list jcfg_list_t
CNDP_API int jcfg_add_decoder(const char *section, json_c_visit_userfunc *func)
CNDP_API jcfg_umem_t * jcfg_umem_by_index(jcfg_info_t *jinfo, int idx)
struct jcfg_umem jcfg_umem_t
struct jcfg_data jcfg_data_t
static int jcfg_option_get_string(jcfg_info_t *jinfo, const char *name, char **v)
Definition: jcfg.h:614
struct jcfg_lgroup jcfg_lgroup_t
static int jcfg_default_get_string(jcfg_info_t *jinfo, const char *name, char **v)
Definition: jcfg.h:563
jcfg_list_t thd_list
Definition: jcfg.h:285
STAILQ_HEAD(, jcfg_umem) umems
STAILQ_HEAD(, jcfg_lport) lports
STAILQ_HEAD(, jcfg_opt) application
int app_count
Definition: jcfg.h:289
int lport_group_count
Definition: jcfg.h:293
int opt_count
Definition: jcfg.h:291
int thread_count
Definition: jcfg.h:286
STAILQ_HEAD(, jcfg_opt) defaults
int default_count
Definition: jcfg.h:290
int lport_count
Definition: jcfg.h:287
jcfg_list_t lport_list
Definition: jcfg.h:283
int lgroup_count
Definition: jcfg.h:292
int user_count
Definition: jcfg.h:294
jcfg_list_t umem_list
Definition: jcfg.h:284
int umem_count
Definition: jcfg.h:288
Definition: jcfg.h:129
JCFG_COMMON_HDR(jcfg_hdr)
struct sockaddr_un sun
Definition: jcfg.h:337
void * cfg
Definition: jcfg.h:339
uint32_t flags
Definition: jcfg.h:335
jcfg_parse_cb_t * cb
Definition: jcfg.h:340
volatile int running
Definition: jcfg.h:338
int listen_sock
Definition: jcfg.h:336
JCFG_COMMON_HDR(jcfg_lgroup)
cpu_set_t lcore_bitmap
Definition: jcfg.h:203
uint16_t lcore_cnt
Definition: jcfg.h:202
int sz
Definition: jcfg.h:265
void ** list
Definition: jcfg.h:266
int cnt
Definition: jcfg.h:264
JCFG_COMMON_HDR(jcfg_lport_group)
uint16_t flags
Definition: jcfg.h:242
uint16_t busy_budget
Definition: jcfg.h:241
int num_thread_names
Definition: jcfg.h:232
jcfg_umem_t * umem
Definition: jcfg.h:239
uint16_t total_q
Definition: jcfg.h:235
uint16_t busy_timeout
Definition: jcfg.h:240
char * pmd_opts
Definition: jcfg.h:237
char * umem_name
Definition: jcfg.h:238
int num_netdev_names
Definition: jcfg.h:230
uint16_t * max_q
Definition: jcfg.h:234
char ** thread_names
Definition: jcfg.h:231
char ** netdev_names
Definition: jcfg.h:229
char * pmd_name
Definition: jcfg.h:236
void * qlist
Definition: jcfg.h:233
uint16_t flags
Definition: jcfg.h:179
uint16_t busy_budget
Definition: jcfg.h:178
jcfg_umem_t * umem
Definition: jcfg.h:173
uint16_t busy_timeout
Definition: jcfg.h:177
char * pmd_opts
Definition: jcfg.h:171
char * umem_name
Definition: jcfg.h:172
JCFG_COMMON_HDR(jcfg_lport)
uint16_t lpid
Definition: jcfg.h:175
char * netdev
Definition: jcfg.h:169
uint16_t region_idx
Definition: jcfg.h:174
char * pmd_name
Definition: jcfg.h:170
uint16_t qid
Definition: jcfg.h:176
Definition: jcfg.h:136
JCFG_COMMON_HDR(jcfg_opt)
obj_value_t val
Definition: jcfg.h:138
Definition: jcfg.h:209
uint16_t lport_sz
Definition: jcfg.h:215
uint16_t idx
Definition: jcfg.h:216
jcfg_lport_t ** lports
Definition: jcfg.h:218
volatile uint16_t quit
Definition: jcfg.h:220
char ** lport_names
Definition: jcfg.h:217
int tid
Definition: jcfg.h:219
uint16_t lport_cnt
Definition: jcfg.h:214
char * thread_type
Definition: jcfg.h:212
JCFG_COMMON_HDR(jcfg_thd)
jcfg_lgroup_t * group
Definition: jcfg.h:213
volatile uint16_t pause
Definition: jcfg.h:221
char * group_name
Definition: jcfg.h:211
mmap_t * mm
Definition: jcfg.h:152
uint32_t bufsz
Definition: jcfg.h:154
uint16_t idx
Definition: jcfg.h:158
JCFG_COMMON_HDR(jcfg_umem)
uint16_t rxdesc
Definition: jcfg.h:156
uint32_t bufcnt
Definition: jcfg.h:153
uint16_t txdesc
Definition: jcfg.h:157
region_info_t * rinfo
Definition: jcfg.h:161
uint16_t shared_umem
Definition: jcfg.h:159
uint16_t mtype
Definition: jcfg.h:155
uint16_t region_cnt
Definition: jcfg.h:160
obj_value_t val
Definition: jcfg.h:255
JCFG_COMMON_HDR(jcfg_user)
Definition: jcfg.h:99
char * str
Definition: jcfg.h:106
obj_type_t type
Definition: jcfg.h:100
int64_t value
Definition: jcfg.h:105
uint16_t array_sz
Definition: jcfg.h:101
int boolean
Definition: jcfg.h:104