DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Kevin Traynor <ktraynor@redhat.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>
Subject: [PATCH] eal: fix logs for '--lcores'
Date: Thu, 13 Jun 2024 17:14:29 +0100	[thread overview]
Message-ID: <20240613161429.168287-1-ktraynor@redhat.com> (raw)

The argument is '--lcores' but it is being logged as '--lcore'
in several places.

e.g.
$ dpdk-testpmd -l 8,10,12 --lcores 8,10,12
EAL: Option --lcore is ignored, because (-l) is set!

Fix the spelling in logs and tests.

Fixes: 117eaa70584b ("eal: add error check for core options")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 app/test/test_eal_flags.c           | 2 +-
 lib/eal/common/eal_common_options.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 6cb4b06757..71d8dba731 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -672,5 +672,5 @@ test_missing_c_flag(void)
 	    launch_proc(argv28) == 0 || launch_proc(argv30) == 0) {
 		printf("Error - "
-		       "process ran without error with invalid --lcore flag\n");
+		       "process ran without error with invalid --lcores flag\n");
 		return -1;
 	}
diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index e541f07939..f1a5e329a5 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -1688,5 +1688,5 @@ eal_parse_common_option(int opt, const char *optarg,
 			EAL_LOG(ERR, "Option -c is ignored, because (%s) is set!",
 				(core_parsed == LCORE_OPT_LST) ? "-l" :
-				(core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+				(core_parsed == LCORE_OPT_MAP) ? "--lcores" :
 				"-c");
 			return -1;
@@ -1721,5 +1721,5 @@ eal_parse_common_option(int opt, const char *optarg,
 			EAL_LOG(ERR, "Option -l is ignored, because (%s) is set!",
 				(core_parsed == LCORE_OPT_MSK) ? "-c" :
-				(core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+				(core_parsed == LCORE_OPT_MAP) ? "--lcores" :
 				"-l");
 			return -1;
@@ -1902,8 +1902,8 @@ eal_parse_common_option(int opt, const char *optarg,
 
 		if (core_parsed) {
-			EAL_LOG(ERR, "Option --lcore is ignored, because (%s) is set!",
+			EAL_LOG(ERR, "Option --lcores is ignored, because (%s) is set!",
 				(core_parsed == LCORE_OPT_LST) ? "-l" :
 				(core_parsed == LCORE_OPT_MSK) ? "-c" :
-				"--lcore");
+				"--lcores");
 			return -1;
 		}
-- 
2.45.0


             reply	other threads:[~2024-06-13 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 16:14 Kevin Traynor [this message]
2024-06-13 16:20 ` David Marchand
2024-06-17 14:37   ` David Marchand

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=20240613161429.168287-1-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@intel.com \
    --cc=roretzla@linux.microsoft.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).