From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 133701B074 for ; Mon, 17 Sep 2018 16:15:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 07:15:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,385,1531810800"; d="scan'208";a="233603790" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.39]) ([10.237.221.39]) by orsmga004.jf.intel.com with ESMTP; 17 Sep 2018 07:15:00 -0700 To: Xiaoyun Li , beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, zhiyong.yang@intel.com, Thomas Monjalon , Bruce Richardson References: <1535595399-430873-1-git-send-email-xiaoyun.li@intel.com> <20180917095807.14421-1-xiaoyun.li@intel.com> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: <5f583daf-cd66-e675-667f-dc7dabbae97b@intel.com> Date: Mon, 17 Sep 2018 15:14:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180917095807.14421-1-xiaoyun.li@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6] net/i40e: add interface to use latest vec path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 14:15:19 -0000 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 > > With devarg = 1 > Machine vPMD > AVX512F AVX2 > AVX2 AVX2 > SSE4.2 SSE4.2 > > Other platforms can also apply the same logic if necessary in future. > > Signed-off-by: Xiaoyun Li > --- > 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?