[dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue

2015-11-27 Thread Thomas Monjalon
> > examples/distributor/main.c(338): error #167:
> > argument of type "struct rte_mbuf *"
> > is incompatible with parameter of type "const char *"
> > _mm_prefetch(bufs[0], 0);
> > 
> > The first param pass to _mm_prefetch is wrong,
> > need convert "struct rte_mbuf *" to "void *".
> > 
> > Fixes: 07db4a975094 ("examples/distributor: new sample app")
> > 
> > Signed-off-by: Michael Qiu 
> 
> Acked-by: Pablo de Lara 

As described by Pablo, it is seen with ICC 2015.

Series applied, thanks


[dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue

2015-11-27 Thread De Lara Guarch, Pablo


> -Original Message-
> From: Qiu, Michael
> Sent: Friday, November 27, 2015 3:36 AM
> To: dev at dpdk.org
> Cc: De Lara Guarch, Pablo; thomas.monjalon at 6wind.com; Qiu, Michael
> Subject: [PATCH 1/2 v2] examples/distributor: Fix compile issue
> 
> examples/distributor/main.c(338): error #167:
> argument of type "struct rte_mbuf *"
> is incompatible with parameter of type "const char *"
>   _mm_prefetch(bufs[0], 0);
> 
> The first param pass to _mm_prefetch is wrong,
> need convert "struct rte_mbuf *" to "void *".
> 
> Fixes: 07db4a975094 ("examples/distributor: new sample app")
> 
> Signed-off-by: Michael Qiu 

Acked-by: Pablo de Lara 


[dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue

2015-11-27 Thread Michael Qiu
examples/distributor/main.c(338): error #167:
argument of type "struct rte_mbuf *"
is incompatible with parameter of type "const char *"
_mm_prefetch(bufs[0], 0);

The first param pass to _mm_prefetch is wrong,
need convert "struct rte_mbuf *" to "void *".

Fixes: 07db4a975094 ("examples/distributor: new sample app")

Signed-off-by: Michael Qiu 
---
v2 --> v1:
convert "const void *" to "void *" to avoid CLANG issue.
add "Fixes" line in commit log
 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 972bddb..a4d8e34 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(bufs[0], 0);
-   _mm_prefetch(bufs[1], 0);
-   _mm_prefetch(bufs[2], 0);
+   _mm_prefetch((void *)bufs[0], 0);
+   _mm_prefetch((void *)bufs[1], 0);
+   _mm_prefetch((void *)bufs[2], 0);
for (i = 0; i < nb_rx; i++) {
struct output_buffer *outbuf;
uint8_t outp;
-   _mm_prefetch(bufs[i + 3], 0);
+   _mm_prefetch((void *)bufs[i + 3], 0);
/*
 * workers should update in_port to hold the
 * output port value
-- 
1.9.3