[dpdk-dev] testpmd: fix typo when closing port

Message ID 1465399231-7023-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

De Lara Guarch, Pablo June 8, 2016, 3:20 p.m. UTC
  Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon June 8, 2016, 4:28 p.m. UTC | #1
2016-06-08 16:20, Pablo de Lara:
>  		if (rte_atomic16_cmpset(&(port->port_status),
>  			RTE_PORT_HANDLING, RTE_PORT_CLOSED) == 0)
> -			printf("Port %d can not be set into stopped\n", pi);
> +			printf("Port %d can not be set into closed\n", pi);

My english would say "Port cannot be closed".
Am I wrong?
  
John McNamara June 8, 2016, 5:18 p.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Wednesday, June 8, 2016 5:29 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] testpmd: fix typo when closing port
> 
> 2016-06-08 16:20, Pablo de Lara:
> >  		if (rte_atomic16_cmpset(&(port->port_status),
> >  			RTE_PORT_HANDLING, RTE_PORT_CLOSED) == 0)
> > -			printf("Port %d can not be set into stopped\n", pi);
> > +			printf("Port %d can not be set into closed\n", pi);
> 
> My english would say "Port cannot be closed".
> Am I wrong?

Yes, that is better or "Port cannot be set to closed" if "closed" is a
state like here.
  
Thomas Monjalon June 8, 2016, 5:59 p.m. UTC | #3
2016-06-08 17:18, Mcnamara, John:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > 2016-06-08 16:20, Pablo de Lara:
> > >  		if (rte_atomic16_cmpset(&(port->port_status),
> > >  			RTE_PORT_HANDLING, RTE_PORT_CLOSED) == 0)
> > > -			printf("Port %d can not be set into stopped\n", pi);
> > > +			printf("Port %d can not be set into closed\n", pi);
> > 
> > My english would say "Port cannot be closed".
> > Am I wrong?
> 
> Yes, that is better or "Port cannot be set to closed" if "closed" is a
> state like here.

Applied with John's proposal.
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index da74280..2738805 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1515,7 +1515,7 @@  close_port(portid_t pid)
 
 		if (rte_atomic16_cmpset(&(port->port_status),
 			RTE_PORT_HANDLING, RTE_PORT_CLOSED) == 0)
-			printf("Port %d can not be set into stopped\n", pi);
+			printf("Port %d can not be set into closed\n", pi);
 	}
 
 	printf("Done\n");