[ovs-dev] [PATCH 3/4] xenserver: Load veth driver on 2.6.18 systems

Justin Pettit jpettit at nicira.com
Wed Apr 14 07:31:24 UTC 2010


In a future commit, the "patch" netdev type will be introduced.  The
initial implementation will be based on veth, for which we have a kernel
module on 2.6.18.  A more general solution will be used in the future,
at which time, this loading of the veth module can be removed.
---
 xenserver/etc_init.d_openvswitch |    3 +++
 xenserver/openvswitch-xen.spec   |    4 +++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
index b7feb9b..6adf654 100755
--- a/xenserver/etc_init.d_openvswitch
+++ b/xenserver/etc_init.d_openvswitch
@@ -126,6 +126,9 @@ function insert_modules_if_required {
     if [ "$ENABLE_BRCOMPAT" = "y" ] && [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then
         action "Inserting brcompat module" modprobe brcompat_mod
     fi
+    if [ -f "/lib/modules/`uname -r`/kernel/extra/openvswitch/veth_mod.ko" ] && ! lsmod | grep -q "veth_mod"; then
+        action "Inserting veth module" modprobe veth
+    fi
     if [ -f "/lib/modules/`uname -r`/kernel/extra/openvswitch/ip_gre_mod.ko" ] && ! lsmod | grep -q "ip_gre_mod"; then
         action "Inserting ip_gre module" modprobe ip_gre_mod
     fi
diff --git a/xenserver/openvswitch-xen.spec b/xenserver/openvswitch-xen.spec
index a9c662a..5abbda5 100644
--- a/xenserver/openvswitch-xen.spec
+++ b/xenserver/openvswitch-xen.spec
@@ -103,7 +103,6 @@ rm \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-kill.8 \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-openflowd.8 \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-pki.8
-rm -f $RPM_BUILD_ROOT/lib/modules/%{xen_version}/kernel/extra/openvswitch/veth_mod.ko
 
 install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch
 
@@ -337,6 +336,9 @@ fi
 %if %(echo '%{xen_version}'|awk -F"." '{if ($3>=18) print 1; else print 0;}')
 /lib/modules/%{xen_version}/kernel/extra/openvswitch/ip_gre_mod.ko
 %endif
+%if %(echo '%{xen_version}'|awk -F"[.-]" '{if ($3==18) print 1; else print 0;}')
+/lib/modules/%{xen_version}/kernel/extra/openvswitch/veth_mod.ko
+%endif
 /usr/share/openvswitch/scripts/refresh-network-uuids
 /usr/share/openvswitch/scripts/interface-reconfigure
 /usr/share/openvswitch/scripts/InterfaceReconfigure.py
-- 
1.7.0.3





More information about the dev mailing list