> -----Original Message-----
> From: Ferriter, Cian <[email protected]>
> Sent: Wednesday 2 March 2022 12:18
> To: [email protected]
> Cc: Ferriter, Cian <[email protected]>; Van Haaren, Harry
> <[email protected]>
> Subject: [PATCH v2 4/5] acinclude: Add seperate check for AVX512VBMI ISA.
>
> Only use the "avx512vbmi" compiler target when it is actually supported
> by the compiler.
>
> The order of mfex_impls and the 'dpif_miniflow_extract_impl_idx' enum
> have to be changed to keep the start index and size of the impl list
> correct in both VBMI and non VBMI cases.
>
> Signed-off-by: Cian Ferriter <[email protected]>
>
> ---
>
> v2:
> * Don't register vbmi specialized mfex impls unless VBMI is actually
> available.
> * This required some re-ordering of the mfex impl lists.
> ---
<snip>
> @@ -544,7 +546,11 @@ mfex_avx512_process(struct dp_packet_batch *packets,
> */
> __m512i v512_zeros = _mm512_setzero_si512();
> __m512i v_blk0;
> +#if HAVE_AVX512VBMI
> if (__builtin_constant_p(use_vbmi) && use_vbmi) {
> +#else
> + if (0) {
> +#endif
> v_blk0 = _mm512_maskz_permutexvar_epi8_wrap(k_shuf, v_shuf,
> v_pkt0);
> } else {
The above solution works when the has not support for VBMI but I'm not happy
with the solution. It makes the code look messier IMO. I'm looking for
suggestions on this.
I'm thinking to hide all this complexity in a wrapper function which would
always have the non VBMI permutex2var option and would have the VBMI
permutexvar option where possible. The run time selecting between the two
permute impls would remain unchanged. Does this sound good?
<snip>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev