DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Fengnan Chang <changfengnan@bytedance.com>, <dev@dpdk.org>
Subject: Re: [PATCH] eal: fix prompt info when remap_segment failed
Date: Tue, 13 Jun 2023 11:59:29 +0100	[thread overview]
Message-ID: <82acab7a-c649-0ff4-3389-7f10f2863713@intel.com> (raw)
In-Reply-To: <20230529112155.11247-1-changfengnan@bytedance.com>

On 5/29/2023 12:21 PM, Fengnan Chang wrote:
> when there is enough space for memseg, we should pormpt which
> config to modify, not just print numbers.
> 
> Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
> ---
>   lib/eal/linux/eal_memory.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
> index 0876974631..974db901b7 100644
> --- a/lib/eal/linux/eal_memory.c
> +++ b/lib/eal/linux/eal_memory.c
> @@ -716,9 +716,8 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
>   		break;
>   	}
>   	if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
> -		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
> -				RTE_STR(RTE_MAX_MEMSEG_PER_TYPE),
> -				RTE_STR(RTE_MAX_MEM_MB_PER_TYPE));
> +		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase RTE_MAX_MEMSEG_PER_LIST "
> +				"RTE_MAX_MEMSEG_PER_TYPE and/or RTE_MAX_MEM_MB_PER_TYPE in configuration.\n");
>   		return -1;

This is a problem with RTE_STR macro - replacing this with _RTE_STR will 
yield expected results (write out the RTE_MAX_MEMSEG_PER_TYPE as 
string). I'm not sure using _RTE_STR will be the correct solution 
though, because it's prefixed with an underscore (implying it should not 
be used directly), but I'm also not sure about writing out string 
literals like that explicitly.

-- 
Thanks,
Anatoly


  parent reply	other threads:[~2023-06-13 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 11:21 Fengnan Chang
2023-06-12 13:09 ` David Marchand
2023-06-15  6:44   ` [External] " Fengnan Chang
2023-06-13 10:59 ` Burakov, Anatoly [this message]
2023-06-15  6:45   ` Fengnan Chang

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=82acab7a-c649-0ff4-3389-7f10f2863713@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=changfengnan@bytedance.com \
    --cc=dev@dpdk.org \
    /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).