* [PATCH v2] eal: fix prompt info when remap_segment failed
@ 2023-06-15 7:07 Fengnan Chang
2023-06-21 8:36 ` David Marchand
0 siblings, 1 reply; 2+ messages in thread
From: Fengnan Chang @ 2023-06-15 7:07 UTC (permalink / raw)
To: david.marchand, anatoly.burakov, dev; +Cc: Fengnan Chang
When there is not enough space to memsegs, we should prompt
which configuration should be modified instead of printing
some numbers.
Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
---
lib/eal/freebsd/eal_memory.c | 5 ++---
lib/eal/linux/eal_memory.c | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
index 17ab10e0ca..41456fa9c2 100644
--- a/lib/eal/freebsd/eal_memory.c
+++ b/lib/eal/freebsd/eal_memory.c
@@ -172,9 +172,8 @@ rte_eal_hugepage_init(void)
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;
}
arr = &msl->memseg_arr;
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 0876974631..6674db0ff5 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] 2+ messages in thread
* Re: [PATCH v2] eal: fix prompt info when remap_segment failed
2023-06-15 7:07 [PATCH v2] eal: fix prompt info when remap_segment failed Fengnan Chang
@ 2023-06-21 8:36 ` David Marchand
0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2023-06-21 8:36 UTC (permalink / raw)
To: Fengnan Chang; +Cc: anatoly.burakov, dev
On Thu, Jun 15, 2023 at 9:08 AM Fengnan Chang
<changfengnan@bytedance.com> wrote:
>
> When there is not enough space to memsegs, we should prompt
> which configuration should be modified instead of printing
> some numbers.
>
> Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
This lgtm, but I have a question:
$ git grep 'RTE_STR(RTE_MAX'
app/test/test_eal_flags.c: "-l",
RTE_STR(RTE_MAX_LCORE) };
app/test/test_eal_flags.c: "-l",
"1-"RTE_STR(RTE_MAX_LCORE) };
lib/eal/common/eal_common_dynmem.c:
RTE_STR(RTE_MAX_MEMSEG_LISTS));
lib/eal/common/eal_common_dynmem.c:
RTE_STR(RTE_MAX_MEMSEG_LISTS));
lib/eal/freebsd/eal_memory.c:
RTE_STR(RTE_MAX_MEMSEG_LISTS));
lib/eal/linux/eal_memory.c:
RTE_STR(RTE_MAX_MEMSEG_LISTS));
lib/eal/linux/eal_memory.c:
RTE_STR(RTE_MAX_MEMSEG_LISTS));
The first two hits are false positives, but the mentions of
RTE_MAX_MEMSEG_LISTS are all in log messages.
Could you have a look and confirm it is related to your change?
--
David Marchand
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-21 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 7:07 [PATCH v2] eal: fix prompt info when remap_segment failed Fengnan Chang
2023-06-21 8:36 ` David Marchand
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).