Message ID | 20200729105934.32606-1-harry.van.haaren@intel.com |
---|---|
State | Accepted |
Delegated to: | Ian Stokes |
Headers | show |
Series | [ovs-dev,v2,1/3] dpif-netdev/avx512: avoid compiling avx512 code if binutils check fails | expand |
> > This commit avoids compiling and linking of avx512 code into the vswitch_la > library if the binutils check fails. This avoids compiling code into OVS that will not > be executed due to binutils issue. > > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> > Thanks for the series Harry, it looks ok tom myself, have tested locally on a few machines and with Travis for both master and Branch 2.14. https://travis-ci.org/github/istokes/ovs/builds/715140114 https://travis-ci.org/github/istokes/ovs/builds/715139732 I've pushed this to master and as it would be an issue for 2.14 (and the patches are minor) I've pushed there too. WRT backporting beyond that I'm open to discussion, I guess the same issue could occur right? But as there was no AVX512 code previous to 2.14 it wouldn't have been visible? BR Ian > --- > > v3: > - Reword commit title & description > --- > lib/automake.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/automake.mk b/lib/automake.mk index 920c958e3..218dc7313 > 100644 > --- a/lib/automake.mk > +++ b/lib/automake.mk > @@ -22,6 +22,7 @@ lib_libopenvswitch_la_LDFLAGS = \ > $(AM_LDFLAGS) > > if HAVE_AVX512F > +if HAVE_LD_AVX512_GOOD > # Build library of avx512 code with CPU ISA CFLAGS enabled. This allows the # > compiler to use the ISA features required for the ISA optimized code-paths. > # Use LDFLAGS to compile only static library of this code, as it should be @@ - > 39,6 +40,7 @@ lib_libopenvswitchavx512_la_SOURCES = \ > lib_libopenvswitchavx512_la_LDFLAGS = \ > -static > endif > +endif > > # Build core vswitch libraries as before lib_libopenvswitch_la_SOURCES = \ > -- > 2.17.1
diff --git a/lib/automake.mk b/lib/automake.mk index 920c958e3..218dc7313 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -22,6 +22,7 @@ lib_libopenvswitch_la_LDFLAGS = \ $(AM_LDFLAGS) if HAVE_AVX512F +if HAVE_LD_AVX512_GOOD # Build library of avx512 code with CPU ISA CFLAGS enabled. This allows the # compiler to use the ISA features required for the ISA optimized code-paths. # Use LDFLAGS to compile only static library of this code, as it should be @@ -39,6 +40,7 @@ lib_libopenvswitchavx512_la_SOURCES = \ lib_libopenvswitchavx512_la_LDFLAGS = \ -static endif +endif # Build core vswitch libraries as before lib_libopenvswitch_la_SOURCES = \
This commit avoids compiling and linking of avx512 code into the vswitch_la library if the binutils check fails. This avoids compiling code into OVS that will not be executed due to binutils issue. Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> --- v3: - Reword commit title & description --- lib/automake.mk | 2 ++ 1 file changed, 2 insertions(+)