DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v3] eal: fix prompt info when remap_segment failed
@ 2023-07-04 12:17 Fengnan Chang
  2023-07-04 12:43 ` Burakov, Anatoly
  2023-07-05  1:33 ` fengchengwen
  0 siblings, 2 replies; 4+ messages in thread
From: Fengnan Chang @ 2023-07-04 12:17 UTC (permalink / raw)
  To: david.marchand, anatoly.burakov; +Cc: dev, 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/common/eal_common_dynmem.c |  6 ++----
 lib/eal/freebsd/eal_memory.c       |  8 +++-----
 lib/eal/linux/eal_memory.c         | 11 ++++-------
 3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
index 52e52e5986..bdbbe233a0 100644
--- a/lib/eal/common/eal_common_dynmem.c
+++ b/lib/eal/common/eal_common_dynmem.c
@@ -120,8 +120,7 @@ eal_dynmem_memseg_lists_init(void)
 	max_seglists_per_type = RTE_MAX_MEMSEG_LISTS / n_memtypes;
 
 	if (max_seglists_per_type == 0) {
-		RTE_LOG(ERR, EAL, "Cannot accommodate all memory types, please increase %s\n",
-			RTE_STR(RTE_MAX_MEMSEG_LISTS));
+		RTE_LOG(ERR, EAL, "Cannot accommodate all memory types, please increase RTE_MAX_MEMSEG_LISTS\n");
 		goto out;
 	}
 
@@ -180,8 +179,7 @@ eal_dynmem_memseg_lists_init(void)
 		for (cur_seglist = 0; cur_seglist < n_seglists; cur_seglist++) {
 			if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 				RTE_LOG(ERR, EAL,
-					"No more space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+					"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				goto out;
 			}
 			msl = &mcfg->memsegs[msl_idx++];
diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c
index 17ab10e0ca..5c6165c580 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;
@@ -404,8 +403,7 @@ memseg_primary_init(void)
 
 			if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 				RTE_LOG(ERR, EAL,
-					"No more space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+					"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				return -1;
 			}
 
diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c
index 0876974631..9b6f08fba8 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;
 	}
 
@@ -966,8 +965,7 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
 				break;
 			}
 			if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
-				RTE_LOG(ERR, EAL, "Not enough space in memseg lists, please increase %s\n",
-					RTE_STR(RTE_MAX_MEMSEG_LISTS));
+				RTE_LOG(ERR, EAL, "Not enough space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 				return -1;
 			}
 
@@ -1833,8 +1831,7 @@ memseg_primary_init_32(void)
 
 				if (msl_idx >= RTE_MAX_MEMSEG_LISTS) {
 					RTE_LOG(ERR, EAL,
-						"No more space in memseg lists, please increase %s\n",
-						RTE_STR(RTE_MAX_MEMSEG_LISTS));
+						"No more space in memseg lists, please increase RTE_MAX_MEMSEG_LISTS\n");
 					return -1;
 				}
 
-- 
2.37.1 (Apple Git-137.1)


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

* Re: [PATCH v3] eal: fix prompt info when remap_segment failed
  2023-07-04 12:17 [PATCH v3] eal: fix prompt info when remap_segment failed Fengnan Chang
@ 2023-07-04 12:43 ` Burakov, Anatoly
  2023-07-05  1:33 ` fengchengwen
  1 sibling, 0 replies; 4+ messages in thread
From: Burakov, Anatoly @ 2023-07-04 12:43 UTC (permalink / raw)
  To: Fengnan Chang, david.marchand; +Cc: dev

On 7/4/2023 1:17 PM, Fengnan Chang 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>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly


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

* Re: [PATCH v3] eal: fix prompt info when remap_segment failed
  2023-07-04 12:17 [PATCH v3] eal: fix prompt info when remap_segment failed Fengnan Chang
  2023-07-04 12:43 ` Burakov, Anatoly
@ 2023-07-05  1:33 ` fengchengwen
  2023-07-06 14:16   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: fengchengwen @ 2023-07-05  1:33 UTC (permalink / raw)
  To: Fengnan Chang, david.marchand, anatoly.burakov; +Cc: dev

This is bugfix, suggest add Cc.

With above add, Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2023/7/4 20:17, Fengnan Chang 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>
> ---
>  lib/eal/common/eal_common_dynmem.c |  6 ++----
>  lib/eal/freebsd/eal_memory.c       |  8 +++-----
>  lib/eal/linux/eal_memory.c         | 11 ++++-------
>  3 files changed, 9 insertions(+), 16 deletions(-)
> 

...

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

* Re: [PATCH v3] eal: fix prompt info when remap_segment failed
  2023-07-05  1:33 ` fengchengwen
@ 2023-07-06 14:16   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2023-07-06 14:16 UTC (permalink / raw)
  To: Fengnan Chang, anatoly.burakov, fengchengwen; +Cc: david.marchand, dev

05/07/2023 03:33, fengchengwen:
> This is bugfix, suggest add Cc.
> 
> With above add, Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> 
> On 2023/7/4 20:17, Fengnan Chang 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>

Applied with
    Fixes: dd61b34d580b ("mem: error if requesting more segments than MAX_MEMSEG")
    Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
    Cc: stable@dpdk.org




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

end of thread, other threads:[~2023-07-06 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 12:17 [PATCH v3] eal: fix prompt info when remap_segment failed Fengnan Chang
2023-07-04 12:43 ` Burakov, Anatoly
2023-07-05  1:33 ` fengchengwen
2023-07-06 14:16   ` Thomas Monjalon

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