From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9C6521B53; Sun, 22 Jul 2018 11:20:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2018 02:20:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,388,1526367600"; d="scan'208";a="66547493" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jul 2018 02:19:05 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.195]) by IRSMSX101.ger.corp.intel.com ([169.254.1.185]) with mapi id 14.03.0319.002; Sun, 22 Jul 2018 10:19:04 +0100 From: "Ananyev, Konstantin" To: Chaeyong Chong CC: "dev@dpdk.org" , Chaeyong Chong , "stable@dpdk.org" Thread-Topic: [PATCH] mk: Detect AVX2 capability based on the target CPU architecture Thread-Index: AQHUIQKmeCqOSDOSZ0aGdP4/XraF2KSa95Lw Date: Sun, 22 Jul 2018 09:19:02 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258DF51920C@irsmsx105.ger.corp.intel.com> References: <20180721145342.6503-1-cychong@gmail.com> In-Reply-To: <20180721145342.6503-1-cychong@gmail.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWJiODNhZjEtY2QzNy00NTQ3LWJkZDEtMjYxMGUyNDhjYzgzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib3huQmI0Z0JwR2t4NzZJdW9NRVp4RjVreUZmY0FwdE1OdWlEWXpibjJ2cEFzN3NkOG9OUlBcLzRVM2VWSTBHMTUifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH] mk: Detect AVX2 capability based on the target CPU architecture X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2018 09:20:32 -0000 > -----Original Message----- > From: Chaeyong Chong [mailto:cychong@gmail.com] > Sent: Saturday, July 21, 2018 3:54 PM > To: Ananyev, Konstantin > Cc: dev@dpdk.org; Chaeyong Chong ; stable@dpdk.org > Subject: [PATCH] mk: Detect AVX2 capability based on the target CPU archi= tecture >=20 > From: Chaeyong Chong >=20 > AVX2 support check should be based on the target CPU architecure. > For this, -march option should be $(RTE_MACHINE) instead of core-avx2. I don't really think it should. The purpose is to build an AVX2 function even for 'default' target. Then at runtime proper version of the code (SSE/AVX2/etc) could be selected= . So NACK. Konstantin >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: Chaeyong Chong > --- > lib/librte_acl/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile > index ea5edf00a..c756eaeb2 100644 > --- a/lib/librte_acl/Makefile > +++ b/lib/librte_acl/Makefile > @@ -44,7 +44,7 @@ ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),= RTE_MACHINE_CPUFLAG_AVX2) > CC_AVX2_SUPPORT=3D1 > else > CC_AVX2_SUPPORT=3D\ > - $(shell $(CC) -march=3Dcore-avx2 -dM -E - &1 | \ > + $(shell $(CC) -march=3D$(RTE_MACHINE) -dM -E - &1 | \ > grep -q AVX2 && echo 1) > ifeq ($(CC_AVX2_SUPPORT), 1) > ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y) > -- > 2.18.0