* [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support
@ 2018-12-19 19:29 Ferruh Yigit
2018-12-19 19:58 ` Thomas Monjalon
2018-12-19 21:00 ` [dpdk-stable] [PATCH v2] " Ferruh Yigit
0 siblings, 2 replies; 18+ messages in thread
From: Ferruh Yigit @ 2018-12-19 19:29 UTC (permalink / raw)
To: dev, Thomas Monjalon
Cc: Ferruh Yigit, stable, Tom Barbette, Yongseok Koh,
Konstantin Ananyev, Bruce Richardson
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.
Narrowed the scope of no-avx512 to the this specific binutils version.
[1]
https://bugs.dpdk.org/show_bug.cgi?id=97
[2]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Tom Barbette <barbette@kth.se>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Yongseok Koh <yskoh@mellanox.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
We need similar check for meson which is missing right now.
---
mk/rte.cpuflags.mk | 2 ++
mk/toolchain/gcc/rte.toolchain-compat.mk | 2 ++
2 files changed, 4 insertions(+)
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index c3291b17a..5e52e580d 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -71,10 +71,12 @@ CPUFLAGS += AVX512F
else
# disable AVX512F support of gcc as a workaround for Bug 97
ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifneq ($(filter 2.30%,$(LD_VERSION)),)
MACHINE_CFLAGS += -mno-avx512f
endif
endif
endif
+endif
# IBM Power CPU flags
ifneq ($(filter $(AUTO_CPUFLAGS),__PPC64__),)
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 44904295c..2690aeb4d 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -20,6 +20,8 @@ HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+LD_VERSION = $(shell ld -v)
+
# if GCC is older than 4.x
ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1)
MACHINE_CFLAGS =
--
2.17.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support
2018-12-19 19:29 [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support Ferruh Yigit
@ 2018-12-19 19:58 ` Thomas Monjalon
2018-12-19 20:20 ` Ferruh Yigit
2018-12-19 21:00 ` [dpdk-stable] [PATCH v2] " Ferruh Yigit
1 sibling, 1 reply; 18+ messages in thread
From: Thomas Monjalon @ 2018-12-19 19:58 UTC (permalink / raw)
To: Ferruh Yigit
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
19/12/2018 20:29, Ferruh Yigit:
> 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.
>
> Narrowed the scope of no-avx512 to the this specific binutils version.
[...]
> # disable AVX512F support of gcc as a workaround for Bug 97
> ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
> MACHINE_CFLAGS += -mno-avx512f
I think we should print a warning here.
There is a function $(warning) or $(info) for such case.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support
2018-12-19 19:58 ` Thomas Monjalon
@ 2018-12-19 20:20 ` Ferruh Yigit
2018-12-19 20:28 ` Thomas Monjalon
0 siblings, 1 reply; 18+ messages in thread
From: Ferruh Yigit @ 2018-12-19 20:20 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
On 12/19/2018 7:58 PM, Thomas Monjalon wrote:
> 19/12/2018 20:29, Ferruh Yigit:
>> 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.
>>
>> Narrowed the scope of no-avx512 to the this specific binutils version.
> [...]
>> # disable AVX512F support of gcc as a workaround for Bug 97
>> ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
>> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
>> MACHINE_CFLAGS += -mno-avx512f
>
> I think we should print a warning here.
> There is a function $(warning) or $(info) for such case.
I can add but it prints warning per component, so it prints a lot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support
2018-12-19 20:20 ` Ferruh Yigit
@ 2018-12-19 20:28 ` Thomas Monjalon
2018-12-19 20:53 ` Ferruh Yigit
0 siblings, 1 reply; 18+ messages in thread
From: Thomas Monjalon @ 2018-12-19 20:28 UTC (permalink / raw)
To: Ferruh Yigit
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
19/12/2018 21:20, Ferruh Yigit:
> On 12/19/2018 7:58 PM, Thomas Monjalon wrote:
> > 19/12/2018 20:29, Ferruh Yigit:
> >> 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.
> >>
> >> Narrowed the scope of no-avx512 to the this specific binutils version.
> > [...]
> >> # disable AVX512F support of gcc as a workaround for Bug 97
> >> ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
> >> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
> >> MACHINE_CFLAGS += -mno-avx512f
> >
> > I think we should print a warning here.
> > There is a function $(warning) or $(info) for such case.
>
> I can add but it prints warning per component, so it prints a lot.
I think we can choose to print only when compiling EAL
by checking $(findstring eal,$(lastword $(MAKEFILE_LIST)))
One more comment: it would be good to have this fix with meson too.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support
2018-12-19 20:28 ` Thomas Monjalon
@ 2018-12-19 20:53 ` Ferruh Yigit
2018-12-20 11:29 ` Bruce Richardson
0 siblings, 1 reply; 18+ messages in thread
From: Ferruh Yigit @ 2018-12-19 20:53 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
On 12/19/2018 8:28 PM, Thomas Monjalon wrote:
> 19/12/2018 21:20, Ferruh Yigit:
>> On 12/19/2018 7:58 PM, Thomas Monjalon wrote:
>>> 19/12/2018 20:29, Ferruh Yigit:
>>>> 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.
>>>>
>>>> Narrowed the scope of no-avx512 to the this specific binutils version.
>>> [...]
>>>> # disable AVX512F support of gcc as a workaround for Bug 97
>>>> ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
>>>> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
>>>> MACHINE_CFLAGS += -mno-avx512f
>>>
>>> I think we should print a warning here.
>>> There is a function $(warning) or $(info) for such case.
>>
>> I can add but it prints warning per component, so it prints a lot.
>
> I think we can choose to print only when compiling EAL
> by checking $(findstring eal,$(lastword $(MAKEFILE_LIST)))
Thanks for hint, I will use it.
>
> One more comment: it would be good to have this fix with meson too.
Agreed, only I am not quite sure how to fix it in meson.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-stable] [PATCH v2] mk: fix scope of disabling AVX512F support
2018-12-19 19:29 [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support Ferruh Yigit
2018-12-19 19:58 ` Thomas Monjalon
@ 2018-12-19 21:00 ` Ferruh Yigit
2018-12-22 23:02 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-01-03 16:23 ` [dpdk-stable] [PATCH v3] " Ferruh Yigit
1 sibling, 2 replies; 18+ messages in thread
From: Ferruh Yigit @ 2018-12-19 21:00 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
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.
Narrowed the scope of no-avx512 to the this specific binutils version.
[1]
https://bugs.dpdk.org/show_bug.cgi?id=97
[2]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Tom Barbette <barbette@kth.se>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Yongseok Koh <yskoh@mellanox.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
We need similar check for meson which is missing right now.
v2:
* Added warning message (print only once for eal)
* Moved decision details to compat file, kept execution in cpuflags
---
mk/rte.cpuflags.mk | 4 ++--
mk/toolchain/gcc/rte.toolchain-compat.mk | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
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 += 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 Bug 97
+ifeq ($(FORCE_DISABLE_AVX512),y)
MACHINE_CFLAGS += -mno-avx512f
endif
endif
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 44904295c..fc93bfc22 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -20,6 +20,16 @@ HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+LD_VERSION = $(shell ld -v)
+# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
+ifneq ($(filter 2.30%,$(LD_VERSION)),)
+FORCE_DISABLE_AVX512 := 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 =
--
2.17.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support
2018-12-19 20:53 ` Ferruh Yigit
@ 2018-12-20 11:29 ` Bruce Richardson
0 siblings, 0 replies; 18+ messages in thread
From: Bruce Richardson @ 2018-12-20 11:29 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Thomas Monjalon, dev, stable, Tom Barbette, Yongseok Koh,
Konstantin Ananyev
On Wed, Dec 19, 2018 at 08:53:34PM +0000, Ferruh Yigit wrote:
> On 12/19/2018 8:28 PM, Thomas Monjalon wrote:
> > 19/12/2018 21:20, Ferruh Yigit:
> >> On 12/19/2018 7:58 PM, Thomas Monjalon wrote:
> >>> 19/12/2018 20:29, Ferruh Yigit:
> >>>> 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.
> >>>>
> >>>> Narrowed the scope of no-avx512 to the this specific binutils version.
> >>> [...]
> >>>> # disable AVX512F support of gcc as a workaround for Bug 97
> >>>> ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
> >>>> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
> >>>> MACHINE_CFLAGS += -mno-avx512f
> >>>
> >>> I think we should print a warning here.
> >>> There is a function $(warning) or $(info) for such case.
> >>
> >> I can add but it prints warning per component, so it prints a lot.
> >
> > I think we can choose to print only when compiling EAL
> > by checking $(findstring eal,$(lastword $(MAKEFILE_LIST)))
>
> Thanks for hint, I will use it.
>
> >
> > One more comment: it would be good to have this fix with meson too.
>
> Agreed, only I am not quite sure how to fix it in meson.
One suggestion, but the snippet below in main meson.build file, and put the
printing of a message in one of the EAL meson.build files.
/Bruce
ldver = run_command('ld', '-v').stdout().strip()
if ldver.contains('2.30')
# take action here
endif
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] mk: fix scope of disabling AVX512F support
2018-12-19 21:00 ` [dpdk-stable] [PATCH v2] " Ferruh Yigit
@ 2018-12-22 23:02 ` Thomas Monjalon
2019-01-03 16:23 ` [dpdk-stable] [PATCH v3] " Ferruh Yigit
1 sibling, 0 replies; 18+ messages in thread
From: Thomas Monjalon @ 2018-12-22 23:02 UTC (permalink / raw)
To: Ferruh Yigit
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
19/12/2018 22:00, Ferruh Yigit:
> --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
> +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
> +LD_VERSION = $(shell ld -v)
For cross-compilation, you should use $(LD),
defined as LD = $(CROSS)ld
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-stable] [PATCH v3] mk: fix scope of disabling AVX512F support
2018-12-19 21:00 ` [dpdk-stable] [PATCH v2] " Ferruh Yigit
2018-12-22 23:02 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2019-01-03 16:23 ` Ferruh Yigit
2019-01-03 22:46 ` Yongseok Koh
2019-01-07 16:49 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
1 sibling, 2 replies; 18+ messages in thread
From: Ferruh Yigit @ 2019-01-03 16:23 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson
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.
Narrowed the scope of no-avx512 to the this specific binutils version.
[1]
https://bugs.dpdk.org/show_bug.cgi?id=97
[2]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Tom Barbette <barbette@kth.se>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Yongseok Koh <yskoh@mellanox.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
v2:
* Added warning message (print only once for eal)
* Moved decision details to compat file, kept execution in cpuflags
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(-)
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 = cc.get_id()
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+# get binutils version for the workaround of Bug 97
+ldver = run_command('ld', '-v').stdout().strip()
+if ldver.contains('2.30')
+ if cc.has_argument('-mno-avx512f')
+ machine_args += '-mno-avx512f'
+ endif
+endif
+
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
dpdk_extra_ldflags += '-Wl,--no-as-needed'
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 += 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 Bug 97
+ifeq ($(FORCE_DISABLE_AVX512),y)
MACHINE_CFLAGS += -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 = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+LD_VERSION = $(shell $(LD) -v)
+# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
+ifneq ($(filter 2.30%,$(LD_VERSION)),)
+FORCE_DISABLE_AVX512 := 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 =
--
2.17.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH v3] mk: fix scope of disabling AVX512F support
2019-01-03 16:23 ` [dpdk-stable] [PATCH v3] " Ferruh Yigit
@ 2019-01-03 22:46 ` Yongseok Koh
2019-01-04 2:40 ` Varghese, Vipin
2019-01-07 16:49 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
1 sibling, 1 reply; 18+ messages in thread
From: Yongseok Koh @ 2019-01-03 22:46 UTC (permalink / raw)
To: Ferruh Yigit
Cc: Thomas Monjalon, dev, dpdk stable, Tom Barbette,
Konstantin Ananyev, Bruce Richardson
> On Jan 3, 2019, at 8:23 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> 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.
>
> Narrowed the scope of no-avx512 to the this specific binutils version.
>
> [1]
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.dpdk.org%2Fshow_bug.cgi%3Fid%3D97&data=02%7C01%7Cyskoh%40mellanox.com%7C9e8d0eb500ca4cb74c1508d67197c6b0%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636821294022213177&sdata=Rxj7HxBWfp4hMzfRkiGtnSYt8N0TG9xnAL0ZYBpYYa0%3D&reserved=0
>
> [2]
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D88096&data=02%7C01%7Cyskoh%40mellanox.com%7C9e8d0eb500ca4cb74c1508d67197c6b0%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636821294022213177&sdata=EqzsamoYfFve5JAsgyWw51JOBhhiKTOCrnfZoYTGN28%3D&reserved=0
>
> Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
> Cc: Tom Barbette <barbette@kth.se>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Yongseok Koh <yskoh@mellanox.com>
> Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
>
> v2:
> * Added warning message (print only once for eal)
> * Moved decision details to compat file, kept execution in cpuflags
>
> 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(-)
>
> 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 = cc.get_id()
> dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
> dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
>
> +# get binutils version for the workaround of Bug 97
> +ldver = run_command('ld', '-v').stdout().strip()
> +if ldver.contains('2.30')
> + if cc.has_argument('-mno-avx512f')
> + machine_args += '-mno-avx512f'
> + endif
> +endif
> +
> add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> dpdk_extra_ldflags += '-Wl,--no-as-needed'
>
> 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 += 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 Bug 97
> +ifeq ($(FORCE_DISABLE_AVX512),y)
> MACHINE_CFLAGS += -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 = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
> HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
> HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
>
> +LD_VERSION = $(shell $(LD) -v)
> +# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
> +FORCE_DISABLE_AVX512 := 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 =
> --
> 2.17.2
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH v3] mk: fix scope of disabling AVX512F support
2019-01-03 22:46 ` Yongseok Koh
@ 2019-01-04 2:40 ` Varghese, Vipin
2019-01-04 10:27 ` Ferruh Yigit
0 siblings, 1 reply; 18+ messages in thread
From: Varghese, Vipin @ 2019-01-04 2:40 UTC (permalink / raw)
To: Yongseok Koh, Yigit, Ferruh
Cc: Thomas Monjalon, dev, dpdk stable, Tom Barbette, Ananyev,
Konstantin, Richardson, Bruce
Hi Ferruh,
Should not be there a documentation update in 'Known Issues and Limitations in Legacy Releases' for the limitation. If it is already added can you please add the patchwork link for the same.
Thanks
Vipin Varghese
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Yongseok Koh
> Sent: Friday, January 4, 2019 4:17 AM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; dev <dev@dpdk.org>; dpdk
> stable <stable@dpdk.org>; Tom Barbette <barbette@kth.se>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3] mk: fix scope of disabling AVX512F support
>
>
> > On Jan 3, 2019, at 8:23 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >
> > 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.
> >
> > Narrowed the scope of no-avx512 to the this specific binutils version.
> >
> > [1]
> > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbug
> >
> s.dpdk.org%2Fshow_bug.cgi%3Fid%3D97&data=02%7C01%7Cyskoh%40
> mellano
> >
> x.com%7C9e8d0eb500ca4cb74c1508d67197c6b0%7Ca652971c7d2e4d9ba6a4
> d149256
> >
> f461b%7C0%7C0%7C636821294022213177&sdata=Rxj7HxBWfp4hMzfRki
> GtnSYt8
> > N0TG9xnAL0ZYBpYYa0%3D&reserved=0
> >
> > [2]
> > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc
> >
> .gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D88096&data=02%7C01%
> 7Cysk
> >
> oh%40mellanox.com%7C9e8d0eb500ca4cb74c1508d67197c6b0%7Ca652971c
> 7d2e4d9
> >
> ba6a4d149256f461b%7C0%7C0%7C636821294022213177&sdata=Eqzsa
> moYfFve5
> > JAsgyWw51JOBhhiKTOCrnfZoYTGN28%3D&reserved=0
> >
> > Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > ---
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
>
> Thanks
>
> > Cc: Tom Barbette <barbette@kth.se>
> > Cc: Thomas Monjalon <thomas@monjalon.net>
> > Cc: Yongseok Koh <yskoh@mellanox.com>
> > Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > Cc: Bruce Richardson <bruce.richardson@intel.com>
> >
> > v2:
> > * Added warning message (print only once for eal)
> > * Moved decision details to compat file, kept execution in cpuflags
> >
> > 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(-)
> >
> > 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 = cc.get_id()
> > dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
> > dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
> >
> > +# get binutils version for the workaround of Bug 97 ldver =
> > +run_command('ld', '-v').stdout().strip() if ldver.contains('2.30')
> > + if cc.has_argument('-mno-avx512f')
> > + machine_args += '-mno-avx512f'
> > + endif
> > +endif
> > +
> > add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
> > dpdk_extra_ldflags += '-Wl,--no-as-needed'
> >
> > 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 += 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
> > +Bug 97 ifeq ($(FORCE_DISABLE_AVX512),y)
> > MACHINE_CFLAGS += -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 = $(shell echo __GNUC_MINOR__
> |
> > $(HOSTCC) -E -x c - | tail -n 1) HOST_GCC_PATCHLEVEL = $(shell echo
> > __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
> > HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
> >
> > +LD_VERSION = $(shell $(LD) -v)
> > +# disable AVX512F support for GCC & binutils 2.30 as a workaround for
> > +Bug 97 ifneq ($(filter 2.30%,$(LD_VERSION)),)
> > +FORCE_DISABLE_AVX512 := 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 =
> > --
> > 2.17.2
> >
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH v3] mk: fix scope of disabling AVX512F support
2019-01-04 2:40 ` Varghese, Vipin
@ 2019-01-04 10:27 ` Ferruh Yigit
2019-01-04 10:28 ` Varghese, Vipin
0 siblings, 1 reply; 18+ messages in thread
From: Ferruh Yigit @ 2019-01-04 10:27 UTC (permalink / raw)
To: Varghese, Vipin, Yongseok Koh
Cc: Thomas Monjalon, dev, dpdk stable, Tom Barbette, Ananyev,
Konstantin, Richardson, Bruce
On 1/4/2019 2:40 AM, Varghese, Vipin wrote:
> Hi Ferruh,
>
> Should not be there a documentation update in 'Known Issues and Limitations in Legacy Releases' for the limitation. If it is already added can you please add the patchwork link for the same.
It is good idea to document this limitation.
Previous limitation was documented in 18.11 release notes, I can move it into
known_issues.rst, and put updated limitation into 19.02 release notes.
>
> Thanks
> Vipin Varghese
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH v3] mk: fix scope of disabling AVX512F support
2019-01-04 10:27 ` Ferruh Yigit
@ 2019-01-04 10:28 ` Varghese, Vipin
0 siblings, 0 replies; 18+ messages in thread
From: Varghese, Vipin @ 2019-01-04 10:28 UTC (permalink / raw)
To: Yigit, Ferruh, Yongseok Koh
Cc: Thomas Monjalon, dev, dpdk stable, Tom Barbette, Ananyev,
Konstantin, Richardson, Bruce
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, January 4, 2019 3:58 PM
> To: Varghese, Vipin <vipin.varghese@intel.com>; Yongseok Koh
> <yskoh@mellanox.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; dev <dev@dpdk.org>; dpdk
> stable <stable@dpdk.org>; Tom Barbette <barbette@kth.se>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [PATCH v3] mk: fix scope of disabling AVX512F support
>
> On 1/4/2019 2:40 AM, Varghese, Vipin wrote:
> > Hi Ferruh,
> >
> > Should not be there a documentation update in 'Known Issues and
> Limitations in Legacy Releases' for the limitation. If it is already added can you
> please add the patchwork link for the same.
>
> It is good idea to document this limitation.
> Previous limitation was documented in 18.11 release notes, I can move it into
> known_issues.rst, and put updated limitation into 19.02 release notes.
Thanks Ferruh for understanding
>
> >
> > Thanks
> > Vipin Varghese
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-stable] [PATCH v4] mk: fix scope of disabling AVX512F support
2019-01-03 16:23 ` [dpdk-stable] [PATCH v3] " Ferruh Yigit
2019-01-03 22:46 ` Yongseok Koh
@ 2019-01-07 16:49 ` Ferruh Yigit
2019-01-08 3:50 ` Varghese, Vipin
` (2 more replies)
1 sibling, 3 replies; 18+ messages in thread
From: Ferruh Yigit @ 2019-01-07 16:49 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon, John McNamara, Marko Kovacevic
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson, Vipin Varghese
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.
Narrowed the scope of no-avx512 to the this specific binutils version.
[1]
https://bugs.dpdk.org/show_bug.cgi?id=97
[2]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Tom Barbette <barbette@kth.se>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Yongseok Koh <yskoh@mellanox.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
v2:
* Added warning message (print only once for eal)
* Moved decision details to compat file, kept execution in cpuflags
v3:
* replace 'ld' with '$(LD)' for cross build
* added meson support
v4:
* Document this limitation in release notes
Cc: Vipin Varghese <vipin.varghese@intel.com>
---
config/meson.build | 8 ++++++
doc/guides/rel_notes/known_issues.rst | 32 ++++++++++++++++++++++++
doc/guides/rel_notes/release_19_02.rst | 13 ++++++++++
mk/rte.cpuflags.mk | 4 +--
mk/toolchain/gcc/rte.toolchain-compat.mk | 10 ++++++++
5 files changed, 65 insertions(+), 2 deletions(-)
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 = cc.get_id()
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+# get binutils version for the workaround of Bug 97
+ldver = run_command('ld', '-v').stdout().strip()
+if ldver.contains('2.30')
+ if cc.has_argument('-mno-avx512f')
+ machine_args += '-mno-avx512f'
+ endif
+endif
+
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
dpdk_extra_ldflags += '-Wl,--no-as-needed'
diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index a1face9c1..b0057a2bc 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -826,3 +826,35 @@ Kernel crash when hot-unplug igb_uio device while DPDK application is running
**Driver/Module**:
``igb_uio`` module.
+
+
+AVX-512 support disabled
+------------------------
+
+**Description**:
+ ``AVX-512`` support has been disabled on some conditions.
+ This shouldn't be confused with ``CONFIG_RTE_ENABLE_AVX512`` config option which is already
+ disabled by default. This config option defines if ``AVX-512`` specific implementations of
+ some file to be used or not. What has been disabled is compiler feature to produce ``AVX-512``
+ instructions from any source code.
+
+ On DPDK v18.11 ``AVX-512`` disabled for all ``GCC`` builds which reported to cause a performance
+ drop.
+
+ On DPDK v19.02 ``AVX-512`` disable scope reduced to ``GCC`` and ``binutils version 2.30`` based
+ on information accured from the GCC community defect.
+
+**Reason**:
+ Generated ``AVX-512`` code cause crash:
+ https://bugs.dpdk.org/show_bug.cgi?id=97
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
+
+**Resolution/Workaround**:
+ Update ``binutils`` to newer version than ``2.30``.
+ Use different compiler, like ``clang`` for this case.
+
+**Affected Environment/Platform**:
+ ``GCC`` and ``binutils version 2.30``.
+
+**Driver/Module**:
+ ALL.
diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index 39c6ff826..b6322b282 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -276,6 +276,19 @@ Known Issues
Also, make sure to start the actual text at the margin.
=========================================================
+* ``AVX-512`` support has been disabled for ``GCC`` builds when ``binutils 2.30``
+ is detected [1] because of a crash [2]. This can affect ``native`` machine type
+ build targets on the platforms that support ``AVX512F`` like ``Intel Skylake``
+ processors, and can cause a possible performance drop. The immediate workaround
+ is to use ``clang`` compiler on these platforms.
+ Initial workaround in DPDK v18.11 was to disable ``AVX-512`` support for ``GCC``
+ completely, but based on information on defect submitted to GCC community [3],
+ issue has been identified as ``binutils 2.30`` issue. Since currently only GCC
+ generates ``AVX-512`` instructions, scope limited to ``GCC`` and ``binutils 2.30``
+
+ - [1]: Commit ("mk: fix scope of disabling AVX512F support")
+ - [2]: https://bugs.dpdk.org/show_bug.cgi?id=97
+ - [3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Tested Platforms
----------------
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 += 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 Bug 97
+ifeq ($(FORCE_DISABLE_AVX512),y)
MACHINE_CFLAGS += -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 = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+LD_VERSION = $(shell $(LD) -v)
+# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
+ifneq ($(filter 2.30%,$(LD_VERSION)),)
+FORCE_DISABLE_AVX512 := 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 =
--
2.17.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [PATCH v4] mk: fix scope of disabling AVX512F support
2019-01-07 16:49 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
@ 2019-01-08 3:50 ` Varghese, Vipin
2019-01-14 11:55 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-01-14 15:49 ` [dpdk-stable] [PATCH v5] " Ferruh Yigit
2 siblings, 0 replies; 18+ messages in thread
From: Varghese, Vipin @ 2019-01-08 3:50 UTC (permalink / raw)
To: Yigit, Ferruh, Thomas Monjalon, Mcnamara, John, Kovacevic, Marko
Cc: dev, stable, Tom Barbette, Yongseok Koh, Ananyev, Konstantin,
Richardson, Bruce
diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index a1face9c1..b0057a2bc 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -826,3 +826,35 @@ Kernel crash when hot-unplug igb_uio device while DPDK application is running
**Driver/Module**:
``igb_uio`` module.
+
+
+AVX-512 support disabled
+------------------------
+
+**Description**:
+ ``AVX-512`` support has been disabled on some conditions.
+ This shouldn't be confused with ``CONFIG_RTE_ENABLE_AVX512`` config option which is already
+ disabled by default. This config option defines if ``AVX-512`` specific implementations of
+ some file to be used or not. What has been disabled is compiler feature to produce ``AVX-512``
+ instructions from any source code.
+
+ On DPDK v18.11 ``AVX-512`` disabled for all ``GCC`` builds which reported to cause a performance
+ drop.
+
+ On DPDK v19.02 ``AVX-512`` disable scope reduced to ``GCC`` and ``binutils version 2.30`` based
+ on information accured from the GCC community defect.
+
+**Reason**:
+ Generated ``AVX-512`` code cause crash:
+ https://bugs.dpdk.org/show_bug.cgi?id=97
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
+
+**Resolution/Workaround**:
+ Update ``binutils`` to newer version than ``2.30``.
+ Use different compiler, like ``clang`` for this case.
+
+**Affected Environment/Platform**:
+ ``GCC`` and ``binutils version 2.30``.
+
+**Driver/Module**:
+ ALL.
diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index 39c6ff826..b6322b282 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -276,6 +276,19 @@ Known Issues
Also, make sure to start the actual text at the margin.
=========================================================
+* ``AVX-512`` support has been disabled for ``GCC`` builds when
+``binutils 2.30``
+ is detected [1] because of a crash [2]. This can affect ``native``
+machine type
+ build targets on the platforms that support ``AVX512F`` like ``Intel
+Skylake``
+ processors, and can cause a possible performance drop. The immediate
+workaround
+ is to use ``clang`` compiler on these platforms.
+ Initial workaround in DPDK v18.11 was to disable ``AVX-512`` support
+for ``GCC``
+ completely, but based on information on defect submitted to GCC
+community [3],
+ issue has been identified as ``binutils 2.30`` issue. Since currently
+only GCC
+ generates ``AVX-512`` instructions, scope limited to ``GCC`` and
+``binutils 2.30``
+
+ - [1]: Commit ("mk: fix scope of disabling AVX512F support")
+ - [2]: https://bugs.dpdk.org/show_bug.cgi?id=97
+ - [3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Sharing ACK for documentation and update in release notes
Acked-by: Vipin Varghese <Vipin.varghese@intel.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v4] mk: fix scope of disabling AVX512F support
2019-01-07 16:49 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
2019-01-08 3:50 ` Varghese, Vipin
@ 2019-01-14 11:55 ` Thomas Monjalon
2019-01-14 15:49 ` [dpdk-stable] [PATCH v5] " Ferruh Yigit
2 siblings, 0 replies; 18+ messages in thread
From: Thomas Monjalon @ 2019-01-14 11:55 UTC (permalink / raw)
To: Ferruh Yigit
Cc: dev, John McNamara, Marko Kovacevic, stable, Tom Barbette,
Yongseok Koh, Konstantin Ananyev, Bruce Richardson,
Vipin Varghese
Hi,
Few details reviewed below,
07/01/2019 17:49, Ferruh Yigit:
> --- a/doc/guides/rel_notes/known_issues.rst
> +++ b/doc/guides/rel_notes/known_issues.rst
> +AVX-512 support disabled
> +------------------------
> +
> +**Description**:
> + ``AVX-512`` support has been disabled on some conditions.
> + This shouldn't be confused with ``CONFIG_RTE_ENABLE_AVX512`` config option which is already
> + disabled by default. This config option defines if ``AVX-512`` specific implementations of
> + some file to be used or not. What has been disabled is compiler feature to produce ``AVX-512``
> + instructions from any source code.
> +
> + On DPDK v18.11 ``AVX-512`` disabled for all ``GCC`` builds which reported to cause a performance
> + drop.
*is* disabled
> +
> + On DPDK v19.02 ``AVX-512`` disable scope reduced to ``GCC`` and ``binutils version 2.30`` based
*is* reduced
> + on information accured from the GCC community defect.
> +
> +**Reason**:
> + Generated ``AVX-512`` code cause crash:
> + https://bugs.dpdk.org/show_bug.cgi?id=97
> + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
> +
> +**Resolution/Workaround**:
> + Update ``binutils`` to newer version than ``2.30``.
> + Use different compiler, like ``clang`` for this case.
These are 2 possible workarounds. Should we say "Or" ?
> +
> +**Affected Environment/Platform**:
> + ``GCC`` and ``binutils version 2.30``.
> --- a/doc/guides/rel_notes/release_19_02.rst
> +++ b/doc/guides/rel_notes/release_19_02.rst
> @@ -276,6 +276,19 @@ Known Issues
> Also, make sure to start the actual text at the margin.
> =========================================================
>
> +* ``AVX-512`` support has been disabled for ``GCC`` builds when ``binutils 2.30``
> + is detected [1] because of a crash [2]. This can affect ``native`` machine type
> + build targets on the platforms that support ``AVX512F`` like ``Intel Skylake``
> + processors, and can cause a possible performance drop. The immediate workaround
> + is to use ``clang`` compiler on these platforms.
> + Initial workaround in DPDK v18.11 was to disable ``AVX-512`` support for ``GCC``
> + completely, but based on information on defect submitted to GCC community [3],
> + issue has been identified as ``binutils 2.30`` issue. Since currently only GCC
> + generates ``AVX-512`` instructions, scope limited to ``GCC`` and ``binutils 2.30``
*the* scope *is* limited
> +
> + - [1]: Commit ("mk: fix scope of disabling AVX512F support")
> + - [2]: https://bugs.dpdk.org/show_bug.cgi?id=97
> + - [3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
>
Space missing here
> Tested Platforms
> ----------------
> --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
> +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
> +LD_VERSION = $(shell $(LD) -v)
> +# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
> +ifneq ($(filter 2.30%,$(LD_VERSION)),)
> +FORCE_DISABLE_AVX512 := y
> +# print warning only once for librte_eal
> +ifneq ($(filter %librte_eal,$(lastword $(CURDIR))),)
Do we need lastword for CURDIR?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [dpdk-stable] [PATCH v5] mk: fix scope of disabling AVX512F support
2019-01-07 16:49 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
2019-01-08 3:50 ` Varghese, Vipin
2019-01-14 11:55 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2019-01-14 15:49 ` Ferruh Yigit
2019-01-14 16:28 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2 siblings, 1 reply; 18+ messages in thread
From: Ferruh Yigit @ 2019-01-14 15:49 UTC (permalink / raw)
To: Ferruh Yigit, Thomas Monjalon, John McNamara, Marko Kovacevic
Cc: dev, stable, Tom Barbette, Yongseok Koh, Konstantin Ananyev,
Bruce Richardson, Vipin Varghese
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.
Narrowed the scope of no-avx512 to the this specific binutils version.
[1]
https://bugs.dpdk.org/show_bug.cgi?id=97
[2]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Tom Barbette <barbette@kth.se>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Yongseok Koh <yskoh@mellanox.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
v2:
* Added warning message (print only once for eal)
* Moved decision details to compat file, kept execution in cpuflags
v3:
* replace 'ld' with '$(LD)' for cross build
* added meson support
v4:
* Document this limitation in release notes
Cc: Vipin Varghese <vipin.varghese@intel.com>
v5:
* Grammar fix
* remove $(lastword.. ) from makefile
* add 'OR' between possible workarounds
---
config/meson.build | 8 ++++++
doc/guides/rel_notes/known_issues.rst | 35 ++++++++++++++++++++++++
doc/guides/rel_notes/release_19_02.rst | 15 ++++++++++
mk/rte.cpuflags.mk | 4 +--
mk/toolchain/gcc/rte.toolchain-compat.mk | 10 +++++++
5 files changed, 70 insertions(+), 2 deletions(-)
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 = cc.get_id()
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+# get binutils version for the workaround of Bug 97
+ldver = run_command('ld', '-v').stdout().strip()
+if ldver.contains('2.30')
+ if cc.has_argument('-mno-avx512f')
+ machine_args += '-mno-avx512f'
+ endif
+endif
+
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
dpdk_extra_ldflags += '-Wl,--no-as-needed'
diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index a1face9c1..358dfa321 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -826,3 +826,38 @@ Kernel crash when hot-unplug igb_uio device while DPDK application is running
**Driver/Module**:
``igb_uio`` module.
+
+
+AVX-512 support disabled
+------------------------
+
+**Description**:
+ ``AVX-512`` support has been disabled on some conditions.
+ This shouldn't be confused with ``CONFIG_RTE_ENABLE_AVX512`` config option which is already
+ disabled by default. This config option defines if ``AVX-512`` specific implementations of
+ some file to be used or not. What has been disabled is compiler feature to produce ``AVX-512``
+ instructions from any source code.
+
+ On DPDK v18.11 ``AVX-512`` is disabled for all ``GCC`` builds which reported to cause a performance
+ drop.
+
+ On DPDK v19.02 ``AVX-512`` disable scope is reduced to ``GCC`` and ``binutils version 2.30`` based
+ on information accured from the GCC community defect.
+
+**Reason**:
+ Generated ``AVX-512`` code cause crash:
+ https://bugs.dpdk.org/show_bug.cgi?id=97
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
+
+**Resolution/Workaround**:
+ * Update ``binutils`` to newer version than ``2.30``.
+
+ OR
+
+ * Use different compiler, like ``clang`` for this case.
+
+**Affected Environment/Platform**:
+ ``GCC`` and ``binutils version 2.30``.
+
+**Driver/Module**:
+ ALL.
diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index d542110dd..a89042963 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -339,6 +339,21 @@ Known Issues
Also, make sure to start the actual text at the margin.
=========================================================
+* ``AVX-512`` support has been disabled for ``GCC`` builds when ``binutils 2.30``
+ is detected [1] because of a crash [2]. This can affect ``native`` machine type
+ build targets on the platforms that support ``AVX512F`` like ``Intel Skylake``
+ processors, and can cause a possible performance drop. The immediate workaround
+ is to use ``clang`` compiler on these platforms.
+ Initial workaround in DPDK v18.11 was to disable ``AVX-512`` support for ``GCC``
+ completely, but based on information on defect submitted to GCC community [3],
+ issue has been identified as ``binutils 2.30`` issue. Since currently only GCC
+ generates ``AVX-512`` instructions, the scope is limited to ``GCC`` and
+ ``binutils 2.30``
+
+ - [1]: Commit ("mk: fix scope of disabling AVX512F support")
+ - [2]: https://bugs.dpdk.org/show_bug.cgi?id=97
+ - [3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
+
Tested Platforms
----------------
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 += 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 Bug 97
+ifeq ($(FORCE_DISABLE_AVX512),y)
MACHINE_CFLAGS += -mno-avx512f
endif
endif
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 44904295c..dbddc986e 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -20,6 +20,16 @@ HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+LD_VERSION = $(shell $(LD) -v)
+# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
+ifneq ($(filter 2.30%,$(LD_VERSION)),)
+FORCE_DISABLE_AVX512 := y
+# print warning only once for librte_eal
+ifneq ($(filter %librte_eal,$(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 =
--
2.17.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v5] mk: fix scope of disabling AVX512F support
2019-01-14 15:49 ` [dpdk-stable] [PATCH v5] " Ferruh Yigit
@ 2019-01-14 16:28 ` Thomas Monjalon
0 siblings, 0 replies; 18+ messages in thread
From: Thomas Monjalon @ 2019-01-14 16:28 UTC (permalink / raw)
To: Ferruh Yigit
Cc: dev, John McNamara, Marko Kovacevic, stable, Tom Barbette,
Yongseok Koh, Konstantin Ananyev, Bruce Richardson,
Vipin Varghese
14/01/2019 16:49, Ferruh Yigit:
> 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.
>
> Narrowed the scope of no-avx512 to the this specific binutils version.
>
> [1]
> https://bugs.dpdk.org/show_bug.cgi?id=97
>
> [2]
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
>
> Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Tom Barbette <barbette@kth.se>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Yongseok Koh <yskoh@mellanox.com>
> Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
>
> v2:
> * Added warning message (print only once for eal)
> * Moved decision details to compat file, kept execution in cpuflags
>
> v3:
> * replace 'ld' with '$(LD)' for cross build
> * added meson support
>
> v4:
> * Document this limitation in release notes
> Cc: Vipin Varghese <vipin.varghese@intel.com>
>
> v5:
> * Grammar fix
> * remove $(lastword.. ) from makefile
> * add 'OR' between possible workarounds
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Applied, thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2019-01-14 16:29 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 19:29 [dpdk-stable] [PATCH] mk: fix scope of disabling AVX512F support Ferruh Yigit
2018-12-19 19:58 ` Thomas Monjalon
2018-12-19 20:20 ` Ferruh Yigit
2018-12-19 20:28 ` Thomas Monjalon
2018-12-19 20:53 ` Ferruh Yigit
2018-12-20 11:29 ` Bruce Richardson
2018-12-19 21:00 ` [dpdk-stable] [PATCH v2] " Ferruh Yigit
2018-12-22 23:02 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-01-03 16:23 ` [dpdk-stable] [PATCH v3] " Ferruh Yigit
2019-01-03 22:46 ` Yongseok Koh
2019-01-04 2:40 ` Varghese, Vipin
2019-01-04 10:27 ` Ferruh Yigit
2019-01-04 10:28 ` Varghese, Vipin
2019-01-07 16:49 ` [dpdk-stable] [PATCH v4] " Ferruh Yigit
2019-01-08 3:50 ` Varghese, Vipin
2019-01-14 11:55 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-01-14 15:49 ` [dpdk-stable] [PATCH v5] " Ferruh Yigit
2019-01-14 16:28 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).