DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, thomas@monjalon.net
Subject: [dpdk-dev] [PATCH 18.05-RC2 2/4] eal: rename function returning hugepage data path
Date: Wed, 25 Apr 2018 13:24:35 +0100	[thread overview]
Message-ID: <6a2f96a5c30511f6e692c4bcfad7b7415f2ec7b0.1524657197.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1524657197.git.anatoly.burakov@intel.com>
In-Reply-To: <cover.1524657197.git.anatoly.burakov@intel.com>

The original name for this path was not too descriptive and
confusing. Rename it to a more appropriate and descriptive name:
it stores data about hugepages, so name it eal_hugepage_data_path().

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_filesystem.h   |  2 +-
 lib/librte_eal/linuxapp/eal/eal_memory.c | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/eal_filesystem.h b/lib/librte_eal/common/eal_filesystem.h
index 37ac672..2ed857e 100644
--- a/lib/librte_eal/common/eal_filesystem.h
+++ b/lib/librte_eal/common/eal_filesystem.h
@@ -89,7 +89,7 @@ eal_hugepage_info_path(void)
 #define HUGEPAGE_FILE_FMT "%s/.%s_hugepage_file"
 
 static inline const char *
-eal_hugepage_file_path(void)
+eal_hugepage_data_path(void)
 {
 	static char buffer[PATH_MAX]; /* static so auto-zeroed */
 	const char *directory = default_config_dir;
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index ad3add8..db401a9 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -1499,7 +1499,7 @@ eal_legacy_hugepage_init(void)
 	}
 
 	/* create shared memory */
-	hugepage = create_shared_memory(eal_hugepage_file_path(),
+	hugepage = create_shared_memory(eal_hugepage_data_path(),
 			nr_hugefiles * sizeof(struct hugepage_file));
 
 	if (hugepage == NULL) {
@@ -1696,16 +1696,18 @@ eal_legacy_hugepage_attach(void)
 
 	test_phys_addrs_available();
 
-	fd_hugepage = open(eal_hugepage_file_path(), O_RDONLY);
+	fd_hugepage = open(eal_hugepage_data_path(), O_RDONLY);
 	if (fd_hugepage < 0) {
-		RTE_LOG(ERR, EAL, "Could not open %s\n", eal_hugepage_file_path());
+		RTE_LOG(ERR, EAL, "Could not open %s\n",
+				eal_hugepage_data_path());
 		goto error;
 	}
 
 	size = getFileSize(fd_hugepage);
 	hp = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd_hugepage, 0);
 	if (hp == MAP_FAILED) {
-		RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_file_path());
+		RTE_LOG(ERR, EAL, "Could not mmap %s\n",
+				eal_hugepage_data_path());
 		goto error;
 	}
 
-- 
2.7.4

  parent reply	other threads:[~2018-04-25 12:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 12:24 [dpdk-dev] [PATCH 18.05-RC2 0/4] Clean up EAL runtime data paths Anatoly Burakov
2018-04-25 12:24 ` [dpdk-dev] [PATCH 18.05-RC2 1/4] eal: remove unused define Anatoly Burakov
2018-04-26  7:11   ` David Marchand
2018-04-25 12:24 ` Anatoly Burakov [this message]
2018-04-25 12:24 ` [dpdk-dev] [PATCH 18.05-RC2 3/4] eal: add directory for DPDK runtime data Anatoly Burakov
2018-04-25 12:24 ` [dpdk-dev] [PATCH 18.05-RC2 4/4] eal: move all runtime data into DPDK runtime dir Anatoly Burakov
2018-04-30 12:08 ` [dpdk-dev] [PATCH v2 0/4] Clean up EAL runtime data paths Anatoly Burakov
2018-05-09 15:59   ` Van Haaren, Harry
2018-05-09 16:11     ` Bruce Richardson
2018-05-09 19:03       ` Thomas Monjalon
2018-05-14  8:26         ` Burakov, Anatoly
2018-05-14 16:27   ` [dpdk-dev] [PATCH v3 " Anatoly Burakov
2018-05-14 22:45     ` Thomas Monjalon
2018-05-14 16:27   ` [dpdk-dev] [PATCH v3 1/4] eal: remove unused define Anatoly Burakov
2018-05-14 16:27   ` [dpdk-dev] [PATCH v3 2/4] eal: rename function returning hugepage data path Anatoly Burakov
2018-05-14 16:27   ` [dpdk-dev] [PATCH v3 3/4] eal: add directory for DPDK runtime data Anatoly Burakov
2018-05-14 16:27   ` [dpdk-dev] [PATCH v3 4/4] eal: move all runtime data into DPDK runtime dir Anatoly Burakov
2018-04-30 12:08 ` [dpdk-dev] [PATCH v2 1/4] eal: remove unused define Anatoly Burakov
2018-04-30 12:08 ` [dpdk-dev] [PATCH v2 2/4] eal: rename function returning hugepage data path Anatoly Burakov
2018-05-10 13:14   ` Pattan, Reshma
2018-04-30 12:08 ` [dpdk-dev] [PATCH v2 3/4] eal: add directory for DPDK runtime data Anatoly Burakov
2018-05-10 14:05   ` Pattan, Reshma
2018-04-30 12:08 ` [dpdk-dev] [PATCH v2 4/4] eal: move all runtime data into DPDK runtime dir 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=6a2f96a5c30511f6e692c4bcfad7b7415f2ec7b0.1524657197.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).