[dpdk-dev] [PATCH v2 1/3] net/i40e: remove devarg use-latest-supported-vec
Ferruh Yigit
ferruh.yigit at intel.com
Wed Jan 13 14:40:24 CET 2021
On 1/7/2021 7:44 AM, Leyi Rong wrote:
> As eal parameter --force-max-simd-bitwidth is already introduced,
> to make it more clear when setting rx/tx function, remove
> devarg use-latest-supported-vec support.
>
> Signed-off-by: Leyi Rong <leyi.rong at intel.com>
<...>
> @@ -3154,20 +3124,33 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
> break;
> }
> }
> +
> + if ((rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
> + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
> + rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
> + use_avx2 = true;
> }
Hi Leyi,
The cpu flags, 'RTE_CPUFLAG_AVX2' & 'RTE_CPUFLAG_AVX512F', are only defined for
x86 and causing build error for other architectures.
And what about extracting that logic into a static inline function, this makes
code more clean, and in that function other architectures return 'use_avx2'
false straightaway and can do the checks only for x86?
More information about the dev
mailing list