DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal: fix prompt info when remap_segment failed
@ 2023-05-29 11:21 Fengnan Chang
  2023-06-12 13:09 ` David Marchand
  2023-06-13 10:59 ` Burakov, Anatoly
  0 siblings, 2 replies; 5+ messages in thread
From: Fengnan Chang @ 2023-05-29 11:21 UTC (permalink / raw)
  To: anatoly.burakov, dev; +Cc: Fengnan Chang

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;
 	}
 
-- 
2.37.1 (Apple Git-137.1)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] eal: fix prompt info when remap_segment failed
  2023-05-29 11:21 [PATCH] eal: fix prompt info when remap_segment failed Fengnan Chang
@ 2023-06-12 13:09 ` David Marchand
  2023-06-15  6:44   ` [External] " Fengnan Chang
  2023-06-13 10:59 ` Burakov, Anatoly
  1 sibling, 1 reply; 5+ messages in thread
From: David Marchand @ 2023-06-12 13:09 UTC (permalink / raw)
  To: Fengnan Chang; +Cc: anatoly.burakov, dev

On Mon, May 29, 2023 at 1:22 PM Fengnan Chang
<changfengnan@bytedance.com> wrote:
>
> when there is enough space for memseg, we should pormpt which
> config to modify, not just print numbers.

I think you want to explain the case when there is *not* enough
objects declared in the static configuration.
Could you rephrase and fix the typos?


>
> 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");

This same log is in FreeBSD, so I guess we want to update it too.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] eal: fix prompt info when remap_segment failed
  2023-05-29 11:21 [PATCH] eal: fix prompt info when remap_segment failed Fengnan Chang
  2023-06-12 13:09 ` David Marchand
@ 2023-06-13 10:59 ` Burakov, Anatoly
  2023-06-15  6:45   ` [External] " Fengnan Chang
  1 sibling, 1 reply; 5+ messages in thread
From: Burakov, Anatoly @ 2023-06-13 10:59 UTC (permalink / raw)
  To: Fengnan Chang, dev

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [External] Re: [PATCH] eal: fix prompt info when remap_segment failed
  2023-06-12 13:09 ` David Marchand
@ 2023-06-15  6:44   ` Fengnan Chang
  0 siblings, 0 replies; 5+ messages in thread
From: Fengnan Chang @ 2023-06-15  6:44 UTC (permalink / raw)
  To: David Marchand; +Cc: anatoly.burakov, dev

David Marchand <david.marchand@redhat.com> 于2023年6月12日周一 21:09写道:
>
> On Mon, May 29, 2023 at 1:22 PM Fengnan Chang
> <changfengnan@bytedance.com> wrote:
> >
> > when there is enough space for memseg, we should pormpt which
> > config to modify, not just print numbers.
>
> I think you want to explain the case when there is *not* enough
> objects declared in the static configuration.
> Could you rephrase and fix the typos?
>
Uhn, this is a careless mistake, I'll fix it. :)
>
> >
> > 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");
>
> This same log is in FreeBSD, so I guess we want to update it too.
>
>
> --
> David Marchand
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [External] Re: [PATCH] eal: fix prompt info when remap_segment failed
  2023-06-13 10:59 ` Burakov, Anatoly
@ 2023-06-15  6:45   ` Fengnan Chang
  0 siblings, 0 replies; 5+ messages in thread
From: Fengnan Chang @ 2023-06-15  6:45 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev

Burakov, Anatoly <anatoly.burakov@intel.com> 于2023年6月13日周二 19:00写道:
>
> 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.
IMO, printing strings explicitly is better.
>
> --
> Thanks,
> Anatoly
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-15  6:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 11:21 [PATCH] eal: fix prompt info when remap_segment failed Fengnan Chang
2023-06-12 13:09 ` David Marchand
2023-06-15  6:44   ` [External] " Fengnan Chang
2023-06-13 10:59 ` Burakov, Anatoly
2023-06-15  6:45   ` [External] " Fengnan Chang

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).