From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CE9AAA32A2 for ; Thu, 24 Oct 2019 17:18:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E06FD1EB5B; Thu, 24 Oct 2019 17:18:05 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 213C51EB49 for ; Thu, 24 Oct 2019 17:18:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2019 08:18:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,225,1569308400"; d="scan'208";a="228550976" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.151]) by fmsmga002.fm.intel.com with ESMTP; 24 Oct 2019 08:18:00 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Bruce Richardson , thomas@monjalon.net, david.marchand@redhat.com Date: Thu, 24 Oct 2019 16:17:57 +0100 Message-Id: <41c41b7a73cea7f574bc709e1fb1cd4eed4c72e3.1571930271.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: <26384fad6f9afcba9d3311d1bf73e76f4577225d.1563276298.git.anatoly.burakov@intel.com> References: <26384fad6f9afcba9d3311d1bf73e76f4577225d.1563276298.git.anatoly.burakov@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] eal: use define instead of raw flag name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" We are using '--base-virtaddr' in a few places. We have a define for that, so use it instead. Signed-off-by: Anatoly Burakov --- 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 #include #include + +#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