Hi Thomas,

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Friday, February 5, 2016 2:54 PM
> To: Richardson, Bruce; Horton, Remy
> Cc: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 
> arch
> 
> _mm_prefetch is defined only in x86 compilers.
> rte_prefetch functions are defined in EAL for each arch, and must be preferred
> over compiler intrinsics.
> 
> Fixes: 07db4a975094 ("examples/distributor: new sample app")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
> ---
>  examples/distributor/main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/examples/distributor/main.c b/examples/distributor/main.c index
> 4e74f8f..87344ac 100644
> --- a/examples/distributor/main.c
> +++ b/examples/distributor/main.c
> @@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r)
> 
>                       /* for traffic we receive, queue it up for transmit */
>                       uint16_t i;
> -                     _mm_prefetch((void *)bufs[0], 0);
> -                     _mm_prefetch((void *)bufs[1], 0);
> -                     _mm_prefetch((void *)bufs[2], 0);
> +                     rte_prefetch0((void *)bufs[0]);
> +                     rte_prefetch0((void *)bufs[1]);
> +                     rte_prefetch0((void *)bufs[2]);

Some time back Jerin Jacob has sent patch for replacing the _mm_prefetch  with 
rte_prefetch_non_temporal. This is FYI.

Thanks,
Reshma

>                       for (i = 0; i < nb_rx; i++) {
>                               struct output_buffer *outbuf;
>                               uint8_t outp;
> -                             _mm_prefetch((void *)bufs[i + 3], 0);
> +                             rte_prefetch0((void *)bufs[i + 3]);
>                               /*
>                                * workers should update in_port to hold the
>                                * output port value
> --
> 2.7.0

Reply via email to