[v3,3/8] eal: add support for no-shconf for hugepage info
Checks
Commit Message
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>
---
Notes:
RFC->v1:
- Use --no-shconf only
lib/librte_eal/bsdapp/eal/eal_hugepage_info.c | 4 ++++
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 4 ++++
2 files changed, 8 insertions(+)
@@ -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 ) {
@@ -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(),