numam-dpdk/drivers/net/ixgbe
Yuanhan Liu 0af54f09d9 net: fix clang build
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 piece
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: fc3d66212f ("virtio: add vector Rx")
Fixes: c95584dc2b ("ixgbe: new vectorized functions for Rx/Tx")
Fixes: 9ed94e5bb0 ("i40e: add vector Rx")
Fixes: 7092be8437 ("fm10k: add vector Rx")

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
2016-09-28 02:18:39 +02:00
..
base net/ixgbe/base: fix C++ build 2016-07-22 01:20:35 +02:00
ixgbe_82599_bypass.c ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_bypass_api.h ixgbe: support new devices and MAC types 2016-03-16 17:09:27 +01:00
ixgbe_bypass_defines.h ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_bypass.c ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_bypass.h ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_ethdev.c pci: inherit common driver in PCI driver 2016-10-03 16:33:55 +02:00
ixgbe_ethdev.h ixgbe: fail if too many queues for interrupt 2016-03-30 20:17:58 +02:00
ixgbe_fdir.c ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_logs.h drivers: allow pruning log during build 2015-07-30 20:16:04 +02:00
ixgbe_pf.c net/ixgbe/base: allow bypassing VLAN pool filters 2016-06-27 16:17:53 +02:00
ixgbe_regs.h ixgbe: add access to specific device info 2015-07-17 00:00:48 +02:00
ixgbe_rxtx_vec_common.h net/ixgbe: remove useless assignment 2016-06-27 18:31:57 +02:00
ixgbe_rxtx_vec_neon.c net/ixgbe: use mbuf prefetch function 2016-06-24 18:28:09 +02:00
ixgbe_rxtx_vec_sse.c net: fix clang build 2016-09-28 02:18:39 +02:00
ixgbe_rxtx.c remove unused ring includes 2016-09-16 10:16:02 +02:00
ixgbe_rxtx.h mbuf: add new Rx flags for stripped VLAN 2016-06-15 17:18:57 +02:00
Makefile net/ixgbe: rename x86 vector driver file 2016-06-15 17:13:54 +02:00
rte_pmd_ixgbe_version.map ixgbe: move to drivers/net/ 2015-05-22 16:06:22 +02:00