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 4188845D16 for ; Fri, 15 Nov 2024 21:08:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 654C743300; Fri, 15 Nov 2024 21:08:20 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 00DE1432AE for ; Fri, 15 Nov 2024 21:08:10 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-7240d93fffdso963584b3a.2 for ; Fri, 15 Nov 2024 12:08:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731701290; x=1732306090; darn=dpdk.org; 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=cIWulhwSAyge9bSQImZ8PLcwOkuxAeFnnCOSu2o4Uy0=; b=UvVFU4Osecj2Hs96EGjYM9KwVU3uKI4qqlGQuwVuGms+UwTX9k6d47dwdFF2gGOiT9 SNFLyzAwmtpMSDRoSGpEhUh4MCQAcy+ZrM47eVtSWtkQiyWd+sjJfy6G8Onko8TElKPZ tz7s6RV/JAvU8ARpyDcRAmCUcQ2t2j64wx4gyCaVFWpCYG60obfnH1KCSkVBG+UoEO7b e7G2xe4zC6/IEzOZ72WKSJ7bwy48w4vc5bmz4G09aiUiU5spdZjkwq8WB4G0eqZUvgT5 +OBCoUQNKUfHit5sRVUNCOy/L8soEywLKHoBqwd7McNSbuE1qs3TirGoZ+w/1P3nxb0g mRQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731701290; x=1732306090; 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=cIWulhwSAyge9bSQImZ8PLcwOkuxAeFnnCOSu2o4Uy0=; b=d6JKcZD7fQhZoYYrYyiXPttg7zo5Yuop4EmuJ1GyGxm2+DTHUzyjLGZI5snS2fQV6N TORG2Xeh6FgQRt263ylzz9tyTAZqu4jzpS21aLwLIJm6kqoDYrLgvZ7aAxbQvuT7K816 0pxzV4AzEGa4ztm77cMaySp0rqxVvNP/+7mxiWziadhePE48trq28+UaIsjW0sMgHbGU o+0zqztaQJjWyUjg/MfQp+0PDSznkT6eVqH7YuNyqJD5TcKZjwC9ZgYb0W0wQw4Fzlye Nk+JfHMEr1nGUws6+lf+nmIKibi+wst4jCJyVLcMIlMlCJuA3yd9LKv5YIhmpIEwWq8g +rDA== X-Forwarded-Encrypted: i=1; AJvYcCUyAUHRtD6fW1tlrnUHZrvKZvLkP7wD6icL4CIpGMWlPq7gJO/DJiVXlnyeqHsx4G5/y5ZzFbQ=@dpdk.org X-Gm-Message-State: AOJu0Yyr4NolV/MQOfRP+K33HSYnua+6zlE7YAwZLIva4NhOU6pAN9HM aMfaqtWSueTpL1tHOl5eVU98xyfP2bQKZ0On9QjNdRekXJNKwqZaCuqQOArxQ0Q= X-Google-Smtp-Source: AGHT+IF3EayPFgZiZBRF6lf4mfgFi4g79tdea2ki2mHKfruFHO8/r/ZxdlisyMwvkmA524KOeBv8VA== X-Received: by 2002:a05:6a00:98d:b0:71e:4414:eb21 with SMTP id d2e1a72fcca58-72476cc96f4mr4538259b3a.17.1731701290224; Fri, 15 Nov 2024 12:08:10 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724771e11f0sm1759686b3a.131.2024.11.15.12.08.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 12:08:09 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , cheng1.jiang@intel.com, stable@dpdk.org, Bruce Richardson , Cheng Jiang , Chengwen Feng , Yuan Wang , Chenbo Xia , Anoob Joseph , Jiayu Hu Subject: [PATCH v3 10/10] app/test-dma-perf: fix parsing of DMA address Date: Fri, 15 Nov 2024 12:06:54 -0800 Message-ID: <20241115200751.17141-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115200751.17141-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241115200751.17141-1-stephen@networkplumber.org> 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 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 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; -- 2.45.2