From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
cheng1.jiang@intel.com, stable@dpdk.org,
Bruce Richardson <bruce.richardson@intel.com>,
Cheng Jiang <honest.jiang@foxmail.com>,
Chengwen Feng <fengchengwen@huawei.com>,
Yuan Wang <yuanx.wang@intel.com>, Chenbo Xia <chenbox@nvidia.com>,
Anoob Joseph <anoobj@marvell.com>,
Jiayu Hu <hujiayu.hu@foxmail.com>
Subject: [PATCH v3 10/10] app/test-dma-perf: fix parsing of DMA address
Date: Fri, 15 Nov 2024 12:06:54 -0800 [thread overview]
Message-ID: <20241115200751.17141-11-stephen@networkplumber.org> (raw)
In-Reply-To: <20241115200751.17141-1-stephen@networkplumber.org>
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.
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 <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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;
--
2.45.2
prev parent reply other threads:[~2024-11-15 20:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241114001403.147609-1-stephen@networkplumber.org>
[not found] ` <20241114192603.41145-1-stephen@networkplumber.org>
2024-11-14 19:24 ` [PATCH v2 01/10] app/test: do not duplicated loop variable Stephen Hemminger
2024-11-15 9:01 ` Bruce Richardson
2024-11-14 19:25 ` [PATCH v2 02/10] app/test: fix typo in address compare Stephen Hemminger
2024-11-14 19:25 ` [PATCH v2 03/10] app/test: fix paren typo Stephen Hemminger
2024-11-15 9:02 ` Bruce Richardson
2024-11-14 19:25 ` [PATCH v2 05/10] app/test: fix TLS zero length record Stephen Hemminger
2024-11-14 19:25 ` [PATCH v2 06/10] app/test: fix operator precedence bug Stephen Hemminger
2024-11-15 9:06 ` Bruce Richardson
2024-11-14 19:25 ` [PATCH v2 07/10] test/eal: fix core check in c flag test Stephen Hemminger
2024-11-15 9:07 ` Bruce Richardson
2024-11-15 19:53 ` Stephen Hemminger
2024-11-14 19:25 ` [PATCH v2 09/10] app/test-pmd: avoid potential outside of array reference Stephen Hemminger
2024-11-15 9:09 ` Bruce Richardson
2024-11-14 19:25 ` [PATCH v2 10/10] app/test-dma-perf: fix parsing of DMA address Stephen Hemminger
2024-11-15 9:13 ` Bruce Richardson
2024-11-15 19:58 ` Stephen Hemminger
[not found] ` <20241115200751.17141-1-stephen@networkplumber.org>
2024-11-15 20:06 ` [PATCH v3 01/10] app/test: do not duplicate loop variable Stephen Hemminger
2024-11-15 20:06 ` [PATCH v3 02/10] app/test: fix typo in address compare Stephen Hemminger
2024-11-15 20:06 ` [PATCH v3 03/10] app/test: fix paren typo Stephen Hemminger
2024-11-15 20:06 ` [PATCH v3 05/10] app/test: fix TLS zero length record Stephen Hemminger
2024-11-15 20:06 ` [PATCH v3 06/10] app/test: fix operator precedence bug Stephen Hemminger
2024-11-15 20:06 ` [PATCH v3 07/10] test/eal: fix core check in c flag test Stephen Hemminger
2024-11-15 20:06 ` [PATCH v3 09/10] app/test-pmd: avoid potential outside of array reference Stephen Hemminger
2024-11-15 20:06 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241115200751.17141-11-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=anoobj@marvell.com \
--cc=bruce.richardson@intel.com \
--cc=chenbox@nvidia.com \
--cc=cheng1.jiang@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=honest.jiang@foxmail.com \
--cc=hujiayu.hu@foxmail.com \
--cc=stable@dpdk.org \
--cc=yuanx.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).