DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: ray.kinsella@intel.com, kuralamudhan.ramakrishnan@intel.com,
	louise.m.daly@intel.com, bruce.richardson@intel.com,
	ferruh.yigit@intel.com, konstantin.ananyev@intel.com
Subject: [dpdk-dev] [RFC 01/10] eal: add --no-shared-files option
Date: Thu, 31 May 2018 15:32:24 +0100	[thread overview]
Message-ID: <a5a8f937e3e74d892a884189d2c245556e42eb8c.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>

This command-line option will cause DPDK to not create any shared
files at runtime, including any shared configuration or hugetlbfs
files. This is useful for debug purposes, as well as for certain
use cases like containers.

Currently, this option does nothing.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 7 +++++++
 lib/librte_eal/common/eal_internal_cfg.h   | 1 +
 lib/librte_eal/common/eal_options.h        | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index ecebb2923..38df094de 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -66,6 +66,7 @@ eal_long_options[] = {
 	{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_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    },
 	{OPT_PROC_TYPE,         1, NULL, OPT_PROC_TYPE_NUM        },
@@ -1165,6 +1166,10 @@ eal_parse_common_option(int opt, const char *optarg,
 		conf->no_shconf = 1;
 		break;
 
+	case OPT_NO_SHARED_FILES_NUM:
+		conf->no_shared_files = 1;
+		break;
+
 	case OPT_PROC_TYPE_NUM:
 		conf->process_type = eal_parse_proc_type(optarg);
 		break;
@@ -1370,6 +1375,8 @@ eal_common_usage(void)
 	       "                      Set specific log level\n"
 	       "  -v                  Display version information on startup\n"
 	       "  -h, --help          This help\n"
+	       "  --"OPT_NO_SHARED_FILES"   Do not create any shared files (config, hugetlbfs, etc.).\n"
+	       "                      This disables secondary process support\n"
 	       "\nEAL options for DEBUG use only:\n"
 	       "  --"OPT_HUGE_UNLINK"       Unlink hugepage files after init\n"
 	       "  --"OPT_NO_HUGE"           Use malloc instead of hugetlbfs\n"
diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
index c4cbf3acd..3fc71bb49 100644
--- a/lib/librte_eal/common/eal_internal_cfg.h
+++ b/lib/librte_eal/common/eal_internal_cfg.h
@@ -41,6 +41,7 @@ struct internal_config {
 	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 */
 	/** true to try allocating memory on specific sockets */
diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h
index 211ae06ae..b0d9d6819 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -45,6 +45,8 @@ enum {
 	OPT_NO_PCI_NUM,
 #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"
 	OPT_SOCKET_MEM_NUM,
 #define OPT_SYSLOG            "syslog"
-- 
2.17.0

  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 ` Anatoly Burakov [this message]
2018-05-31 14:32 ` [dpdk-dev] [RFC 02/10] eal: make --no-shconf an alias for --no-shared-files Anatoly Burakov
2018-05-31 14:32 ` [dpdk-dev] [RFC 03/10] eal: make --huge-unlink " 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=a5a8f937e3e74d892a884189d2c245556e42eb8c.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).