DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits
@ 2015-07-22  6:38 Pablo de Lara
  2015-07-22  7:26 ` Lu, Wenzhuo
  2015-07-22  8:06 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
  0 siblings, 2 replies; 6+ messages in thread
From: Pablo de Lara @ 2015-07-22  6:38 UTC (permalink / raw)
  To: dev

In ieee1588fwd.c, timestamp.tv_sec is a size_t variable,
which is a long int, but it was being printed with PRIu64,
causing an issue on 32 bits.

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

diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 069ee2e..b1a301b 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -89,7 +89,7 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		       (unsigned) pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %"PRIu64"\n",
+	printf("Port %u RX timestamp value %lu\n",
 	       (unsigned) pi, timestamp.tv_sec);
 }
 
@@ -112,7 +112,7 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       (unsigned) pi, (unsigned) MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %"PRIu64" validated after "
+	printf("Port %u TX timestamp value %lu validated after "
 	       "%u micro-second%s\n",
 	       (unsigned) pi, timestamp.tv_sec, wait_us,
 	       (wait_us == 1) ? "" : "s");
-- 
2.4.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits
  2015-07-22  6:38 [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits Pablo de Lara
@ 2015-07-22  7:26 ` Lu, Wenzhuo
  2015-07-22  8:02   ` De Lara Guarch, Pablo
  2015-07-22  8:06 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
  1 sibling, 1 reply; 6+ messages in thread
From: Lu, Wenzhuo @ 2015-07-22  7:26 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev

Hi Pablo,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, July 22, 2015 2:39 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for
> 32 bits
> 
> In ieee1588fwd.c, timestamp.tv_sec is a size_t variable, which is a long int, but it
I think you mean time_t :)

> was being printed with PRIu64, causing an issue on 32 bits.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  app/test-pmd/ieee1588fwd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c index
> 069ee2e..b1a301b 100644
> --- a/app/test-pmd/ieee1588fwd.c
> +++ b/app/test-pmd/ieee1588fwd.c
> @@ -89,7 +89,7 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t
> index)
>  		       (unsigned) pi);
>  		return;
>  	}
> -	printf("Port %u RX timestamp value %"PRIu64"\n",
> +	printf("Port %u RX timestamp value %lu\n",
>  	       (unsigned) pi, timestamp.tv_sec);  }
> 
> @@ -112,7 +112,7 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
>  		       (unsigned) pi, (unsigned)
> MAX_TX_TMST_WAIT_MICROSECS);
>  		return;
>  	}
> -	printf("Port %u TX timestamp value %"PRIu64" validated after "
> +	printf("Port %u TX timestamp value %lu validated after "
>  	       "%u micro-second%s\n",
>  	       (unsigned) pi, timestamp.tv_sec, wait_us,
>  	       (wait_us == 1) ? "" : "s");
> --
> 2.4.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits
  2015-07-22  7:26 ` Lu, Wenzhuo
@ 2015-07-22  8:02   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2015-07-22  8:02 UTC (permalink / raw)
  To: Lu, Wenzhuo, dev

Hi,

> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Wednesday, July 22, 2015 8:26 AM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] testpmd: fix wrong variable type in
> ieee1588fwd for 32 bits
> 
> Hi Pablo,
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Wednesday, July 22, 2015 2:39 PM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH] testpmd: fix wrong variable type in
> ieee1588fwd for
> > 32 bits
> >
> > In ieee1588fwd.c, timestamp.tv_sec is a size_t variable, which is a long int,
> but it
> I think you mean time_t :)

Yes, sorry! Will send a v2.

Thanks!
Pablo
> 
> > was being printed with PRIu64, causing an issue on 32 bits.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > ---
> >  app/test-pmd/ieee1588fwd.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
> index
> > 069ee2e..b1a301b 100644
> > --- a/app/test-pmd/ieee1588fwd.c
> > +++ b/app/test-pmd/ieee1588fwd.c
> > @@ -89,7 +89,7 @@ port_ieee1588_rx_timestamp_check(portid_t pi,
> uint32_t
> > index)
> >  		       (unsigned) pi);
> >  		return;
> >  	}
> > -	printf("Port %u RX timestamp value %"PRIu64"\n",
> > +	printf("Port %u RX timestamp value %lu\n",
> >  	       (unsigned) pi, timestamp.tv_sec);  }
> >
> > @@ -112,7 +112,7 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
> >  		       (unsigned) pi, (unsigned)
> > MAX_TX_TMST_WAIT_MICROSECS);
> >  		return;
> >  	}
> > -	printf("Port %u TX timestamp value %"PRIu64" validated after "
> > +	printf("Port %u TX timestamp value %lu validated after "
> >  	       "%u micro-second%s\n",
> >  	       (unsigned) pi, timestamp.tv_sec, wait_us,
> >  	       (wait_us == 1) ? "" : "s");
> > --
> > 2.4.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] testpmd: fix wrong variable type in ieee1588fwd for 32 bits
  2015-07-22  6:38 [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits Pablo de Lara
  2015-07-22  7:26 ` Lu, Wenzhuo
@ 2015-07-22  8:06 ` Pablo de Lara
  2015-07-22  8:11   ` Lu, Wenzhuo
  1 sibling, 1 reply; 6+ messages in thread
From: Pablo de Lara @ 2015-07-22  8:06 UTC (permalink / raw)
  To: dev

In ieee1588fwd.c, timestamp.tv_sec is a time_t variable,
which is a long int, but it was being printed with PRIu64,
causing an issue on 32 bits.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
Changes in v2:

- Corrected wrong commit message

 app/test-pmd/ieee1588fwd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 069ee2e..b1a301b 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -89,7 +89,7 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		       (unsigned) pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %"PRIu64"\n",
+	printf("Port %u RX timestamp value %lu\n",
 	       (unsigned) pi, timestamp.tv_sec);
 }
 
@@ -112,7 +112,7 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       (unsigned) pi, (unsigned) MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %"PRIu64" validated after "
+	printf("Port %u TX timestamp value %lu validated after "
 	       "%u micro-second%s\n",
 	       (unsigned) pi, timestamp.tv_sec, wait_us,
 	       (wait_us == 1) ? "" : "s");
-- 
2.4.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] testpmd: fix wrong variable type in ieee1588fwd for 32 bits
  2015-07-22  8:06 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
@ 2015-07-22  8:11   ` Lu, Wenzhuo
  2015-07-22 10:07     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Lu, Wenzhuo @ 2015-07-22  8:11 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, July 22, 2015 4:07 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] testpmd: fix wrong variable type in ieee1588fwd
> for 32 bits
> 
> In ieee1588fwd.c, timestamp.tv_sec is a time_t variable, which is a long int, but
> it was being printed with PRIu64, causing an issue on 32 bits.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] testpmd: fix wrong variable type in ieee1588fwd for 32 bits
  2015-07-22  8:11   ` Lu, Wenzhuo
@ 2015-07-22 10:07     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2015-07-22 10:07 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev

> > In ieee1588fwd.c, timestamp.tv_sec is a time_t variable, which is a long int, but
> > it was being printed with PRIu64, causing an issue on 32 bits.
> > 
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-22 10:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-22  6:38 [dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits Pablo de Lara
2015-07-22  7:26 ` Lu, Wenzhuo
2015-07-22  8:02   ` De Lara Guarch, Pablo
2015-07-22  8:06 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2015-07-22  8:11   ` Lu, Wenzhuo
2015-07-22 10:07     ` Thomas Monjalon

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).