DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev <dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>,
	 Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] eal: use define instead of raw flag name
Date: Thu, 24 Oct 2019 20:59:54 +0200	[thread overview]
Message-ID: <CAJFAV8wPLwvHeV=dxVYB2LPsKSHhR_FhSwRXog6Z7P-koGrpEg@mail.gmail.com> (raw)
In-Reply-To: <41c41b7a73cea7f574bc709e1fb1cd4eed4c72e3.1571930271.git.anatoly.burakov@intel.com>

On Thu, Oct 24, 2019 at 5:18 PM Anatoly Burakov
<anatoly.burakov@intel.com> wrote:
>
> 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

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


  reply	other threads:[~2019-10-24 19:00 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 ` [dpdk-dev] [PATCH v2 2/2] eal: use define instead of raw flag name Anatoly Burakov
2019-10-24 18:59   ` David Marchand [this message]
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='CAJFAV8wPLwvHeV=dxVYB2LPsKSHhR_FhSwRXog6Z7P-koGrpEg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=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).