]> git.droids-corp.org - dpdk.git/commitdiff
eal: use define instead of raw option name
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 24 Oct 2019 15:17:57 +0000 (16:17 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 09:35:10 +0000 (11:35 +0200)
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>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/librte_eal/freebsd/eal/eal.c
lib/librte_eal/freebsd/eal/eal_memory.c
lib/librte_eal/linux/eal/eal.c
lib/librte_eal/linux/eal/eal_memory.c

index c7e12642058ccad08779e6c47b4c986090001492..14e1713294b1d564b5b2dc1a9d5f2bf2a3ed332c 100644 (file)
@@ -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;
index cd31827c2bb49a2174cd8400c4051751fe7d82c5..5e0204476062bfa9def106ade067ce02acc33087 100644 (file)
 #include <rte_errno.h>
 #include <rte_log.h>
 #include <rte_string_fns.h>
+
 #include "eal_private.h"
 #include "eal_internal_cfg.h"
 #include "eal_filesystem.h"
 #include "eal_memcfg.h"
+#include "eal_options.h"
 
 #define EAL_PAGE_SIZE (sysconf(_SC_PAGESIZE))
 
@@ -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");
index c0aac215af0266312abdf05ee07c88b1532a889b..aae67b28f0b585352bdf317593fc61e57e65919a 100644 (file)
@@ -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;
                }
index 28a78a5d441ae2fa150a3ba52e7703a6dbba2c71..226ac7014f1dc9a2d086ee29695e5811186c9084 100644 (file)
@@ -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");