[dpdk-dev] [PATCH] testpmd: fix wrong variable type in ieee1588fwd for 32 bits

Lu, Wenzhuo wenzhuo.lu at intel.com
Wed Jul 22 09:26:08 CEST 2015


Hi Pablo,

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, July 22, 2015 2:39 PM
> To: dev at 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 at 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



More information about the dev mailing list