patch 'mem: fix memsegs exhausted message' has been queued to stable release 21.11.5

Kevin Traynor ktraynor at redhat.com
Thu Jul 20 17:19:04 CEST 2023


Hi,

FYI, your patch has been queued to stable release 21.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/25/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/00c14e2d3e00c4666a5087349855ffcc3e06ed74

Thanks.

Kevin

---
>From 00c14e2d3e00c4666a5087349855ffcc3e06ed74 Mon Sep 17 00:00:00 2001
From: Fengnan Chang <changfengnan at bytedance.com>
Date: Tue, 4 Jul 2023 20:17:51 +0800
Subject: [PATCH] mem: fix memsegs exhausted message

[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ]

When there is not enough space to memsegs, we should prompt
which configuration should be modified instead of printing
some numbers.

Fixes: dd61b34d580b ("mem: error if requesting more segments than MAX_MEMSEG")
Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Fengnan Chang <changfengnan at bytedance.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.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 c1e1889f5c..9af299b8f8 100644
--- a/lib/eal/common/eal_common_dynmem.c
+++ b/lib/eal/common/eal_common_dynmem.c
@@ -120,6 +120,5 @@ eal_dynmem_memseg_lists_init(void)
 
 	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,6 +179,5 @@ eal_dynmem_memseg_lists_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");
 				goto out;
 			}
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
@@ -173,7 +173,6 @@ rte_eal_hugepage_init(void)
 			}
 			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;
 			}
@@ -405,6 +404,5 @@ 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 3bd0bc17c5..84f4e1cce7 100644
--- a/lib/eal/linux/eal_memory.c
+++ b/lib/eal/linux/eal_memory.c
@@ -722,7 +722,6 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	}
 	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;
 	}
@@ -972,6 +971,5 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
 			}
 			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;
 			}
@@ -1839,6 +1837,5 @@ 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.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.755318998 +0100
+++ 0113-mem-fix-memsegs-exhausted-message.patch	2023-07-20 16:17:55.105752321 +0100
@@ -1 +1 @@
-From d93000bb9310685d0df3aa2c11cff3000ed17a82 Mon Sep 17 00:00:00 2001
+From 00c14e2d3e00c4666a5087349855ffcc3e06ed74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 52e52e5986..bdbbe233a0 100644
+index c1e1889f5c..9af299b8f8 100644
@@ -27 +28 @@
-@@ -121,6 +121,5 @@ eal_dynmem_memseg_lists_init(void)
+@@ -120,6 +120,5 @@ eal_dynmem_memseg_lists_init(void)
@@ -35 +36 @@
-@@ -181,6 +180,5 @@ eal_dynmem_memseg_lists_init(void)
+@@ -180,6 +179,5 @@ eal_dynmem_memseg_lists_init(void)
@@ -66 +67 @@
-index 0876974631..9b6f08fba8 100644
+index 3bd0bc17c5..84f4e1cce7 100644
@@ -69 +70 @@
-@@ -717,7 +717,6 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+@@ -722,7 +722,6 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
@@ -79 +80 @@
-@@ -967,6 +966,5 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
+@@ -972,6 +971,5 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages)
@@ -87 +88 @@
-@@ -1834,6 +1832,5 @@ memseg_primary_init_32(void)
+@@ -1839,6 +1837,5 @@ memseg_primary_init_32(void)



More information about the stable mailing list