From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
ray.kinsella@intel.com, kuralamudhan.ramakrishnan@intel.com,
louise.m.daly@intel.com, ferruh.yigit@intel.com,
konstantin.ananyev@intel.com
Subject: [dpdk-dev] [RFC 02/10] eal: make --no-shconf an alias for --no-shared-files
Date: Thu, 31 May 2018 15:32:25 +0100 [thread overview]
Message-ID: <814570b61c300b6e745d0d40bb31db5e94e012b8.1527776837.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1527776837.git.anatoly.burakov@intel.com>
In-Reply-To: <cover.1527776837.git.anatoly.burakov@intel.com>
Move all functionality associated with --no-shconf to
--no-shared-files, and make the former an alias for the latter.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/bsdapp/eal/eal.c | 4 ++--
lib/librte_eal/common/eal_common_memory.c | 3 ++-
lib/librte_eal/common/eal_common_options.c | 8 ++------
lib/librte_eal/common/eal_internal_cfg.h | 1 -
lib/librte_eal/common/eal_options.h | 2 +-
lib/librte_eal/linuxapp/eal/eal.c | 6 +++---
test/test/test_eal_flags.c | 18 +++++++++---------
7 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index dc279542d..4dff1804e 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -222,7 +222,7 @@ rte_eal_config_create(void)
const char *pathname = eal_runtime_config_path();
- if (internal_config.no_shconf)
+ if (internal_config.no_shared_files)
return;
if (mem_cfg_fd < 0){
@@ -261,7 +261,7 @@ rte_eal_config_attach(void)
void *rte_mem_cfg_addr;
const char *pathname = eal_runtime_config_path();
- if (internal_config.no_shconf)
+ if (internal_config.no_shared_files)
return;
if (mem_cfg_fd < 0){
diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 4f0688f9d..a9c4b9b68 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -938,7 +938,8 @@ rte_eal_memory_init(void)
if (retval < 0)
goto fail;
- if (internal_config.no_shconf == 0 && rte_eal_memdevice_init() < 0)
+ if (internal_config.no_shared_files == 0 &&
+ rte_eal_memdevice_init() < 0)
goto fail;
return 0;
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 38df094de..0f3eb928a 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -65,7 +65,7 @@ eal_long_options[] = {
{OPT_NO_HPET, 0, NULL, OPT_NO_HPET_NUM },
{OPT_NO_HUGE, 0, NULL, OPT_NO_HUGE_NUM },
{OPT_NO_PCI, 0, NULL, OPT_NO_PCI_NUM },
- {OPT_NO_SHCONF, 0, NULL, OPT_NO_SHCONF_NUM },
+ {OPT_NO_SHCONF, 0, NULL, OPT_NO_SHARED_FILES_NUM },
{OPT_NO_SHARED_FILES, 0, NULL, OPT_NO_SHARED_FILES_NUM },
{OPT_PCI_BLACKLIST, 1, NULL, OPT_PCI_BLACKLIST_NUM },
{OPT_PCI_WHITELIST, 1, NULL, OPT_PCI_WHITELIST_NUM },
@@ -1162,10 +1162,6 @@ eal_parse_common_option(int opt, const char *optarg,
conf->vmware_tsc_map = 1;
break;
- case OPT_NO_SHCONF_NUM:
- conf->no_shconf = 1;
- break;
-
case OPT_NO_SHARED_FILES_NUM:
conf->no_shared_files = 1;
break;
@@ -1382,6 +1378,6 @@ eal_common_usage(void)
" --"OPT_NO_HUGE" Use malloc instead of hugetlbfs\n"
" --"OPT_NO_PCI" Disable PCI\n"
" --"OPT_NO_HPET" Disable HPET\n"
- " --"OPT_NO_SHCONF" No shared config (mmap'd files)\n"
+ " --"OPT_NO_SHCONF" Deprecated. Alias for --no-shared-files\n"
"\n", RTE_MAX_LCORE);
}
diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
index 3fc71bb49..d80bacd4d 100644
--- a/lib/librte_eal/common/eal_internal_cfg.h
+++ b/lib/librte_eal/common/eal_internal_cfg.h
@@ -40,7 +40,6 @@ struct internal_config {
volatile unsigned no_hpet; /**< true to disable HPET */
volatile unsigned vmware_tsc_map; /**< true to use VMware TSC mapping
* instead of native TSC */
- volatile unsigned no_shconf; /**< true if there is no shared config */
volatile unsigned no_shared_files; /**< true if there are no shared files to be created*/
volatile unsigned create_uio_dev; /**< true to create /dev/uioX devices */
volatile enum rte_proc_type_t process_type; /**< multi-process proc type */
diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h
index b0d9d6819..6890d4114 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -43,8 +43,8 @@ enum {
OPT_NO_HUGE_NUM,
#define OPT_NO_PCI "no-pci"
OPT_NO_PCI_NUM,
+/* no-shconf is an alias for no-shared-files */
#define OPT_NO_SHCONF "no-shconf"
- OPT_NO_SHCONF_NUM,
#define OPT_NO_SHARED_FILES "no-shared-files"
OPT_NO_SHARED_FILES_NUM,
#define OPT_SOCKET_MEM "socket-mem"
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 8655b8691..32ca25dc2 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -230,7 +230,7 @@ rte_eal_config_create(void)
const char *pathname = eal_runtime_config_path();
- if (internal_config.no_shconf)
+ if (internal_config.no_shared_files)
return;
/* map the config before hugepage address so that we don't waste a page */
@@ -283,7 +283,7 @@ rte_eal_config_attach(void)
const char *pathname = eal_runtime_config_path();
- if (internal_config.no_shconf)
+ if (internal_config.no_shared_files)
return;
if (mem_cfg_fd < 0){
@@ -309,7 +309,7 @@ rte_eal_config_reattach(void)
struct rte_mem_config *mem_config;
void *rte_mem_cfg_addr;
- if (internal_config.no_shconf)
+ if (internal_config.no_shared_files)
return;
/* save the address primary process has mapped shared config to */
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index f840ca50b..8e83ea7bf 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -27,7 +27,7 @@
#define mp_flag "--proc-type=secondary"
#define no_hpet "--no-hpet"
#define no_huge "--no-huge"
-#define no_shconf "--no-shconf"
+#define no_shared_files "--no-shared-files"
#define pci_whitelist "--pci-whitelist"
#define vdev "--vdev"
#define memtest "memtest"
@@ -370,7 +370,7 @@ test_invalid_vdev_flag(void)
#ifdef RTE_EXEC_ENV_BSDAPP
/* BSD target doesn't support prefixes at this point, and we also need to
* run another primary process here */
- const char * prefix = no_shconf;
+ const char * prefix = no_shared_files;
#else
const char * prefix = "--file-prefix=vdev";
#endif
@@ -662,15 +662,15 @@ test_invalid_n_flag(void)
#endif
/* -n flag but no value */
- const char *argv1[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n"};
+ const char *argv1[] = { prgname, prefix, no_huge, no_shared_files, "-c", "1", "-n"};
/* bad numeric value */
- const char *argv2[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "e" };
+ const char *argv2[] = { prgname, prefix, no_huge, no_shared_files, "-c", "1", "-n", "e" };
/* zero is invalid */
- const char *argv3[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "0" };
+ const char *argv3[] = { prgname, prefix, no_huge, no_shared_files, "-c", "1", "-n", "0" };
/* sanity test - check with good value */
- const char *argv4[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "2" };
+ const char *argv4[] = { prgname, prefix, no_huge, no_shared_files, "-c", "1", "-n", "2" };
/* sanity test - check with no -n flag */
- const char *argv5[] = { prgname, prefix, no_huge, no_shconf, "-c", "1"};
+ const char *argv5[] = { prgname, prefix, no_huge, no_shared_files, "-c", "1"};
if (launch_proc(argv1) == 0
|| launch_proc(argv2) == 0
@@ -734,7 +734,7 @@ test_no_huge_flag(void)
#ifdef RTE_EXEC_ENV_BSDAPP
/* BSD target doesn't support prefixes at this point, and we also need to
* run another primary process here */
- const char * prefix = no_shconf;
+ const char * prefix = no_shared_files;
#else
const char * prefix = "--file-prefix=nohuge";
#endif
@@ -851,7 +851,7 @@ test_misc_flags(void)
const char *argv5[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog", "error"};
/* With no-sh-conf */
const char *argv6[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE,
- no_shconf, nosh_prefix };
+ no_shared_files, nosh_prefix };
#ifdef RTE_EXEC_ENV_BSDAPP
return 0;
--
2.17.0
next prev parent reply other threads:[~2018-05-31 14:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 14:32 [dpdk-dev] [RFC 00/10] Support running DPDK without hugetlbfs mountpoint Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 01/10] eal: add --no-shared-files option Anatoly Burakov
2018-05-31 14:32 ` Anatoly Burakov [this message]
2018-05-31 14:32 ` [dpdk-dev] [RFC 03/10] eal: make --huge-unlink an alias for --no-shared-files Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 04/10] fbarray: support no-shared-files mode Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 05/10] mem: add support for " Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 06/10] ipc: " Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 07/10] eal: add support for no-shared-files for hugepage info Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 08/10] eal: add support for no-shared-files in hugepage data file Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 09/10] eal: do not create runtime dir in no-shared-files mode Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 10/10] mem: enable memfd-based hugepage allocation Anatoly Burakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=814570b61c300b6e745d0d40bb31db5e94e012b8.1527776837.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=kuralamudhan.ramakrishnan@intel.com \
--cc=louise.m.daly@intel.com \
--cc=ray.kinsella@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).