[dpdk-dev] [PATCH v2] net/virtio: fix build error with clang

2016-09-23 Thread Yuanhan Liu
On Fri, Sep 23, 2016 at 10:31:12AM +0200, Thomas Monjalon wrote: > 2016-09-23 14:15, Yuanhan Liu: > > - _mm_prefetch((const void *)rused, _MM_HINT_T0); > > + rte_prefetch0(rused); > > There are other occurences of _mm_prefetch in other drivers. > It could deserve a patch. Indeed. I could make

[dpdk-dev] [PATCH v2] net/virtio: fix build error with clang

2016-09-23 Thread Yuanhan Liu
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. > > > Interestingly, clang and gcc has different prototype for _mm_prefetch(). > > For gcc, we have > > > >_mm_prefetch (con

[dpdk-dev] [PATCH v2] net/virtio: fix build error with clang

2016-09-23 Thread Yuanhan Liu
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: err

[dpdk-dev] [PATCH v2] net/virtio: fix build error with clang

2016-09-23 Thread Jerin Jacob
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_p

[dpdk-dev] [PATCH v2] net/virtio: fix build error with clang

2016-09-23 Thread Thomas Monjalon
2016-09-23 14:15, Yuanhan Liu: > - _mm_prefetch((const void *)rused, _MM_HINT_T0); > + rte_prefetch0(rused); There are other occurences of _mm_prefetch in other drivers. It could deserve a patch.