From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CEFEC12A8 for ; Tue, 29 Sep 2015 11:42:38 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 29 Sep 2015 02:42:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,607,1437462000"; d="scan'208";a="799513131" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga001.fm.intel.com with ESMTP; 29 Sep 2015 02:42:37 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.252]) by IRSMSX153.ger.corp.intel.com ([169.254.9.244]) with mapi id 14.03.0248.002; Tue, 29 Sep 2015 10:42:36 +0100 From: "Ananyev, Konstantin" To: Zoltan Kiss , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] acl: fix target arch detection Thread-Index: AQHQ+CCJbl7cMxZMakObAjt7iKL7cZ5TQKqQ Date: Tue, 29 Sep 2015 09:42:35 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836AA1464@irsmsx105.ger.corp.intel.com> References: <1443247147-5763-1-git-send-email-zoltan.kiss@linaro.org> In-Reply-To: <1443247147-5763-1-git-send-email-zoltan.kiss@linaro.org> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] acl: fix target arch detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2015 09:42:39 -0000 Hi Zoltan, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zoltan Kiss > Sent: Saturday, September 26, 2015 6:59 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] acl: fix target arch detection >=20 > This test selects AVX2 code even if the target architecture doesn't suppo= rt it. >=20 > Signed-off-by: Zoltan Kiss > --- > diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile > index 46acc2b..17a9f96 100644 > --- a/lib/librte_acl/Makefile > +++ b/lib/librte_acl/Makefile > @@ -57,7 +57,7 @@ CFLAGS_acl_run_sse.o +=3D -msse4.1 > # then add support for AVX2 classify method. > # >=20 > -CC_AVX2_SUPPORT=3D$(shell $(CC) -march=3Dcore-avx2 -dM -E - &1 | \ > +CC_AVX2_SUPPORT=3D$(shell $(CC) $(MACHINE_FLAGS) -dM -E - &= 1 | \ > grep -q AVX2 && echo 1) >=20 > ifeq ($(CC_AVX2_SUPPORT), 1) The purpose of that code is to check does compiler supports AVX2 or not. If it does, even if selected target doesn't support AVX2, we still compile = in AVX2 version of acl_classify (same for SSE4). Then at startup, rte_acl_init() selects the highest supported on that box = implementation (scalar/sse/avx2). So NACK. Konstantin BTW, why MACHINE_FLAGS? Shouldn't it be MACHINE_CFLAGS, instead?