[dpdk-dev] [PATCH v6] net/i40e: add interface to use latest vec path

Ferruh Yigit ferruh.yigit at intel.com
Mon Sep 17 16:14:59 CEST 2018


On 9/17/2018 10:58 AM, Xiaoyun Li wrote:
> For IA, the AVX2 vector path is only recommended to be used on later
> platforms (identified by AVX512 support, like SKL etc.) This is because
> performance benchmark shows downgrade when running AVX2 vector path on
> early platform (BDW/HSW) in some cases. But we still observe perf gain
> with some real work loading.
> 
> So this patch introduced the new devarg use-latest-supported-vec to
> force the driver always selecting the latest supported vec path. Then
> apps are able to take AVX2 path on early platforms. And this logic can
> be re-used if we will have AVX512 vec path in future.
> 
> This patch only affects IA platforms. The selected vec path would be
> like the following:
>   Without devarg/devarg = 0:
>   Machine	vPMD
>   AVX512F	AVX2
>   AVX2	SSE4.2
>   SSE4.2	SSE4.2
>   <SSE4.2	Not Supported
> 
>   With devarg = 1
>   Machine	vPMD
>   AVX512F	AVX2
>   AVX2	AVX2
>   SSE4.2	SSE4.2
>   <SSE4.2	Not Supported
> 
> Other platforms can also apply the same logic if necessary in future.
> 
> Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
> ---
> v6:
>  * Polish the doc and commit log.
>  * Use rte_kvargs_process instead of directly kvlist internals.
> v5:
>  * Simpify the rx set function.
> v4:
>  * Polish the codes.
> v3:
>  * Polish the doc and commit log.
> v2:
>  * Correct the calling of the wrong function last time.
>  * Fix seg fault bug.

Thanks for the update looks good to me.

<...>

> @@ -1078,6 +1078,9 @@ struct i40e_adapter {
>  	uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX] __rte_cache_min_aligned;
>  	uint64_t flow_types_mask;
>  	uint64_t pctypes_mask;
> +
> +	/* For devargs */
> +	bool use_latest_vec;

For this one checkpatch is giving following warning:

CHECK:BOOL_MEMBER: Avoid using bool structure members because of possible
alignment issues - see: https://lkml.org/lkml/2017/11/21/384

The comment in the link seems valid. What do you think using a basic storage
type for the variable, like uint8_t?


And overall is there any objection to follow this new convention?


More information about the dev mailing list