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 22F2F45C65; Mon, 18 Nov 2024 03:44:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A65B340279; Mon, 18 Nov 2024 03:44:50 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 734A24014F; Mon, 18 Nov 2024 03:44:47 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XsBkK0611z1k06Q; Mon, 18 Nov 2024 10:42:49 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id C92CA1A0188; Mon, 18 Nov 2024 10:44:44 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 18 Nov 2024 10:44:44 +0800 Message-ID: <0f674971-315f-44ae-a8ef-7f2d4b51cf3a@huawei.com> Date: Mon, 18 Nov 2024 10:44:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 10/10] app/test-dma-perf: fix parsing of DMA address To: Stephen Hemminger , CC: , , Bruce Richardson , Cheng Jiang , Yuan Wang , Chenbo Xia , Anoob Joseph , Jiayu Hu References: <20241114001403.147609-1-stephen@networkplumber.org> <20241115200751.17141-1-stephen@networkplumber.org> <20241115200751.17141-11-stephen@networkplumber.org> Content-Language: en-US From: fengchengwen In-Reply-To: <20241115200751.17141-11-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemk500009.china.huawei.com (7.202.194.94) 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 On 2024/11/16 4:06, Stephen Hemminger wrote: > There was useless loop when looking at the DMA address. > It looks like it was meant to skip whitespace before > calling strtok. > > Good time to replace strtok with strtok_r as well. Please delete this line, with this fixed: Acked-by: Chengwen Feng > > Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ > > Fixes: 623dc9364dc6 ("app/dma-perf: introduce DMA performance test") > Cc: cheng1.jiang@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Stephen Hemminger > Acked-by: Bruce Richardson > --- > app/test-dma-perf/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c > index 18219918cc..8d46b1258b 100644 > --- a/app/test-dma-perf/main.c > +++ b/app/test-dma-perf/main.c > @@ -229,8 +229,8 @@ parse_lcore_dma(struct test_configure *test_case, const char *value) > return -1; > addrs = input; > > - while (*addrs == '\0') > - addrs++; > + while (isspace(*addrs)) > + ++addrs; > if (*addrs == '\0') { > fprintf(stderr, "No input DMA addresses\n"); > ret = -1;