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 C91FD43BCF; Thu, 7 Mar 2024 14:19:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5981B4067E; Thu, 7 Mar 2024 14:19:12 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id D670340272 for ; Thu, 7 Mar 2024 14:19:10 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Tr8vy74Dgz2BfZf; Thu, 7 Mar 2024 21:16:46 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 1E26A1A016C; Thu, 7 Mar 2024 21:19:09 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 7 Mar 2024 21:19:08 +0800 Subject: Re: [PATCH] app/dma-perf: calrify incorrect NUMA config To: Vipin Varghese , CC: , References: <20240306150204.1375-1-vipin.varghese@amd.com> From: fengchengwen Message-ID: <29fd85f4-d8bf-cd4e-f56c-8fd835e97e0e@huawei.com> Date: Thu, 7 Mar 2024 21:19:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20240306150204.1375-1-vipin.varghese@amd.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) 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 Hi Vipin, On 2024/3/6 23:02, Vipin Varghese wrote: > Current commit decalres either `source or destination numa is greater > than acture numa` as cause of error. Rephrase as `Source or Destination` > is incorrect numa by checking which is greater than available numa. > > Signed-off-by: Vipin Varghese > --- > app/test-dma-perf/benchmark.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c > index 9b1f58c78c..5634ff8bf8 100644 > --- a/app/test-dma-perf/benchmark.c > +++ b/app/test-dma-perf/benchmark.c > @@ -313,7 +313,8 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs, > nr_sockets = rte_socket_count(); > if (cfg->src_numa_node >= nr_sockets || > cfg->dst_numa_node >= nr_sockets) { > - printf("Error: Source or destination numa exceeds the acture numa nodes.\n"); > + printf("Error: %s numa exceeds the available numa nodes.\n", > + (cfg->src_numa_node >= nr_sockets) ? "Source" : "Destination"); There are three cases to invoking: 1) src_numa_node >= nr_sockets 2) dst_numa_node >= nr_sockets 3) both src_numa_node and dst_numa_node >= nr_sockets It could cover cases 1&2 in your commit, but could not cover case 3. So I think we should keep original implement. Thanks > return -1; > } > >