From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150085.outbound.protection.outlook.com [40.107.15.85]) by dpdk.org (Postfix) with ESMTP id AEE9C1B3EE; Thu, 3 Jan 2019 23:46:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4aZYrjT7g/3QF5KzmOXcKE2qWw5Cehu+l1phG26B13A=; b=Jc1ccS+xDxqf9pT5G/fMGVY6beHdnQt/krnuAZkDhabyBAQn+23z1ZOCm8y231bRanhXGy1suO5ln8MwRO6cMTE6CBkL2neO5hbjlfeoXmmijREz5G2z8CAyNptAyBECtqSErUxq52YO+h1qzH7r2YBllDj4FWKltTIv+8XGZv8= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4090.eurprd05.prod.outlook.com (52.134.72.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.6; Thu, 3 Jan 2019 22:46:39 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::d43a:3775:8af7:29c6]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::d43a:3775:8af7:29c6%4]) with mapi id 15.20.1495.005; Thu, 3 Jan 2019 22:46:39 +0000 From: Yongseok Koh To: Ferruh Yigit CC: Thomas Monjalon , dev , dpdk stable , Tom Barbette , Konstantin Ananyev , Bruce Richardson Thread-Topic: [PATCH v3] mk: fix scope of disabling AVX512F support Thread-Index: AQHUo4ClmXTX/jCB6kW4jRUuxr2Rc6WeJV4A Date: Thu, 3 Jan 2019 22:46:39 +0000 Message-ID: <3DB9B601-F207-43B6-9237-F4630781FE78@mellanox.com> References: <20181219210028.60219-1-ferruh.yigit@intel.com> <20190103162313.85623-1-ferruh.yigit@intel.com> In-Reply-To: <20190103162313.85623-1-ferruh.yigit@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4090; 6:8abV8DF9LC2SfUbaVtI7QguJk/d1PjRP7pnIEmExOiL+JGt53ErClft7AZ71Q27/OIJEhkpzZ44+D0G+dXIQ4cF6RM14URDQgiw6wcJ1pjLCAKnPuj7svdTLKA/RUPLJHB5VOKmJLM17LaKJ3SVKoJd2rKNg3W7oTQ5CrR+2GR+aEJFbOBWikpewE6QO7Zd1NlYUueHlkKsFMFbAgALNrxUHzpMcQS9LCmEYJLK2asl3O7bBcIw+EKvMfRcRXJpmBwD6HqNbyR3SOs6N7MDNwMQePqrMl1wJEco/GkQf0C5b/GIy7JAq4RvCvZL5tEIz0rvVQdfHAKwx3WwETj4cKEQuAdSchGuq1flYX5hBQ/RL+gU6/PRTiamFfqZDJJej8AgcQbgZ7mhlRWmHeWe0ZX9NQ2KT2uSCaYGgQs7L3ADe8h4OBIcQ0lXm2uoiF7CuFfsyAPwKozUJB1p+eObCJQ==; 5:nmj3TdUziAfbgtJWcmy6KvesDf/2GC3OLWVY3E0OX6f7ZcWdsb57jaLHsjgyczfx+rcDkf9EThIzZT4iNKbn3XAk1OSsdRo1D9uWhQ2q/yK+3WORjkSJ7hGn0TZM7v83hK4lpkzd2X/lzgWj9YA0Cv4taCTdCXQxhSFMoAr6cJMUQf9LC5QbBqsFYS9jUQSNFv/JsEaL0H5MU24W5c8F+w==; 7:lx99psffM3f2nn9Q0a1p9UqMTXYD0QSFgEao+iGVGZAo9MlAe/hOrnMy8KiLgeWtCZJKmUDCc+UxnQRoMZ/+vSrAsQ7+Vh08VVQSmnb96qWIDsNYaUiRYovNEBD7nPdqifxU2C3kRide+gq23j5KFQ== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 823a4745-c3bc-41f3-635b-08d671cd530f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB4090; x-ms-traffictypediagnostic: DB3PR0502MB4090: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(10201501046)(93006095)(93001095)(3231475)(944501520)(52105112)(3002001)(6055026)(6041310)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0502MB4090; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4090; x-forefront-prvs: 0906E83A25 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(396003)(376002)(346002)(39860400002)(136003)(199004)(189003)(105586002)(53936002)(6512007)(6306002)(486006)(6916009)(11346002)(2616005)(476003)(6486002)(316002)(14454004)(6246003)(6436002)(446003)(33656002)(97736004)(229853002)(66066001)(76176011)(6506007)(53546011)(2906002)(45080400002)(106356001)(5660300001)(14444005)(256004)(26005)(305945005)(36756003)(102836004)(7736002)(186003)(71200400001)(71190400001)(8676002)(575784001)(86362001)(54906003)(8936002)(3846002)(6116002)(83716004)(4326008)(478600001)(966005)(81156014)(81166006)(82746002)(99286004)(25786009)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4090; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 52biITibP6qEa7o+jihTRMeT+SPN0QE2Bxn/AJT/KkdJ71AzKUqEOkyg3Haq29Z/+NKxm4R13fVgcYWlnjTnZ758QcviHhJ07mqa5WDrSqtMxU5PyD+mXGUt4JkbicCNO8HtXmf4UTAJrB70dDuiCa6ZelucHcgfM6k6wA3hNXhiE3+NlQw36CxjGUJ/Mqx1SGp3bK/2/G4fEqNj6KFu9qdrPjGoX8c2mFb7J1E1h/lFYOlUnOfTsvb4SQINfwDv6qugdybnQtzKpKxujOBQbyrvzsJGFC8kVgTH9j0BpGo6CB/s/bkX8g3j0rlo1oFP spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <23C64BE100CBC64BB2853E2B48215576@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 823a4745-c3bc-41f3-635b-08d671cd530f X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jan 2019 22:46:39.3504 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4090 Subject: Re: [dpdk-dev] [PATCH v3] mk: fix scope of disabling AVX512F support 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: Thu, 03 Jan 2019 22:46:42 -0000 > On Jan 3, 2019, at 8:23 AM, Ferruh Yigit wrote: >=20 > AVX512 was disabled for GCC because of Bugzilla issue 97 [1], > the GCC defect submitted for the issue [2] highlighted that this is > a known binutils version 2.30 issue. >=20 > Narrowed the scope of no-avx512 to the this specific binutils version. >=20 > [1] > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugs= .dpdk.org%2Fshow_bug.cgi%3Fid%3D97&data=3D02%7C01%7Cyskoh%40mellanox.co= m%7C9e8d0eb500ca4cb74c1508d67197c6b0%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0= %7C0%7C636821294022213177&sdata=3DRxj7HxBWfp4hMzfRkiGtnSYt8N0TG9xnAL0ZY= BpYYa0%3D&reserved=3D0 >=20 > [2] > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgcc.= gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D88096&data=3D02%7C01%7Cyskoh%4= 0mellanox.com%7C9e8d0eb500ca4cb74c1508d67197c6b0%7Ca652971c7d2e4d9ba6a4d149= 256f461b%7C0%7C0%7C636821294022213177&sdata=3DEqzsamoYfFve5JAsgyWw51JOB= hhiKTOCrnfZoYTGN28%3D&reserved=3D0 >=20 > Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ferruh Yigit > --- Acked-by: Yongseok Koh =20 Thanks > Cc: Tom Barbette > Cc: Thomas Monjalon > Cc: Yongseok Koh > Cc: Konstantin Ananyev > Cc: Bruce Richardson >=20 > v2: > * Added warning message (print only once for eal) > * Moved decision details to compat file, kept execution in cpuflags >=20 > v3: > * replace 'ld' with '$(LD)' for cross build > * added meson support > --- > config/meson.build | 8 ++++++++ > mk/rte.cpuflags.mk | 4 ++-- > mk/toolchain/gcc/rte.toolchain-compat.mk | 10 ++++++++++ > 3 files changed, 20 insertions(+), 2 deletions(-) >=20 > diff --git a/config/meson.build b/config/meson.build > index db32499b3..40802fc88 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -43,6 +43,14 @@ toolchain =3D cc.get_id() > dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) > dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1) >=20 > +# get binutils version for the workaround of Bug 97 > +ldver =3D run_command('ld', '-v').stdout().strip() > +if ldver.contains('2.30') > + if cc.has_argument('-mno-avx512f') > + machine_args +=3D '-mno-avx512f' > + endif > +endif > + > add_project_link_arguments('-Wl,--no-as-needed', language: 'c') > dpdk_extra_ldflags +=3D '-Wl,--no-as-needed' >=20 > diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk > index c3291b17a..541211c61 100644 > --- a/mk/rte.cpuflags.mk > +++ b/mk/rte.cpuflags.mk > @@ -69,8 +69,8 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),) > ifeq ($(CONFIG_RTE_ENABLE_AVX512),y) > CPUFLAGS +=3D AVX512F > else > -# disable AVX512F support of gcc as a workaround for Bug 97 > -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > +# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bu= g 97 > +ifeq ($(FORCE_DISABLE_AVX512),y) > MACHINE_CFLAGS +=3D -mno-avx512f > endif > endif > diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/= rte.toolchain-compat.mk > index 44904295c..33ea3f03a 100644 > --- a/mk/toolchain/gcc/rte.toolchain-compat.mk > +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk > @@ -20,6 +20,16 @@ HOST_GCC_MINOR =3D $(shell echo __GNUC_MINOR__ | $(HOS= TCC) -E -x c - | tail -n 1) > HOST_GCC_PATCHLEVEL =3D $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -= x c - | tail -n 1) > HOST_GCC_VERSION =3D $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR) >=20 > +LD_VERSION =3D $(shell $(LD) -v) > +# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bu= g 97 > +ifneq ($(filter 2.30%,$(LD_VERSION)),) > +FORCE_DISABLE_AVX512 :=3D y > +# print warning only once for librte_eal > +ifneq ($(filter %librte_eal,$(lastword $(CURDIR))),) > +$(warning AVX512 support disabled because of ld 2.30. See Bug 97) > +endif > +endif > + > # if GCC is older than 4.x > ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1) > MACHINE_CFLAGS =3D > --=20 > 2.17.2 >=20