From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 65CA8A052A; Wed, 27 Jan 2021 11:40:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 514DE140CED; Wed, 27 Jan 2021 11:40:39 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id DB404140CB8 for ; Wed, 27 Jan 2021 11:40:37 +0100 (CET) IronPort-SDR: BeaylamqEzYw1+0jOE7UZ6+jCuhTPWsGxhVwK0GRoiyy92PS4F37OBwlFnmkAbagsE903sRotY N5chz0YNn6JQ== X-IronPort-AV: E=McAfee;i="6000,8403,9876"; a="241578610" X-IronPort-AV: E=Sophos;i="5.79,379,1602572400"; d="scan'208";a="241578610" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 02:40:36 -0800 IronPort-SDR: KKpol2kZdDMLI1IzS72IiE9cpcQA3Dj5sgZ1Z8jn6MxUc4EfdBebxxGcfQOvxGLgrbLbYB/ltK Jv42qFiH1N+w== X-IronPort-AV: E=Sophos;i="5.79,379,1602572400"; d="scan'208";a="388259628" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.19.165]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 27 Jan 2021 02:40:34 -0800 Date: Wed, 27 Jan 2021 10:40:31 +0000 From: Bruce Richardson To: Leyi Rong Cc: talshn@nvidia.com, qi.z.zhang@intel.com, pallavi.kadam@intel.com, ferruh.yigit@intel.com, ranjit.menon@intel.com, beilei.xing@intel.com, dev@dpdk.org Message-ID: <20210127104031.GA1626@bricha3-MOBL.ger.corp.intel.com> References: <20210126153819.63625-1-leyi.rong@intel.com> <20210127084745.73116-1-leyi.rong@intel.com> <20210127084745.73116-3-leyi.rong@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210127084745.73116-3-leyi.rong@intel.com> Subject: Re: [dpdk-dev] [PATCH v2 2/2] net/i40e: fix mingw build error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jan 27, 2021 at 04:47:45PM +0800, Leyi Rong wrote: > Disable i40e avx512 code path for windows build to > avoid the mingw build error. > > Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path") > > Signed-off-by: Leyi Rong > --- > drivers/net/i40e/meson.build | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build > index c0acdf4fd4..34c9dfa681 100644 > --- a/drivers/net/i40e/meson.build > +++ b/drivers/net/i40e/meson.build > @@ -54,19 +54,21 @@ if arch_subdir == 'x86' > cc.has_argument('-mavx512f') and > cc.has_argument('-mavx512bw')) > > - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true > - cflags += ['-DCC_AVX512_SUPPORT'] > - avx512_args = [cflags, '-mavx512f', '-mavx512bw'] > - if cc.has_argument('-march=skylake-avx512') > - avx512_args += '-march=skylake-avx512' > + if not is_windows or cc.get_id() == 'clang' > + if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true Rather than changing this whole block to indent it further following the new condition check, I think a simpler fix might be to insert: if is_windows and cc.get_id() != 'clang' i40e_avx512_cc_support = false endif just after the initial assignment to i40e_avx512_cc_support. [Alternatively, you can include those conditions in the assignment itself, but it's probably more readable done separately as I show above.] /Bruce