From: Yuanhan Liu <hidden> Date: 2016-08-23 07:31:16
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Cc: Jerin Jacob <redacted>
Signed-off-by: Yuanhan Liu <redacted>
---
drivers/net/virtio/virtio_rxtx_simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Yuanhan Liu <hidden> Date: 2016-09-23 06:11:28
On Tue, Aug 23, 2016 at 03:40:58PM +0800, Yuanhan Liu wrote:
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
Unfortunately, it makes the icc build fail. I will submit another patch
to simply change _mm_prefetch to rte_prefetch0.
--yliu
From: Yuanhan Liu <hidden> Date: 2016-09-23 06:14:42
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Cc: Jerin Jacob <redacted>
Signed-off-by: Yuanhan Liu <redacted>
---
v2: replace _mm_prefetch with rte_prefetch0 to make icc happy
---
drivers/net/virtio/virtio_rxtx_simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jerin Jacob <hidden> Date: 2016-09-23 06:35:36
On Fri, Sep 23, 2016 at 02:15:09PM +0800, Yuanhan Liu wrote:
Hi Yuanhan,
Thanks for this patch.
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
The info notes can be moved under the "---" marker line to make git log
clean.
This patch review is holding the virtio arm NEON support. Appreciate any help
in reviewing this patch.
http://dpdk.org/dev/patchwork/patch/14567/
quoted hunk
Fixes: fc3d66212fed ("virtio: add vector Rx")
Cc: Jerin Jacob <redacted>
Signed-off-by: Yuanhan Liu <redacted>
---
v2: replace _mm_prefetch with rte_prefetch0 to make icc happy
---
drivers/net/virtio/virtio_rxtx_simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Yuanhan Liu <hidden> Date: 2016-09-23 06:42:38
On Fri, Sep 23, 2016 at 12:05:14PM +0530, Jerin Jacob wrote:
On Fri, Sep 23, 2016 at 02:15:09PM +0800, Yuanhan Liu wrote:
Hi Yuanhan,
Thanks for this patch.
quoted
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
The info notes can be moved under the "---" marker line to make git log
clean.
Yes, kind of. The reason I want to put it here is to stree "how weird
this issue it is" :)
Without this piece, people may be confused why this patch is necessary,
because they may simply can't reproduce this issue.
I meant to apply this series long time ago, until I found a build issue.
I tried to fix it once, as you saw. But it somehow broke the icc.
And here is my 2nd try (sorry for being a bit late though).
--yliu
From: Yuanhan Liu <hidden> Date: 2016-09-26 04:28:48
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That's how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
Similarly, make the same change to other _mm_prefetch users, just in case
this weird issue shows up again somehow later.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 7092be8437bd ("fm10k: add vector Rx")
Cc: Jerin Jacob <redacted>
Cc: Chen Jing D(Mark) <redacted>
Cc: Cunming Liang <redacted>
Cc: Bruce Richardson <redacted>
CC: Thomas Monjalon <redacted>
Signed-off-by: Yuanhan Liu <redacted>
---
v3: make the similar replace to other PMD
---
drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +-
drivers/net/i40e/i40e_rxtx_vec.c | 2 +-
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +-
drivers/net/virtio/virtio_rxtx_simple.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
@@ -406,7 +406,7 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,*/rxdp=rxq->hw_ring+next_dd;-_mm_prefetch((constvoid*)rxdp,_MM_HINT_T0);+rte_prefetch0(rxdp);/* See if we need to rearm the RX queue - gives the prefetch a bit*oftimetoact
@@ -224,7 +224,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,*/rxdp=rxq->rx_ring+rxq->rx_tail;-_mm_prefetch((constvoid*)rxdp,_MM_HINT_T0);+rte_prefetch0(rxdp);/* See if we need to rearm the RX queue - gives the prefetch a bit*oftimetoact
@@ -243,7 +243,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,*/rxdp=rxq->rx_ring+rxq->rx_tail;-_mm_prefetch((constvoid*)rxdp,_MM_HINT_T0);+rte_prefetch0(rxdp);/* See if we need to rearm the RX queue - gives the prefetch a bit*oftimetoact
From: Yuanhan Liu <hidden> Date: 2016-09-27 12:19:23
Can any PMD guys review it? It blocks a virtio patchset apply...
Thanks.
--yliu
On Mon, Sep 26, 2016 at 12:29:13PM +0800, Yuanhan Liu wrote:
quoted hunk
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
That's how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it while
apply Jerin's vector support for ARM patch set: he just move this peiece
of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I think
it's still needed.
Similarly, make the same change to other _mm_prefetch users, just in case
this weird issue shows up again somehow later.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 7092be8437bd ("fm10k: add vector Rx")
Cc: Jerin Jacob <redacted>
Cc: Chen Jing D(Mark) <redacted>
Cc: Cunming Liang <redacted>
Cc: Bruce Richardson <redacted>
CC: Thomas Monjalon <redacted>
Signed-off-by: Yuanhan Liu <redacted>
---
v3: make the similar replace to other PMD
---
drivers/net/fm10k/fm10k_rxtx_vec.c | 2 +-
drivers/net/i40e/i40e_rxtx_vec.c | 2 +-
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 2 +-
drivers/net/virtio/virtio_rxtx_simple.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
@@ -406,7 +406,7 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,*/rxdp=rxq->hw_ring+next_dd;-_mm_prefetch((constvoid*)rxdp,_MM_HINT_T0);+rte_prefetch0(rxdp);/* See if we need to rearm the RX queue - gives the prefetch a bit*oftimetoact
@@ -224,7 +224,7 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,*/rxdp=rxq->rx_ring+rxq->rx_tail;-_mm_prefetch((constvoid*)rxdp,_MM_HINT_T0);+rte_prefetch0(rxdp);/* See if we need to rearm the RX queue - gives the prefetch a bit*oftimetoact
@@ -243,7 +243,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,*/rxdp=rxq->rx_ring+rxq->rx_tail;-_mm_prefetch((constvoid*)rxdp,_MM_HINT_T0);+rte_prefetch0(rxdp);/* See if we need to rearm the RX queue - gives the prefetch a bit*oftimetoact
From: Chen, Jing D <hidden> Date: 2016-09-27 17:24:42
Hi,
-----Original Message-----
From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
Sent: Tuesday, September 27, 2016 5:20 AM
To: dev@dpdk.org
Cc: Jerin Jacob <redacted>; Chen, Jing D
[off-list ref]; Liang, Cunming [off-list ref];
Richardson, Bruce [off-list ref]; Thomas Monjalon
[off-list ref]
Subject: Re: [PATCH v3] net: fix build error with clang
Can any PMD guys review it? It blocks a virtio patchset apply...
Thanks.
--yliu
On Mon, Sep 26, 2016 at 12:29:13PM +0800, Yuanhan Liu wrote:
quoted
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0,
(sel)))
That's how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it
while apply Jerin's vector support for ARM patch set: he just move
this peiece of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I
think it's still needed.
Similarly, make the same change to other _mm_prefetch users, just in
case this weird issue shows up again somehow later.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Fixes: 7092be8437bd ("fm10k: add vector Rx")
Cc: Jerin Jacob <redacted>
Cc: Chen Jing D(Mark) <redacted>
Cc: Cunming Liang <redacted>
Cc: Bruce Richardson <redacted>
CC: Thomas Monjalon <redacted>
Signed-off-by: Yuanhan Liu <redacted>
From: Yuanhan Liu <hidden> Date: 2016-09-28 00:08:34
On Tue, Sep 27, 2016 at 05:24:35PM +0000, Chen, Jing D wrote:
quoted
On Mon, Sep 26, 2016 at 12:29:13PM +0800, Yuanhan Liu wrote:
quoted
Interestingly, clang and gcc has different prototype for _mm_prefetch().
For gcc, we have
_mm_prefetch (const void *__P, enum _mm_hint __I)
While for clang, it's
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0,
(sel)))
That's how the following error comes with clang:
error: cast from 'const void *' to 'void *' drops const qualifier
[-Werror,-Wcast-qual]
_mm_prefetch((const void *)rused, _MM_HINT_T0);
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58:
note: expanded from macro '_mm_prefetch'
#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a),
0, (sel)))
What's weird is that the build was actaully Okay before. I met it
while apply Jerin's vector support for ARM patch set: he just move
this peiece of code to another file, nothing else changed.
This patch fix the issue when Jerin's patchset is applied. Thus, I
think it's still needed.
Similarly, make the same change to other _mm_prefetch users, just in
case this weird issue shows up again somehow later.
...
quoted
quoted
Signed-off-by: Yuanhan Liu <redacted>
Acked-by: Jing Chen <redacted>
Mark, thank you!
Applied to dpdk-next-virtio.
--yliu