eal: support --no-shconf for hugepage info
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 13 Jul 2018 12:47:59 +0000 (13:47 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Jul 2018 13:33:07 +0000 (15:33 +0200)
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>
lib/librte_eal/bsdapp/eal/eal_hugepage_info.c
lib/librte_eal/linuxapp/eal/eal_hugepage_info.c

index 836feb6..1e8f5df 100644 (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 ) {
index 7eca711..7f8e2fd 100644 (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(),