From: Anatoly Burakov Date: Fri, 13 Jul 2018 12:47:59 +0000 (+0100) Subject: eal: support --no-shconf for hugepage info X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7296447acb9343d2d64005d6b78eafd58909993c;p=dpdk.git 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 --- diff --git a/lib/librte_eal/bsdapp/eal/eal_hugepage_info.c b/lib/librte_eal/bsdapp/eal/eal_hugepage_info.c index 836feb6727..1e8f5df234 100644 --- a/lib/librte_eal/bsdapp/eal/eal_hugepage_info.c +++ b/lib/librte_eal/bsdapp/eal/eal_hugepage_info.c @@ -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 ) { diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c index 7eca711ba7..7f8e2fd9ca 100644 --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c @@ -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(),