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 60C5342CC2; Thu, 15 Jun 2023 08:46:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D71E40DDA; Thu, 15 Jun 2023 08:46:07 +0200 (CEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mails.dpdk.org (Postfix) with ESMTP id C355640A84 for ; Thu, 15 Jun 2023 08:46:05 +0200 (CEST) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-3f9e7bfbec4so10634611cf.1 for ; Wed, 14 Jun 2023 23:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1686811565; x=1689403565; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xyr39joxu5pP/t2UDuScaTjzC52TlY6SCyt4xq4I07Y=; b=TOafYSQDWTzqx/Llqzu0tXfnCrbm41OUhsKWG+8dknIDmTWAwK/9AXerCECNFTsiq7 gYa9kOd7fTCwhv5B0ZnlGGr5x4ha+kTCumD9ILFsZkCoceLp3W5lEz2ZVFjzpazfaSt+ DocPrR36CxMgn6+E03JiH5vIu6ALaPN69/7al9/SFITIChxj9WZlAkvEMKwweQiYgewr KxbP4xG9AncLjnH7ZS9B8d0Pep2nm3t4bZ3C7vqE9xUjqvQh6/Oof618HWqrQIdn8tlV wzEO5oztJGv0z8c63I/lDBIoHPWbCkove9xgT5RvWYB1lr5SMjRQjBzulhyVG5iVekqV hYTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686811565; x=1689403565; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xyr39joxu5pP/t2UDuScaTjzC52TlY6SCyt4xq4I07Y=; b=CRESuHJSqaTofOEYK8ckbqXP7MseylejqaeusB4eBsRvrqwFlPlRDHF/8s2/pQK9Zz pAEHmXTd6Bsc1w3Cvm77Vlr0VrAxuV0GoFE/K3vdT++qZMEgKPtxVe4+mSSkd34ABPqo xRhm9OFIPiwGtGGK8tWfx/esOM9iSGHG/BMKqCQTg+kwH8aOYCIGQ/WfrwgujHT2BN/N ntW0KJOpQX+ZlUMshvVLdmiCryeAix5jlMetNG/05ndFAi6aPGPm0Ne+FPKyc+9wPDEd Aw8ReZnhUUTwig3KCxQckxXoqOGtZ5BmFSLC8KssVFvF2+UVLMrpcoIyhwJZyxOXOtbA OTMQ== X-Gm-Message-State: AC+VfDw3jVGtyvR1HHVaNN1KrYyBEkmGghDNfa0LjFobhQcZfbCrE6OM jxF9kkbpzqbFgYAKQTH6qJxwR0QZW9SCvl5f/MkxfpmHjLgEhoXaIi4= X-Google-Smtp-Source: ACHHUZ6QEyum4bMYpuTjvcRTOMNgIK5aXGtUY8ebTzZWNmoHXArSQaqW7F0S/bZ8hJQIG5kQG17Mqyqr7i9JRJ3H8j4= X-Received: by 2002:a05:622a:1a25:b0:3f6:b493:8ee4 with SMTP id f37-20020a05622a1a2500b003f6b4938ee4mr22968056qtb.0.1686811565150; Wed, 14 Jun 2023 23:46:05 -0700 (PDT) MIME-Version: 1.0 References: <20230529112155.11247-1-changfengnan@bytedance.com> <82acab7a-c649-0ff4-3389-7f10f2863713@intel.com> In-Reply-To: <82acab7a-c649-0ff4-3389-7f10f2863713@intel.com> From: Fengnan Chang Date: Thu, 15 Jun 2023 14:45:54 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] eal: fix prompt info when remap_segment failed To: "Burakov, Anatoly" Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Burakov, Anatoly =E4=BA=8E2023=E5=B9=B46=E6=9C= =8813=E6=97=A5=E5=91=A8=E4=BA=8C 19:00=E5=86=99=E9=81=93=EF=BC=9A > > On 5/29/2023 12:21 PM, Fengnan Chang wrote: > > when there is enough space for memseg, we should pormpt which > > config to modify, not just print numbers. > > > > Signed-off-by: Fengnan Chang > > --- > > lib/eal/linux/eal_memory.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/lib/eal/linux/eal_memory.c b/lib/eal/linux/eal_memory.c > > index 0876974631..974db901b7 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 =3D=3D RTE_MAX_MEMSEG_LISTS) { > > - RTE_LOG(ERR, EAL, "Could not find space for memseg. Pleas= e 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. Pleas= e increase RTE_MAX_MEMSEG_PER_LIST " > > + "RTE_MAX_MEMSEG_PER_TYPE and/or RTE_MAX_M= EM_MB_PER_TYPE in configuration.\n"); > > return -1; > > This is a problem with RTE_STR macro - replacing this with _RTE_STR will > yield expected results (write out the RTE_MAX_MEMSEG_PER_TYPE as > string). I'm not sure using _RTE_STR will be the correct solution > though, because it's prefixed with an underscore (implying it should not > be used directly), but I'm also not sure about writing out string > literals like that explicitly. IMO, printing strings explicitly is better. > > -- > Thanks, > Anatoly >