- if (unformat (line_input, "heapsize %s", &chroot_path))
- {
- vec_terminate_c_string (chroot_path);
- VCFG_DBG (0,
- "VCL<%d>: configured heapsize %s, actual heapsize %ld"
- " (0x%lx)", getpid (), chroot_path, vcl_cfg->heapsize,
- vcl_cfg->heapsize);
- vec_free (chroot_path);
- }
- else if (unformat (line_input, "api-prefix %s", &chroot_path))
- {
- vec_terminate_c_string (chroot_path);
- if (vcl_cfg->vpp_api_filename)
- vec_free (vcl_cfg->vpp_api_filename);
- vcl_cfg->vpp_api_filename = format (0, "/%s-vpe-api%c",
- chroot_path, 0);
- vl_set_memory_root_path ((char *) chroot_path);
-
- VCFG_DBG (0,
- "VCL<%d>: configured api-prefix (%s) and api filename"
- " (%s)", getpid (), chroot_path,
- vcl_cfg->vpp_api_filename);
- chroot_path = 0; /* Don't vec_free() it! */
+ if (unformat (line_input, "heapsize %U", unformat_memory_size,
+ &vcl_cfg->heapsize))
+ {
+ VCFG_DBG (0, "VCL<%d>: configured heapsize %lu", getpid (),
+ (unsigned long) vcl_cfg->heapsize);
+ }
+ else
+ if (unformat
+ (line_input, "max-workers %u", &vcl_cfg->max_workers))
+ {
+ VCFG_DBG (0, "VCL<%d>: configured max-workers %u", getpid (),
+ vcl_cfg->max_workers);
+ }
+ else if (unformat (line_input, "api-prefix %s",
+ &vcl_cfg->vpp_api_chroot))
+ {
+ vec_terminate_c_string (vcl_cfg->vpp_api_chroot);
+ VCFG_DBG (0, "VCL<%d>: configured api-prefix (%s) ", getpid (),
+ vcl_cfg->vpp_api_chroot);