The ovs-atomic-i586 implementation of atomic operations can implement
64-bit atomics more efficiently when SSE is supported.  XenServer runs only
on 64-bit capable processors, in 32-bit mode, so we know on XenServer that
SSE and SSE2 are supported because they are architectural for amd64.  Thus,
this commit enables SSE and SSE2 when building for XenServer to get the
improved atomics support.

I tested that this successfully adds -msse -msse2 to the compiler flags
inside a XenServer DDK, but I didn't actually run it on a real XenServer
install.

CC: Jarno Rajahalme <jarno.rajaha...@gmail.com>
Signed-off-by: Ben Pfaff <b...@nicira.com>
---
 xenserver/openvswitch-xen.spec.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xenserver/openvswitch-xen.spec.in 
b/xenserver/openvswitch-xen.spec.in
index bd82681..7b6bfaf 100644
--- a/xenserver/openvswitch-xen.spec.in
+++ b/xenserver/openvswitch-xen.spec.in
@@ -76,7 +76,7 @@ Open vSwitch Linux kernel module compiled against kernel 
version
 %setup -q -n openvswitch-%{openvswitch_version}
 
 %build
-./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} 
--with-linux=/lib/modules/%{xen_version}/build --enable-ssl
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} 
--with-linux=/lib/modules/%{xen_version}/build --enable-ssl CFLAGS='-g -O2 
-msse -msse2'
 make %{_smp_mflags}
 
 %install
-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to