From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
thomas@monjalon.net, david.marchand@redhat.com
Subject: [dpdk-dev] [PATCH v2 2/2] eal: use define instead of raw flag name
Date: Thu, 24 Oct 2019 16:17:57 +0100 [thread overview]
Message-ID: <41c41b7a73cea7f574bc709e1fb1cd4eed4c72e3.1571930271.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <c484c4f62e188f0f2524d26faabe8558b3ad3816.1571930271.git.anatoly.burakov@intel.com>
In-Reply-To: <26384fad6f9afcba9d3311d1bf73e76f4577225d.1563276298.git.anatoly.burakov@intel.com>
We are using '--base-virtaddr' in a few places. We have a define for that,
so use it instead.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/freebsd/eal/eal.c | 3 ++-
lib/librte_eal/freebsd/eal/eal_memory.c | 5 ++++-
lib/librte_eal/linux/eal/eal.c | 4 ++--
lib/librte_eal/linux/eal/eal_memory.c | 3 ++-
4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c
index c7e1264205..14e1713294 100644
--- a/lib/librte_eal/freebsd/eal/eal.c
+++ b/lib/librte_eal/freebsd/eal/eal.c
@@ -345,7 +345,8 @@ rte_eal_config_reattach(void)
if (mem_config != MAP_FAILED) {
/* errno is stale, don't use */
RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_config at [%p], got [%p]"
- " - please use '--base-virtaddr' option\n",
+ " - please use '--" OPT_BASE_VIRTADDR
+ "' option\n",
rte_mem_cfg_addr, mem_config);
munmap(mem_config, sizeof(struct rte_mem_config));
return -1;
diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
index cd31827c2b..a637127d5e 100644
--- a/lib/librte_eal/freebsd/eal/eal_memory.c
+++ b/lib/librte_eal/freebsd/eal/eal_memory.c
@@ -14,6 +14,8 @@
#include <rte_errno.h>
#include <rte_log.h>
#include <rte_string_fns.h>
+
+#include "eal_options.h"
#include "eal_private.h"
#include "eal_internal_cfg.h"
#include "eal_filesystem.h"
@@ -367,7 +369,8 @@ alloc_va_space(struct rte_memseg_list *msl)
addr = eal_get_virtual_area(msl->base_va, &mem_sz, page_sz, 0, flags);
if (addr == NULL) {
if (rte_errno == EADDRNOTAVAIL)
- RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [%p] - please use '--base-virtaddr' option\n",
+ RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [%p] - "
+ "please use '--" OPT_BASE_VIRTADDR "' option\n",
(unsigned long long)mem_sz, msl->base_va);
else
RTE_LOG(ERR, EAL, "Cannot reserve memory\n");
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index ef5dafa94f..13ffabd470 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -435,8 +435,8 @@ rte_eal_config_reattach(void)
if (mem_config != MAP_FAILED) {
/* errno is stale, don't use */
RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_config at [%p], got [%p]"
- " - please use '--base-virtaddr' option\n",
- rte_mem_cfg_addr, mem_config);
+ " - please use '--" OPT_BASE_VIRTADDR
+ "' option\n", rte_mem_cfg_addr, mem_config);
munmap(mem_config, sizeof(struct rte_mem_config));
return -1;
}
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 8f62c343d6..197c67ac4b 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -832,7 +832,8 @@ alloc_va_space(struct rte_memseg_list *msl)
addr = eal_get_virtual_area(msl->base_va, &mem_sz, page_sz, 0, flags);
if (addr == NULL) {
if (rte_errno == EADDRNOTAVAIL)
- RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [%p] - please use '--base-virtaddr' option\n",
+ RTE_LOG(ERR, EAL, "Could not mmap %llu bytes at [%p] - "
+ "please use '--" OPT_BASE_VIRTADDR "' option\n",
(unsigned long long)mem_sz, msl->base_va);
else
RTE_LOG(ERR, EAL, "Cannot reserve memory\n");
--
2.17.1
next prev parent reply other threads:[~2019-10-24 15:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 11:25 [dpdk-dev] [PATCH] eal/freebsd: add support for base virtaddr option Anatoly Burakov
2019-07-22 16:07 ` Thomas Monjalon
2019-08-12 10:19 ` David Marchand
2019-08-12 13:38 ` Burakov, Anatoly
2019-09-26 13:55 ` David Marchand
2019-10-24 15:17 ` [dpdk-dev] [PATCH v2 1/2] " Anatoly Burakov
2019-10-24 18:56 ` David Marchand
2019-10-25 9:05 ` Burakov, Anatoly
2019-10-25 9:36 ` David Marchand
2019-10-24 15:17 ` Anatoly Burakov [this message]
2019-10-24 18:59 ` [dpdk-dev] [PATCH v2 2/2] eal: use define instead of raw flag name David Marchand
2019-10-25 9:36 ` David Marchand
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=41c41b7a73cea7f574bc709e1fb1cd4eed4c72e3.1571930271.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.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).