mk: fix compiling error for atom target
PATCH 1/1 mk: fix compiling error for atom target
GCC thinks target atom doesn't support SSE4.2 and SSE4 is now part of minimum requirements for DPDK on x86. So there are compiling errors when cross-compiling for target atom. And in fact, the atom supports SSE4 now. This patch fixes this issue.
--- mk/machine/atm/rte.vars.mk | 2 ++ 1 file changed, 2 insertions(+)
mk/machine/atm/rte.vars.mk +2 -0
@@ -56,3 +56,5 @@ # CPU_ASFLAGS = MACHINE_CFLAGS = -march=atom + +MACHINE_CFLAGS += -msse4.2
Signature · 1 line
2.7.4
Quoted 9 lines · Xiaoyun Li
GCC thinks target atom doesn't support SSE4.2 and SSE4 is now part of minimum requirements for DPDK on x86. So there are compiling errors when cross-compiling for target atom. And in fact, the atom supports SSE4 now. This patch fixes this issue.
Fixes 5ea4d4688dce ("net/ixgbe: remove fallback code for x86 non-SSE4")Signed-off-by Xiaoyun Li <[email protected]>
The -march=atom flag is for older atom CPUs, and is no longer advertised by gcc, since all -march flags now correspond to the actual core microarchitecture used. [man gcc on Fedora 26, no longer lists atom as a valid march value, though it's probably still accepted for backward compatibility]. The direct replacement for atom is "bonnell", which does not have SSE4.2 support, so we should not use. What we do support is later atoms, so the architecture targets for atom should be "-march=silvermont". This automatically includes sse4 support so no additional flags needed.
Note: I previously had this discussion with Neil on-list, but forgot to do the follow-up work agreed on. See:
https://www.mail-archive.com/[email protected]/msg72629.html
The agreed plan was to remove atom as a target for DPDK builds and add a "silvermont" replacement instead. If you have time, perhaps you could look at doing that instead of this fix?
/Bruce
Quoted 17 lines
--- mk/machine/atm/rte.vars.mk | 2 ++ 1 file changed, 2 insertions(+)mk/machine/atm/rte.vars.mk +2
-0@@ -56,3 +56,5 @@ # CPU_ASFLAGS = MACHINE_CFLAGS = -march=atom + +MACHINE_CFLAGS += -msse4.2Signature · 1 line
2.7.4
Hi
So I should delete the mk/machine/atm folder and add a new mk/machine/silvermont folder, right? And in silvermont/rte.vars.mk, there is sentence " MACHINE_CFLAGS = -march=silvermont ". The annotation just adds the copy of others like original atm?
Another thing, we don't need to create the config file (defconfig_x86_64-silvermont-linuxapp-gcc), right?
Best Regards
Xiaoyun Li
-----Original Message-----
From: Richardson, Bruce
Sent: Thursday, September 7, 2017 16:57
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; Zhang, Helin <[email protected]>; [email protected]
Subject: Re: [PATCH] mk: fix compiling error for atom target
Quoted 10 lines · Xiaoyun Li
GCC thinks target atom doesn't support SSE4.2 and SSE4 is now part of minimum requirements for DPDK on x86. So there are compiling errors when cross-compiling for target atom. And in fact, the atom supports SSE4 now. This patch fixes this issue.
Fixes 5ea4d4688dce ("net/ixgbe: remove fallback code for x86non-SSE4")
Cc: [email protected]Signed-off-by Xiaoyun Li <[email protected]>
The -march=atom flag is for older atom CPUs, and is no longer advertised by gcc, since all -march flags now correspond to the actual core microarchitecture used. [man gcc on Fedora 26, no longer lists atom as a valid march value, though it's probably still accepted for backward compatibility]. The direct replacement for atom is "bonnell", which does not have SSE4.2 support, so we should not use. What we do support is later atoms, so the architecture targets for atom should be "-march=silvermont". This automatically includes sse4 support so no additional flags needed.
Note: I previously had this discussion with Neil on-list, but forgot to do the follow-up work agreed on. See:
https://www.mail-archive.com/[email protected]/msg72629.html
The agreed plan was to remove atom as a target for DPDK builds and add a "silvermont" replacement instead. If you have time, perhaps you could look at doing that instead of this fix?
/Bruce
Quoted 17 lines
--- mk/machine/atm/rte.vars.mk | 2 ++ 1 file changed, 2 insertions(+)mk/machine/atm/rte.vars.mk +2
-1@@ -56,3 +56,5 @@ # CPU_ASFLAGS = MACHINE_CFLAGS = -march=atom + +MACHINE_CFLAGS += -msse4.2 --2.7.4
Quoted 6 lines · Xiaoyun
Hi
So I should delete the mk/machine/atm folder and add a new mk/machine/silvermont folder, right? And insilvermont/rte.vars.mk, there is sentence "MACHINE_CFLAGS= -march=silvermont ". The annotation just adds the copy of others like original atm?
Another thing, we don't need to create the config file (defconfig_x86_64-silvermont-linuxapp-gcc), right?
Yes, that is correct.
Quoted 3 lines
Best Regards
Xiaoyun Li
Thanks,
/Bruce
Quoted 46 lines
-----Original Message-----
From: Richardson, Bruce
Sent: Thursday, September 7, 2017 16:57
To: Li, Xiaoyun <[email protected]>
Cc: [email protected]; Zhang, Helin <[email protected]>; [email protected]
Subject: Re: [PATCH] mk: fix compiling error for atom targetQuoted 10 lines · Xiaoyun Li
GCC thinks target atom doesn't support SSE4.2 and SSE4 is now part of minimum requirements for DPDK on x86. So there are compiling errors when cross-compiling for target atom. And in fact, the atom supports SSE4 now. This patch fixes this issue.
Fixes 5ea4d4688dce ("net/ixgbe: remove fallback code for x86non-SSE4")
Cc: [email protected]Signed-off-by Xiaoyun Li <[email protected]>The -march=atom flag is for older atom CPUs, and is no longer advertised by gcc, since all -march flags now correspond to the actual core microarchitecture used. [man gcc on Fedora 26, no longer lists atom as a valid march value, though it's probably still accepted for backward compatibility]. The direct replacement for atom is "bonnell", which does not have SSE4.2 support, so we should not use. What we do support is later atoms, so the architecture targets for atom should be "-march=silvermont". This automatically includes sse4 support so no additional flags needed.
Note: I previously had this discussion with Neil on-list, but forgot to do the follow-up work agreed on. See:
https://www.mail-archive.com/[email protected]/msg72629.html
The agreed plan was to remove atom as a target for DPDK builds and add a "silvermont" replacement instead. If you have time, perhaps you could look at doing that instead of this fix?/Bruce
Quoted 17 lines
--- mk/machine/atm/rte.vars.mk | 2 ++ 1 file changed, 2 insertions(+)mk/machine/atm/rte.vars.mk +2
-1@@ -56,3 +56,5 @@ # CPU_ASFLAGS = MACHINE_CFLAGS = -march=atom + +MACHINE_CFLAGS += -msse4.2 --2.7.4