From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E0BE542ECF for ; Thu, 20 Jul 2023 17:37:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC5DC40685; Thu, 20 Jul 2023 17:37:18 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 848E2400D6 for ; Thu, 20 Jul 2023 17:37:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689867436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8ohCztCnGfiK8n7KvM/nHeKo83zDakG79efp57tyPj8=; b=UK4Lcfrz6h7xeOvaj9kGqk43WUJsZolpuE0oPG1Vz+CMXv8C9ovgozm99j9k2FE7qnY7Oj hbAkMvgQUT3IlDcSYxAxXu7BB4i5yc9yozt6l+oRUTEAcUYeyU2HuuH1fx0K+qReFlPm4h UNxHzvwwsySHAKvDsj/tDcthvdUsnJo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-562-mIgv8f6kOuyZSw54q3KWjw-1; Thu, 20 Jul 2023 11:23:19 -0400 X-MC-Unique: mIgv8f6kOuyZSw54q3KWjw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B26C98352ED; Thu, 20 Jul 2023 15:22:50 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 761F94CD0E1; Thu, 20 Jul 2023 15:22:49 +0000 (UTC) From: Kevin Traynor To: Fengnan Chang Cc: Anatoly Burakov , Chengwen Feng , dpdk stable Subject: patch 'mem: fix memsegs exhausted message' has been queued to stable release 21.11.5 Date: Thu, 20 Jul 2023 16:19:04 +0100 Message-ID: <20230720151942.262154-113-ktraynor@redhat.com> In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com> References: <20230720151942.262154-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Anatoly Burakov Acked-by: Chengwen Feng --- 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@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)