app/test-pmd: Fix log issue without nic binded
PATCH 1/1 app/test-pmd: Fix log issue without nic binded
As hotplug has been enabled, start the testpmd with no nic binded will show one error log "Please stop the ports first":
Interactive-mode selected
Please stop the ports first
Done
testpmd>
This issue is cause by the logic of check link status.
--- app/test-pmd/testpmd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
app/test-pmd/testpmd.c +4 -3
@@ -1315,7 +1315,7 @@ port_is_closed(portid_t port_id)int start_port (portid_t pid) { -int diag, need_check_link_status =0 ; +int diag, need_check_link_status =-1 ;portid_t pi;queueid_t qi;struct rte_port *port;
@@ -1337,6 +1337,7 @@ start_port(portid_t pid)if (pid != pi && pid != (portid_t )RTE_PORT_ALL )continue ; + need_check_link_status =0 ; port = &ports[pi];if (rte_atomic16_cmpset (&(port->port_status),RTE_PORT_STOPPED ,RTE_PORT_HANDLING ) ==0 ) {
@@ -1457,9 +1458,9 @@ start_port(portid_t pid) need_check_link_status =1 ; } -if (need_check_link_status && !no_link_check) +if (need_check_link_status ==1 && !no_link_check)check_all_ports_link_status (RTE_PORT_ALL ); -else +else if (need_check_link_status ==0 )printf ("Please stop the ports first\n" );printf ("Done\n" );
Signature · 1 line
1.9.3
Hi, all
What about this patch?
Thanks,
Michael
Quoted 48 lines · Michael
As hotplug has been enabled, start the testpmd with no nic binded will show one error log "Please stop the ports first":
Interactive-mode selected
Please stop the ports first
Done
testpmd>This issue is cause by the logic of check link status.
Signed-off-by Michael Qiu <[email protected]>--- app/test-pmd/testpmd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)app/test-pmd/testpmd.c +4
-3@@ -1315,7 +1315,7 @@ port_is_closed(portid_t port_id)int start_port (portid_t pid) { -int diag, need_check_link_status =0 ; +int diag, need_check_link_status =-1 ;portid_t pi;queueid_t qi;struct rte_port *port;@@ -1337,6 +1337,7 @@ start_port(portid_t pid)if (pid != pi && pid != (portid_t )RTE_PORT_ALL )continue ; + need_check_link_status =0 ; port = &ports[pi];if (rte_atomic16_cmpset (&(port->port_status),RTE_PORT_STOPPED ,RTE_PORT_HANDLING ) ==0 ) {@@ -1457,9 +1458,9 @@ start_port(portid_t pid) need_check_link_status =1 ; } -if (need_check_link_status && !no_link_check) +if (need_check_link_status ==1 && !no_link_check)check_all_ports_link_status (RTE_PORT_ALL ); -else +else if (need_check_link_status ==0 )printf ("Please stop the ports first\n" );printf ("Done\n" );
A message that is not in the archive (sent off-list or not yet received): 1425285097-14781-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
De Lara Guarch, Pablo
Acked-byQuoted 11 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Michael Qiu
Sent: Monday, March 02, 2015 8:32 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH] app/test-pmd: Fix log issue without nic bindedAs hotplug has been enabled, start the testpmd with no nic binded will show one error log "Please stop the ports first":
Quoted 8 lines
Interactive-mode selected
Please stop the ports first
Done
testpmd>This issue is cause by the logic of check link status.
Signed-off-by Michael Qiu <[email protected]>
A message that is not in the archive (sent off-list or not yet received): E115CCD9D858EF4F90C690B0DCB4D89727267795-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org
Thomas Monjalon
AppliedQuoted 8 lines
Quoted 8 lines
As hotplug has been enabled, start the testpmd with no nic binded will show one error log "Please stop the ports first":
Interactive-mode selected
Please stop the ports first
Done
testpmd>
Quoted 5 lines
Quoted 3 lines
This issue is cause by the logic of check link status.
Signed-off-by Michael Qiu <[email protected]>Acked-by Pablo de Lara <[email protected]>
Applied, thanks