MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_avx_supported

Function get_avx_supported

dpdk/drivers/net/i40e/i40e_rxtx.c:3242–3264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3240
3241#ifdef RTE_ARCH_X86
3242static inline bool
3243get_avx_supported(bool request_avx512)
3244{
3245 if (request_avx512) {
3246 if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512 &&
3247 rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 &&
3248 rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1)
3249#ifdef CC_AVX512_SUPPORT
3250 return true;
3251#else
3252 PMD_DRV_LOG(NOTICE,
3253 "AVX512 is not supported in build env");
3254 return false;
3255#endif
3256 } else {
3257 if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
3258 rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 &&
3259 rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1)
3260 return true;
3261 }
3262
3263 return false;
3264}
3265#endif /* RTE_ARCH_X86 */
3266
3267

Callers 2

i40e_set_rx_functionFunction · 0.85
i40e_set_tx_functionFunction · 0.85

Calls 2

rte_cpu_get_flag_enabledFunction · 0.50

Tested by

no test coverage detected