Skip to contentSkip to conversation

testpmd: Fix wrong message when no port started

PATCH In review Michael Qiu 3 participants 3 messages Feb 3, 2015 – Mar 25, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testpmd: Fix wrong message when no port started

The log message is wrong when no port started.

---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/testpmd.c +1 -1
index 773b8af..ebf9448 100644
@@ -1423,7 +1423,7 @@ start_port(portid_t pid)
 	if (need_check_link_status && !no_link_check)
 		check_all_ports_link_status(nb_ports, RTE_PORT_ALL);
 	else
-		printf("Please stop the ports first\n");
+		printf("Please start at least one port first\n");
 
 	printf("Done\n");
 	return 0;
Signature · 1 line
1.9.3

A message that is not in the archive (sent off-list or not yet received): 1422952659-21557-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org

#2 lore raw

Pablo, what is your opinion on this patch?

2015-02-03 16:37, Michael Qiu:

Quoted 12 lines

The log message is wrong when no port started.

---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/testpmd.c +0 -0
index 773b8af..ebf9448 100644

app/test-pmd/testpmd.c start_port(portid_t pid) · line 1426

Quoted 5 lines
app/test-pmd/testpmd.c +1 -1
@@ -1423,7 +1423,7 @@ start_port(portid_t pid)
 	if (need_check_link_status && !no_link_check)
 		check_all_ports_link_status(nb_ports, RTE_PORT_ALL);
 	else
-		printf("Please stop the ports first\n");
+		printf("Please start at least one port first\n");

Why the word "first"?
What could lead to this situation? Wrong pid?
Shouldn't be an error returned?

Quoted 3 lines
app/test-pmd/testpmd.c +0 -0
 	printf("Done\n");
 	return 0;
#3 lore raw
Quoted 11 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, March 23, 2015 1:53 PM
To: Qiu, Michael; De Lara Guarch, Pablo
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] testpmd: Fix wrong message when no port started

Pablo, what is your opinion on this patch?

Sorry for the delay, I missed this email.

Quoted 9 lines

2015-02-03 16:37, Michael Qiu:

Quoted 7 lines

The log message is wrong when no port started.

---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

app/test-pmd/testpmd.c start_port(portid_t pid) · line 1426

Quoted 10 lines
app/test-pmd/testpmd.c +1 -1
index 773b8af..ebf9448 100644
@@ -1423,7 +1423,7 @@ start_port(portid_t pid)
 	if (need_check_link_status && !no_link_check)
 		check_all_ports_link_status(nb_ports, RTE_PORT_ALL);
 	else
-		printf("Please stop the ports first\n");
+		printf("Please start at least one port first\n");

Why the word "first"?
What could lead to this situation? Wrong pid?
Shouldn't be an error returned?

I see no reason why we should change this.
Code has changed since, so now it only goes there if user is trying to start a port that has been already started. If pid is wrong, it will show "Port invalid".

So, in a summary, NACK.

Thanks,
Pablo

Quoted 5 lines
Quoted 4 lines
app/test-pmd/testpmd.c +0 -0
 	printf("Done\n");
 	return 0;