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 8AC4E43CE7 for ; Mon, 18 Mar 2024 16:40:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 823AE402B4; Mon, 18 Mar 2024 16:40:08 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id C8EF94027F for ; Mon, 18 Mar 2024 16:40:06 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-414618e6820so915125e9.0 for ; Mon, 18 Mar 2024 08:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710776406; x=1711381206; 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=Q5CVCbp6u51P7iLdD+E9MqF2RzZ+i4jv5diUymWzGbM=; b=ky0YkW+IcoerGTJj4bz+zEPwFTh94ok/LT2EI+jK9dMbQAv1lrc2MycE8Md9f74IwG 11/0FVLBYlMycaPPtCgpbLE7cYLnLCkZajRFSWuLGmFx3vpCp6e2OzTn8Xw9VFlPvjsD J75uIvVZf8dwJAWH33vslV9thewejfjKrQU/fuAh0SOebw+9bqK5rrN3tqYLOV0Xqg3E 6TwBU6Um4pUYWic6tyIgAMbmep5adWwuKeEejzA6o8QYrnt0DNkNYZszq6dnXb+MqMzn b812W4h+CvM1IDaYmGbYEqMfPDzWuPbdNg7CZGXL72DGHhrkV7ZGYodnr4hkcUZSb5jg IgbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710776406; x=1711381206; 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=Q5CVCbp6u51P7iLdD+E9MqF2RzZ+i4jv5diUymWzGbM=; b=ndKDiwLuc0pZNn7Xr9Ea7yQmrGU6AfT4ItJwBYElc5jtjR17YOVrd7F4nTQFWl51LQ v+gnNn0fDDiMXaLm6vJeA65kt/sKvTxnaFGrAVQ4zb6Fnpd0a+BurVComVZa7sNIQWVP ErDbKUZjbg14ahqOHIlHFUU9dcBUN6Sllq106eZ7z4nxFcolZyr0w//lwGSqOztelBmd O6ekUYcP4coWg+ic3Pf1GtlvqAWPl6ZEG8pA9Nc+laaX5Qp13UogkjtvIyI00i+mu1VO /e6ZQ5RAHf4VzZiEwHEr4bhkDsMN49b4mKTIIcfdnFQjDdA0oZ1ivxFO0WDncXE4yH1q 2WZQ== X-Forwarded-Encrypted: i=1; AJvYcCXiAdTJMlcto2rsYmtLZ48+8GJUwvlE68/92bXefAYlDDu927kjkCSisxFTy5BlzQMulp72uyDbyFg783vIIPE= X-Gm-Message-State: AOJu0YxT1Vk+y66FMNn05sDGWYFJkIzQwO0s2W6mH4+IeWv1u/lBnUqg OOsUUgA5cuxe9VYcorfXU+bVeaCYrMpeVkQs0U78fKaEZz7eEXHld793+mA2O64= X-Google-Smtp-Source: AGHT+IGonaG1v8UizpKXbU7rdIOrkOnyw7tIg+nfKQE1FiiYBB7nzylda2XL2H7U6YQFOh9zAkajIw== X-Received: by 2002:a05:600c:4fc3:b0:414:c63:b9de with SMTP id o3-20020a05600c4fc300b004140c63b9demr3513636wmq.14.1710776406416; Mon, 18 Mar 2024 08:40:06 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id n18-20020a05600c4f9200b00414618bea7csm271571wmq.37.2024.03.18.08.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:40:05 -0700 (PDT) From: luca.boccassi@gmail.com To: David Marchand Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix error message for invalid option' has been queued to stable release 22.11.5 Date: Mon, 18 Mar 2024 15:39:03 +0000 Message-Id: <20240318153919.3407921-13-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240318153919.3407921-1-luca.boccassi@gmail.com> References: <20240314000957.2810803-61-luca.boccassi@gmail.com> <20240318153919.3407921-1-luca.boccassi@gmail.com> 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 Hi, FYI, your patch has been queued to stable release 22.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/20/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/65b4f90e2e67989b4d2d8beeeba7b71ea9e88fb4 Thanks. Luca Boccassi --- >From 65b4f90e2e67989b4d2d8beeeba7b71ea9e88fb4 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 14 Mar 2024 10:17:04 +0100 Subject: [PATCH] app/testpmd: fix error message for invalid option [ upstream commit c25382fa81533429d5968b47b356c79153b76212 ] """ The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector. """ Hence, if an invalid option is passed through testpmd cmdline, getopt returns '?' and increments optind to the next index in argv for a subsequent call. The message should log the previous index. Fixes: 8fad2e5ab2c5 ("app/testpmd: report invalid command line parameter") Signed-off-by: David Marchand Acked-by: Ferruh Yigit --- app/test-pmd/parameters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index be4d0ecec5..2d0a782ee0 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -1469,7 +1469,7 @@ launch_args_parse(int argc, char** argv) break; default: usage(argv[0]); - fprintf(stderr, "Invalid option: %s\n", argv[optind]); + fprintf(stderr, "Invalid option: %s\n", argv[optind - 1]); rte_exit(EXIT_FAILURE, "Command line is incomplete or incorrect\n"); break; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-18 12:58:39.799274869 +0000 +++ 0013-app-testpmd-fix-error-message-for-invalid-option.patch 2024-03-18 12:58:39.115344777 +0000 @@ -1 +1 @@ -From c25382fa81533429d5968b47b356c79153b76212 Mon Sep 17 00:00:00 2001 +From 65b4f90e2e67989b4d2d8beeeba7b71ea9e88fb4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c25382fa81533429d5968b47b356c79153b76212 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 3414a0d38c..a4c09e2a2b 100644 +index be4d0ecec5..2d0a782ee0 100644 @@ -31 +32 @@ -@@ -1497,7 +1497,7 @@ launch_args_parse(int argc, char** argv) +@@ -1469,7 +1469,7 @@ launch_args_parse(int argc, char** argv)