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 0FAC842DA6 for ; Sat, 15 Jul 2023 00:35:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A704442B8E; Sat, 15 Jul 2023 00:35:00 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id BD929410FA for ; Sat, 15 Jul 2023 00:34:59 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3094910b150so2533088f8f.0 for ; Fri, 14 Jul 2023 15:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689374099; x=1691966099; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=llb1/gZlJi7ZssSb6nxK13QT5XPz5bV3DleO+zpbVjQ=; b=p3nsvqr9nqbbviPUA2fM4opqYW31wczOOayX6RFd9xLgrfOJmekiupGW/fSgk83IcT 8d3pyrW1O7HNxg3X57E6oBWOfdLk3NNHfkDuvKir+wgviJURrvEFDco69RiKnBBopwf3 k+/KS843dv9cMsG+cZJ9JpgT5qC3ppxbxpjaTtT2VdUTXysW5sSyNlgyzOnlzQcUjRrm mjjF+2LyvEbt06vuDFRMPMWBOTpWLTDUeSq8fYWc2GpHCmx2ipPMl5P/DyzcQ4pHvcgq 5IKgjfga8QvOgvvzB8U0+4dBudfca/XuRpm6eAxfNfnMbMPz+Lripb5l2uwaFLpHBxMm tAJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689374099; x=1691966099; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=llb1/gZlJi7ZssSb6nxK13QT5XPz5bV3DleO+zpbVjQ=; b=StC7wow2al6CN87CHiOn1ICcaLibyKLstJ3OuuiB0y9nJPGV1sPRK08lEVHvbfYB5n N+sPovIj3jIs5gNfbFxVGN0llbfynyUACRrA2q31RNUAEZKgJG1haQiVs2Y1HchTn1GD /ZyHxcX1f7zsHL8at/83iVEmALIdx+mhTMT9JMFM484x+p/JDNqdgGfys81rTKioI4RZ 5CXA3iYOM64h0SEqhw2jg3y/eMkFEwzsefUI79BUAOq/Q7sWWllCTmwim/VTuzZubt8M sBtI1iIwAXug2ZvTpXGzk+SCIZLWHrmku5PzWUglcAic/p0y8egluEED99oCvO4K22k0 IEdw== X-Gm-Message-State: ABy/qLZgRlSVNv/lq+r0EdlzqCBrIhatPX5LDj9a/NVFwVG4ZabzNnwV 78xHUZTe3MQ/VDXuOstm/S8= X-Google-Smtp-Source: APBJJlEDB0icT8s0J8RYTpCFkhW/j9a9G+UsJhy0sI9TuQZ8SC+Zks2+q5aFYDBWxXXx9WIszwOgIg== X-Received: by 2002:a5d:680c:0:b0:315:9676:c360 with SMTP id w12-20020a5d680c000000b003159676c360mr5691209wru.25.1689374099221; Fri, 14 Jul 2023 15:34:59 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id n12-20020adff08c000000b0030ada01ca78sm12042653wro.10.2023.07.14.15.34.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 15:34:58 -0700 (PDT) From: luca.boccassi@gmail.com To: Fengnan Chang Cc: Anatoly Burakov , Chengwen Feng , dpdk stable Subject: patch 'mem: fix memsegs exhausted message' has been queued to stable release 20.11.9 Date: Fri, 14 Jul 2023 23:34:32 +0100 Message-Id: <20230714223447.1092828-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230714223447.1092828-1-luca.boccassi@gmail.com> References: <20230628141046.2145871-22-luca.boccassi@gmail.com> <20230714223447.1092828-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.9 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/16/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/8573c47eff8d648c89238e40e997ad7902504e29 Thanks. Luca Boccassi --- >From 8573c47eff8d648c89238e40e997ad7902504e29 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/librte_eal/common/eal_common_dynmem.c | 6 ++---- lib/librte_eal/freebsd/eal_memory.c | 8 +++----- lib/librte_eal/linux/eal_memory.c | 11 ++++------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/lib/librte_eal/common/eal_common_dynmem.c b/lib/librte_eal/common/eal_common_dynmem.c index c1e1889f5c..9af299b8f8 100644 --- a/lib/librte_eal/common/eal_common_dynmem.c +++ b/lib/librte_eal/common/eal_common_dynmem.c @@ -119,8 +119,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; } @@ -179,8 +178,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/librte_eal/freebsd/eal_memory.c b/lib/librte_eal/freebsd/eal_memory.c index 17ab10e0ca..5c6165c580 100644 --- a/lib/librte_eal/freebsd/eal_memory.c +++ b/lib/librte_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/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c index 3bd0bc17c5..84f4e1cce7 100644 --- a/lib/librte_eal/linux/eal_memory.c +++ b/lib/librte_eal/linux/eal_memory.c @@ -721,9 +721,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; } @@ -971,8 +970,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; } @@ -1838,8 +1836,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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-07-14 23:33:08.628597772 +0100 +++ 0003-mem-fix-memsegs-exhausted-message.patch 2023-07-14 23:33:08.479304963 +0100 @@ -1 +1 @@ -From d93000bb9310685d0df3aa2c11cff3000ed17a82 Mon Sep 17 00:00:00 2001 +From 8573c47eff8d648c89238e40e997ad7902504e29 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d93000bb9310685d0df3aa2c11cff3000ed17a82 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -18,3 +19,3 @@ - lib/eal/common/eal_common_dynmem.c | 6 ++---- - lib/eal/freebsd/eal_memory.c | 8 +++----- - lib/eal/linux/eal_memory.c | 11 ++++------- + lib/librte_eal/common/eal_common_dynmem.c | 6 ++---- + lib/librte_eal/freebsd/eal_memory.c | 8 +++----- + lib/librte_eal/linux/eal_memory.c | 11 ++++------- @@ -23,5 +24,5 @@ -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) +diff --git a/lib/librte_eal/common/eal_common_dynmem.c b/lib/librte_eal/common/eal_common_dynmem.c +index c1e1889f5c..9af299b8f8 100644 +--- a/lib/librte_eal/common/eal_common_dynmem.c ++++ b/lib/librte_eal/common/eal_common_dynmem.c +@@ -119,8 +119,7 @@ eal_dynmem_memseg_lists_init(void) @@ -37 +38 @@ -@@ -180,8 +179,7 @@ eal_dynmem_memseg_lists_init(void) +@@ -179,8 +178,7 @@ eal_dynmem_memseg_lists_init(void) @@ -47 +48 @@ -diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c +diff --git a/lib/librte_eal/freebsd/eal_memory.c b/lib/librte_eal/freebsd/eal_memory.c @@ -49,2 +50,2 @@ ---- a/lib/eal/freebsd/eal_memory.c -+++ b/lib/eal/freebsd/eal_memory.c +--- a/lib/librte_eal/freebsd/eal_memory.c ++++ b/lib/librte_eal/freebsd/eal_memory.c @@ -73,5 +74,5 @@ -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) +diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c +index 3bd0bc17c5..84f4e1cce7 100644 +--- a/lib/librte_eal/linux/eal_memory.c ++++ b/lib/librte_eal/linux/eal_memory.c +@@ -721,9 +721,8 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end) @@ -89 +90 @@ -@@ -966,8 +965,7 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages) +@@ -971,8 +970,7 @@ prealloc_segments(struct hugepage_file *hugepages, int n_pages) @@ -99 +100 @@ -@@ -1833,8 +1831,7 @@ memseg_primary_init_32(void) +@@ -1838,8 +1836,7 @@ memseg_primary_init_32(void)