eal: support --no-shconf for hugepage info

Do not create any shared hugepage size info files if we were
asked to not create any shared files.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
Anatoly Burakov 2018-07-13 13:47:59 +01:00 committed by Thomas Monjalon
parent 5848e3d281
commit 7296447acb
2 changed files with 8 additions and 0 deletions

View File

@ -101,6 +101,10 @@ eal_hugepage_info_init(void)
hpi->num_pages[0] = num_buffers;
hpi->lock_descriptor = fd;
/* for no shared files mode, do not create shared memory config */
if (internal_config.no_shconf)
return 0;
tmp_hpi = create_shared_memory(eal_hugepage_info_path(),
sizeof(internal_config.hugepage_info));
if (tmp_hpi == NULL ) {

View File

@ -446,6 +446,10 @@ eal_hugepage_info_init(void)
if (hugepage_info_init() < 0)
return -1;
/* for no shared files mode, we're done */
if (internal_config.no_shconf)
return 0;
hpi = &internal_config.hugepage_info[0];
tmp_hpi = create_shared_memory(eal_hugepage_info_path(),