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:
parent
5848e3d281
commit
7296447acb
@ -101,6 +101,10 @@ eal_hugepage_info_init(void)
|
|||||||
hpi->num_pages[0] = num_buffers;
|
hpi->num_pages[0] = num_buffers;
|
||||||
hpi->lock_descriptor = fd;
|
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(),
|
tmp_hpi = create_shared_memory(eal_hugepage_info_path(),
|
||||||
sizeof(internal_config.hugepage_info));
|
sizeof(internal_config.hugepage_info));
|
||||||
if (tmp_hpi == NULL ) {
|
if (tmp_hpi == NULL ) {
|
||||||
|
@ -446,6 +446,10 @@ eal_hugepage_info_init(void)
|
|||||||
if (hugepage_info_init() < 0)
|
if (hugepage_info_init() < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* for no shared files mode, we're done */
|
||||||
|
if (internal_config.no_shconf)
|
||||||
|
return 0;
|
||||||
|
|
||||||
hpi = &internal_config.hugepage_info[0];
|
hpi = &internal_config.hugepage_info[0];
|
||||||
|
|
||||||
tmp_hpi = create_shared_memory(eal_hugepage_info_path(),
|
tmp_hpi = create_shared_memory(eal_hugepage_info_path(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user