net/i40e: fix clang build with 16B descriptors
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 12 Nov 2019 13:40:23 +0000 (13:40 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commit3566515daf811bdb35635e3ceb63ddf308ecd376
treeab931ba3dd950b7ac06e34d4514bc633420e695e
parentd7a6eab090c6c912eb7a658827ada803cae7fd51
net/i40e: fix clang build with 16B descriptors

When compiling with 16B descriptor support enabled, clang compiles gave
an error, complaining that the final parameter of _mm256_blend_epi32()
had to be an immediate value (i.e. compile-time constant):

 i40e_rxtx_vec_avx2.c:561:21: error: argument to
'__builtin_ia32_pblendd256' must be a constant integer
   __m256i tmp0_1 = _mm256_blend_epi32(fdir_zero_mask,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

While it appears that GCC was able to convert the constant variable
value "fdir_blend_mask" into the blend call, clang was not doing so. To
guarantee the use of an immediate we convert the variable value to a
"#define".

Fixes: 7d087a0a8b8e ("net/i40e: support flow director on AVX Rx")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/i40e/i40e_rxtx_vec_avx2.c