Dirk Mueller 2014-05-20 16:03:31 +00:00 committed by Git OBS Bridge
parent 6ba24240a0
commit eea0bd7b75
15 changed files with 754 additions and 369 deletions

1
Module.supported.updates Normal file
View File

@ -0,0 +1 @@
updates/openvswitch.ko

View File

@ -0,0 +1,235 @@
Bump kernel support for datapath module to include 3.12.
Make use of native vxlan kernel module for Linux >= 3.12 or if
the kernel in use supports the required vxlan functions.
Make use of native iptunnels capability for Linux >= 3.12.
Note: ipv6 enablement with vxlan is not supported by this change.
Signed-off-by: James Page <james.page at ubuntu.com>
---
FAQ | 2 +-
NEWS | 2 +-
acinclude.m4 | 5 +++--
datapath/linux/compat/include/net/ip_tunnels.h | 8 +++++++-
datapath/linux/compat/include/net/vxlan.h | 10 +++++++++-
datapath/linux/compat/ip_tunnels_core.c | 6 +++++-
datapath/linux/compat/vxlan.c | 8 ++++++--
datapath/vport-gre.c | 2 +-
datapath/vport-lisp.c | 2 +-
datapath/vport-vxlan.c | 2 +-
10 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/FAQ b/FAQ
index 75d9e6b..bbb13c4 100644
--- a/FAQ
+++ b/FAQ
@@ -148,7 +148,7 @@ A: The following table lists the Linux kernel versions against which the
1.10.x 2.6.18 to 3.8
1.11.x 2.6.18 to 3.8
2.0.x 2.6.32 to 3.10
- 2.1.x 2.6.32 to 3.11
+ 2.1.x 2.6.32 to 3.12
Open vSwitch userspace should also work with the Linux kernel module
built into Linux 3.3 and later.
diff --git a/NEWS b/NEWS
index 515a236..01c9d75 100644
--- a/NEWS
+++ b/NEWS
@@ -46,7 +46,7 @@ v2.1.0 - xx xxx xxxx
number.
- ovs-vswitchd.conf.db.5 man page will contain graphviz/dot
diagram only if graphviz package was installed at the build time.
- - Support for Linux kernels up to 3.11
+ - Support for Linux kernels up to 3.12
- ovs-dpctl:
The "show" command also displays mega flow mask stats.
- ovs-ofctl:
diff --git a/acinclude.m4 b/acinclude.m4
index 8ff5828..d62e295 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
AC_MSG_RESULT([$kversion])
if test "$version" -ge 3; then
- if test "$version" = 3 && test "$patchlevel" -le 11; then
+ if test "$version" = 3 && test "$patchlevel" -le 12; then
: # Linux 3.x
else
- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.11.x is not supported])
+ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.12.x is not supported])
fi
else
if test "$version" -le 1 || test "$patchlevel" -le 5 || test "$sublevel" -le 31; then
@@ -275,6 +275,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [parallel_ops])
OVS_GREP_IFELSE([$KSRC/include/net/gre.h], [gre_cisco_register])
+ OVS_GREP_IFELSE([$KSRC/include/net/vxlan.h], [vxlan_sock_add])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_get_be16])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be16])
OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_be32])
diff --git a/datapath/linux/compat/include/net/ip_tunnels.h b/datapath/linux/compat/include/net/ip_tunnels.h
index a786aa9..7f63266 100644
--- a/datapath/linux/compat/include/net/ip_tunnels.h
+++ b/datapath/linux/compat/include/net/ip_tunnels.h
@@ -11,6 +11,10 @@
#include <net/ip.h>
#include <net/rtnetlink.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
+#include_next <net/ip_tunnels.h>
+#else
+
#define TUNNEL_CSUM __cpu_to_be16(0x01)
#define TUNNEL_ROUTING __cpu_to_be16(0x02)
#define TUNNEL_KEY __cpu_to_be16(0x04)
@@ -34,7 +38,9 @@ struct tnl_ptk_info {
int iptunnel_xmit(struct rtable *rt,
struct sk_buff *skb,
__be32 src, __be32 dst, __u8 proto,
- __u8 tos, __u8 ttl, __be16 df);
+ __u8 tos, __u8 ttl, __be16 df, bool xnet);
int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto);
+
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) */
#endif /* __NET_IP_TUNNELS_H */
diff --git a/datapath/linux/compat/include/net/vxlan.h b/datapath/linux/compat/include/net/vxlan.h
index 3ac816b..0608598 100644
--- a/datapath/linux/compat/include/net/vxlan.h
+++ b/datapath/linux/compat/include/net/vxlan.h
@@ -5,6 +5,13 @@
#include <linux/netdevice.h>
#include <linux/udp.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) || \
+ defined(HAVE_VXLAN_SOCK_ADD)
+#include_next <net/vxlan.h>
+#endif
+
+#ifndef HAVE_VXLAN_SOCK_ADD
+
struct vxlan_sock;
typedef void (vxlan_rcv_t)(struct vxlan_sock *vs, struct sk_buff *skb, __be32 key);
@@ -20,7 +27,7 @@ struct vxlan_sock {
struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port,
vxlan_rcv_t *rcv, void *data,
- bool no_share);
+ bool no_share, bool ipv6);
void vxlan_sock_release(struct vxlan_sock *vs);
@@ -31,4 +38,5 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
__be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb);
+#endif /* HAVE_VXLAN_SOCK_ADD */
#endif
diff --git a/datapath/linux/compat/ip_tunnels_core.c b/datapath/linux/compat/ip_tunnels_core.c
index 66d5e02..3dad15d 100644
--- a/datapath/linux/compat/ip_tunnels_core.c
+++ b/datapath/linux/compat/ip_tunnels_core.c
@@ -34,10 +34,12 @@
#include "compat.h"
#include "gso.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)
+
int iptunnel_xmit(struct rtable *rt,
struct sk_buff *skb,
__be32 src, __be32 dst, __u8 proto,
- __u8 tos, __u8 ttl, __be16 df)
+ __u8 tos, __u8 ttl, __be16 df, bool xnet)
{
int pkt_len = skb->len;
struct iphdr *iph;
@@ -108,3 +110,5 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto)
skb->pkt_type = PACKET_HOST;
return 0;
}
+
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0) */
diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
index 64877e0..83f7a96 100644
--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -56,6 +56,8 @@
#include "gso.h"
#include "vlan.h"
+#ifndef HAVE_VXLAN_SOCK_ADD
+
#define VXLAN_HLEN (sizeof(struct udphdr) + sizeof(struct vxlanhdr))
#define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */
@@ -223,7 +225,7 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
if (err)
return err;
- return iptunnel_xmit(rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df);
+ return iptunnel_xmit(rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df, false);
}
static void rcu_free_vs(struct rcu_head *rcu)
@@ -298,7 +300,7 @@ static struct vxlan_sock *vxlan_socket_create(struct net *net, __be16 port,
struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port,
vxlan_rcv_t *rcv, void *data,
- bool no_share)
+ bool no_share, bool ipv6)
{
return vxlan_socket_create(net, port, rcv, data);
}
@@ -310,3 +312,5 @@ void vxlan_sock_release(struct vxlan_sock *vs)
queue_work(system_wq, &vs->del_work);
}
+
+#endif /* HAVE_VXLAN_SOCK_ADD */
diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c
index 8737b63..8613756 100644
--- a/datapath/vport-gre.c
+++ b/datapath/vport-gre.c
@@ -178,7 +178,7 @@ static int __send(struct vport *vport, struct sk_buff *skb,
return iptunnel_xmit(rt, skb, saddr,
OVS_CB(skb)->tun_key->ipv4_dst, IPPROTO_GRE,
OVS_CB(skb)->tun_key->ipv4_tos,
- OVS_CB(skb)->tun_key->ipv4_ttl, df);
+ OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
err_free_rt:
ip_rt_put(rt);
error:
diff --git a/datapath/vport-lisp.c b/datapath/vport-lisp.c
index c2698ae..a441540 100644
--- a/datapath/vport-lisp.c
+++ b/datapath/vport-lisp.c
@@ -463,7 +463,7 @@ static int lisp_send(struct vport *vport, struct sk_buff *skb)
sent_len = iptunnel_xmit(rt, skb,
saddr, OVS_CB(skb)->tun_key->ipv4_dst,
IPPROTO_UDP, OVS_CB(skb)->tun_key->ipv4_tos,
- OVS_CB(skb)->tun_key->ipv4_ttl, df);
+ OVS_CB(skb)->tun_key->ipv4_ttl, df, false);
return sent_len > 0 ? sent_len + network_offset : sent_len;
diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
index ab2b6f7..d264785 100644
--- a/datapath/vport-vxlan.c
+++ b/datapath/vport-vxlan.c
@@ -124,7 +124,7 @@ static struct vport *vxlan_tnl_create(const struct vport_parms *parms)
vxlan_port = vxlan_vport(vport);
strncpy(vxlan_port->name, parms->name, IFNAMSIZ);
- vs = vxlan_sock_add(net, htons(dst_port), vxlan_rcv, vport, true);
+ vs = vxlan_sock_add(net, htons(dst_port), vxlan_rcv, vport, true, false);
if (IS_ERR(vs)) {
ovs_vport_free(vport);
return (void *)vs;
--
1.8.5.2

View File

@ -0,0 +1,36 @@
Index: lib/vlog.c
===================================================================
--- lib/vlog.c.orig
+++ lib/vlog.c
@@ -227,7 +227,7 @@ set_facility_level(enum vlog_facility fa
ovs_mutex_lock(&log_file_mutex);
if (!module) {
struct vlog_module *mp;
- LIST_FOR_EACH (mp, list, &vlog_modules) {
+ LIST_FOR_EACH_CHECK (mp, list, &vlog_modules) {
mp->levels[facility] = level;
update_min_level(mp);
}
@@ -347,7 +347,7 @@ vlog_set_log_file(const char *file_name)
log_writer = async_append_create(new_log_fd);
}
- LIST_FOR_EACH (mp, list, &vlog_modules) {
+ LIST_FOR_EACH_CHECK (mp, list, &vlog_modules) {
update_min_level(mp);
}
ovs_mutex_unlock(&log_file_mutex);
Index: lib/list.h
===================================================================
--- lib/list.h.orig
+++ lib/list.h
@@ -79,5 +79,9 @@ bool list_is_short(const struct list *);
? ASSIGN_CONTAINER(NEXT, (ITER)->MEMBER.next, MEMBER), 1 \
: 0); \
(ITER) = (NEXT))
+#define LIST_FOR_EACH_CHECK(ITER, MEMBER, LIST) \
+ for (ASSIGN_CONTAINER(ITER, (LIST)->next, MEMBER); \
+ &(ITER)->MEMBER != (LIST) && (ITER)->MEMBER.next != (ITER)->MEMBER.prev; \
+ ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER))
#endif /* list.h */

View File

@ -1,35 +0,0 @@
diff -ruN openvswitch-1.7.0/datapath/brcompat_main.c openvswitch-1.7.0.new/datapath/brcompat_main.c
--- openvswitch-1.7.0/datapath/brcompat_main.c 2012-07-19 00:24:18.000000000 +0200
+++ openvswitch-1.7.0.new/datapath/brcompat_main.c 2012-07-31 13:51:47.319114805 +0200
@@ -327,6 +327,19 @@
return -ENOMEM;
}
+static int brc_set_bridge_forward_delay(struct net_device *dev,
+ unsigned long delay)
+{
+ printk("attempting to set bridge forward delay %u\n", delay);
+ return 0;
+}
+
+static int brc_stp_set_enabled(struct net_device *dev, unsigned long state)
+{
+ printk("attempting to set bridge STP to %u\n", state);
+ return 0;
+}
+
/* Legacy ioctl's through SIOCDEVPRIVATE. Called with rtnl_lock. */
static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
@@ -350,6 +363,11 @@
case BRCTL_GET_FDB_ENTRIES:
return brc_get_fdb_entries(dev, (void __user *)args[1],
args[2], args[3]);
+ case BRCTL_SET_BRIDGE_FORWARD_DELAY:
+ return brc_set_bridge_forward_delay(dev, args[1]);
+
+ case BRCTL_SET_BRIDGE_STP_STATE:
+ return brc_stp_set_enabled(dev, args[1]);
}
return -EOPNOTSUPP;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:825730db82c7b46a142f057a43345590c299e66704ef7a88d9ed4ffd0c3d6b64
size 2351740

3
openvswitch-2.1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:875429b052c4001815b6cb38616c7a6cb212df4bba74602164ee0a99b172079b
size 3076498

View File

@ -1,267 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2011 Nicira Networks Inc.
# Copyright (c) 2007, 2009 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.
#
# This is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License with
# the Debian operating system, in /usr/share/common-licenses/GPL; if
# not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
#
### BEGIN INIT INFO
# Provides: openvswitch-controller
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $named
# Should-Stop: $null
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Open vSwitch controller
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/ovs-controller # Introduce the server's location here
NAME=ovs-controller # Introduce the short server's name here
DESC=ovs-controller # Introduce a short description here
LOGDIR=/var/log/openvswitch # Log directory to use
PIDFILE=/var/run/openvswitch/$NAME.pid
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
# Default options, these can be overriden by the information
# at /etc/default/openvswitch-controller
DAEMON_OPTS="" # Additional options given to the server
DODTIME=10 # Time to wait for the server to die, in seconds
# If this value is set too low you might not
# let some servers to die gracefully and
# 'restart' will not work
LOGFILE=$LOGDIR/$NAME.log # Server logfile
#DAEMONUSER= # User to run the daemons as. If this value
# is set start-stop-daemon will chuid the server
# Include defaults if available
default=/etc/sysconfig/openvswitch-controller
if [ -f $default ] ; then
. $default
fi
# Check that the user exists (if we set a user)
# Does the user exist?
if [ -n "$DAEMONUSER" ] ; then
if getent passwd | grep -q "^$DAEMONUSER:"; then
# Obtain the uid and gid
DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
else
echo "The user $DAEMONUSER, required to run $NAME does not exist."
exit 1
fi
fi
set -e
running_pid() {
# Check if a given process pid's cmdline matches a given name
pid=$1
name=$2
[ -z "$pid" ] && return 1
[ ! -d /proc/$pid ] && return 1
cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
# Is this the expected server
[ "$cmd" != "$name" ] && return 1
return 0
}
running() {
# Check if the process is running looking at /proc
# (works for all users)
# No pidfile, probably no daemon present
[ ! -f "$PIDFILE" ] && return 1
pid=`cat $PIDFILE`
running_pid $pid $DAEMON || return 1
return 0
}
start_server() {
if [ -z "$LISTEN" ]; then
echo "$default: No connection methods configured, controller disabled" >&2
exit 0
fi
if [ ! -d /var/run/openvswitch ]; then
install -d -m 755 -o root -g root /var/run/openvswitch
fi
SSL_OPTS=
case $LISTEN in
*ssl*)
: ${PRIVKEY:=/etc/openvswitch-controller/privkey.pem}
: ${CERT:=/etc/openvswitch-controller/cert.pem}
: ${CACERT:=/etc/openvswitch-controller/cacert.pem}
if test ! -e "$PRIVKEY" || test ! -e "$CERT" ||
test ! -e "$CACERT"; then
if test ! -e "$PRIVKEY"; then
echo "$PRIVKEY: private key missing" >&2
fi
if test ! -e "$CERT"; then
echo "$CERT: certificate for private key missing" >&2
fi
if test ! -e "$CACERT"; then
echo "$CACERT: CA certificate missing" >&2
fi
exit 1
fi
SSL_OPTS="--private-key=$PRIVKEY --certificate=$CERT --ca-cert=$CACERT"
;;
esac
# Start the process using the wrapper
if [ -z "$DAEMONUSER" ] ; then
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- --detach --pidfile=$PIDFILE \
$LISTEN $DAEMON_OPTS $SSL_OPTS
errcode=$?
else
# if we are using a daemonuser then change the user id
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $DAEMONUSER --exec $DAEMON -- \
--detach --pidfile=$PIDFILE $LISTEN $DAEMON_OPTS \
$SSL_OPTS
errcode=$?
fi
return $errcode
}
stop_server() {
# Stop the process using the wrapper
if [ -z "$DAEMONUSER" ] ; then
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--exec $DAEMON
errcode=$?
else
# if we are using a daemonuser then look for process that match
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--user $DAEMONUSER --exec $DAEMON
errcode=$?
fi
return $errcode
}
reload_server() {
[ ! -f "$PIDFILE" ] && return 1
pid=`cat $PIDFILE` # This is the daemon's pid
# Send a SIGHUP
kill -1 $pid
return $?
}
force_stop() {
# Force the process to die killing it manually
[ ! -e "$PIDFILE" ] && return
if running ; then
kill -15 $pid
# Is it really dead?
sleep "$DODTIME"
if running ; then
kill -9 $pid
sleep "$DODTIME"
if running ; then
echo "Cannot kill $NAME (pid=$pid)!"
exit 1
fi
fi
fi
rm -f $PIDFILE
}
case "$1" in
start)
echo "Starting $DESC " "$NAME"
# Check if it's running first
if running ; then
echo "apparently already running"
exit 0
fi
if start_server && running ; then
# It's ok, the server started and is running
:
else
# Either we could not start it or it is not running
# after we did
# NOTE: Some servers might die some time after they start,
# this code does not try to detect this and might give
# a false positive (use 'status' for that)
:
fi
;;
stop)
echo "Stopping $DESC" "$NAME"
if running ; then
# Only stop the server if we see it running
stop_server
else
# If it's not running don't do anything
echo "apparently not running"
exit 0
fi
;;
force-stop)
# First try to stop gracefully the program
$0 stop
if running; then
# If it's still running try to kill it more forcefully
echo "Stopping (force) $DESC" "$NAME"
force_stop
fi
;;
restart|force-reload)
echo "Restarting $DESC" "$NAME"
stop_server
# Wait some sensible amount, some server need this
[ -n "$DODTIME" ] && sleep $DODTIME
start_server
running
;;
status)
echo "Checking status of $DESC" "$NAME"
if running ; then
echo "running"
else
echo "apparently not running"
exit 1
fi
;;
# Use this if the daemon cannot reload
reload)
echo "Reloading $NAME daemon: not implemented, as the daemon"
echo "cannot re-read the config file (use restart)."
;;
*)
N=/etc/init.d/openvswitch-controller
echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0

View File

@ -1,5 +0,0 @@
# This is a POSIX shell fragment -*- sh -*-
# listen arguments
#
LISTEN="ptcp:"

View File

@ -25,6 +25,9 @@
(test -x /usr/sbin/ovs-vswitchd && test -x /usr/sbin/ovsdb-server) || exit 0
. /etc/rc.status
rc_reset
. /usr/share/openvswitch/scripts/ovs-lib
test -e /etc/sysconfig/openvswitch-switch && . /etc/sysconfig/openvswitch-switch
@ -80,12 +83,26 @@ case $1 in
reload | force-reload)
# The OVS daemons keep up-to-date.
;;
try-restart|condrestart)
#restart the service if the service is already running
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
rc_status # Remember status and be quiet
;;
restart)
stop
start
;;
status)
ovs_ctl status
exit $?
;;
force-reload-kmod)
start force-reload-kmod
@ -94,7 +111,7 @@ case $1 in
load_kmod
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status|force-stop|force-reload-kmod|load-kmod}" >&2
echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status|force-stop|force-reload-kmod|load-kmod}" >&2
exit 1
;;
esac

View File

@ -1,17 +1,17 @@
/var/log/openvswitch/*.log {
daily
compress
create 640 root adm
create 640 root root
delaycompress
missingok
rotate 30
postrotate
# Tell Open vSwitch daemons to reopen their log files
if [ -e /var/run/openvswitch/ovs-vswitchd.pid ]; then
ovs-appctl --t ovs-vswitchd vlog/reopen
ovs-appctl --target ovs-vswitchd vlog/reopen
fi
if [ -e /var/run/openvswitch/ovsdb-server.pid ]; then
ovs-appctl --t ovsdb-server vlog/reopen
ovs-appctl --target ovsdb-server vlog/reopen
fi
endscript
}

78
openvswitch-vtep.init Normal file
View File

@ -0,0 +1,78 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: openvswitch-vtep
# Required-Start: $network $named $remote_fs $syslog
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Open vSwitch VTEP emulator
# Description: Initializes the Open vSwitch VTEP emulator
### END INIT INFO
# Include defaults if available
default=/etc/default/openvswitch-vtep
if [ -f $default ] ; then
. $default
fi
start () {
if [ "$ENABLE_OVS_VTEP" = "false" ]; then
exit 0
fi
update-rc.d -f openvswitch-switch remove >/dev/null 2>&1
/etc/init.d/openvswitch-switch stop
mkdir -p "/var/run/openvswitch"
if [ ! -e "/etc/openvswitch/conf.db" ]; then
ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema
fi
if [ ! -e "/etc/openvswitch/vtep.db" ]; then
ovsdb-tool create /etc/openvswitch/vtep.db /usr/share/openvswitch/vtep.ovsschema
fi
if [ ! -e "/etc/openvswitch/ovsclient-cert.pem" ]; then
export RANDFILE="/root/.rnd"
cd /etc/openvswitch && ovs-pki req ovsclient && ovs-pki self-sign ovsclient
fi
ovsdb-server --pidfile --detach --log-file --remote \
punix:/var/run/openvswitch/db.sock \
--remote=db:hardware_vtep,Global,managers \
--private-key=/etc/openvswitch/ovsclient-privkey.pem \
--certificate=/etc/openvswitch/ovsclient-cert.pem \
--bootstrap-ca-cert=/etc/openvswitch/vswitchd.cacert \
/etc/openvswitch/conf.db /etc/openvswitch/vtep.db
modprobe openvswitch
ovs-vswitchd --pidfile --detach --log-file \
unix:/var/run/openvswitch/db.sock
}
stop () {
/etc/init.d/openvswitch-switch stop
}
case $1 in
start)
start
;;
stop)
stop
;;
restart|force-reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -1,3 +1,221 @@
-------------------------------------------------------------------
Fri May 2 03:38:11 UTC 2014 - e.istomin@edss.ee
- updated to 2.1.2.
This contains bug fixes related to sending packet-in messages to the controller.
-------------------------------------------------------------------
Tue Apr 29 17:16:22 UTC 2014 - e.istomin@edss.ee
- updated to 2.1.1. This release removes the "ovsdbmonitor" program and contains bug fixes.
-------------------------------------------------------------------
Wed Apr 2 14:25:35 UTC 2014 - kmroz@suse.com
- Prevent ovsdb-server from entering an infinite loop when
processing logging levels during bringup.
added: log-check-module-loop.patch
-------------------------------------------------------------------
Thu Mar 27 12:56:32 UTC 2014 - dmueller@suse.com
- update to 2.1.0:
- Address prefix tracking support for flow tables. New columns
"prefixes" in OVS-DB table "Flow_Table" controls which packet
header fields are used for address prefix tracking. Prefix
tracking allows the classifier to skip rules with longer than
necessary prefixes, resulting in better wildcarding for datapath
flows. Default configuration is to not use any fields for prefix
tracking. However, if any flow tables contain both exact matches
and masked matches for IP address fields, OVS performance may be
increased by using this feature.
* As of now, the fields for which prefix lookup can be enabled
are: 'tun_id', 'tun_src', 'tun_dst', 'nw_src', 'nw_dst' (or
aliases 'ip_src' and 'ip_dst'), 'ipv6_src', and 'ipv6_dst'.
(Using this feature for 'tun_id' would only make sense if the
tunnel IDs have prefix structure similar to IP addresses.)
* There is a maximum number of fields that can be enabled for any
one flow table. Currently this limit is 3.
* Examples:
$ ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- \
--id=@N1 create Flow_Table name=table0
$ ovs-vsctl set Bridge br0 flow_tables:1=@N1 -- \
--id=@N1 create Flow_Table name=table1
$ ovs-vsctl set Flow_Table table0 prefixes=ip_dst,ip_src
$ ovs-vsctl set Flow_Table table1 prefixes=[]
- TCP flags matching: OVS now supports matching of TCP flags. This
has an adverse performance impact when using OVS userspace 1.10
or older (no megaflows support) together with the new OVS kernel
module. It is recommended that the kernel and userspace modules
both are upgraded at the same time.
- The default OpenFlow and OVSDB ports will change to
IANA-assigned numbers in a future release. Consider updating
your installations to specify port numbers instead of using the
defaults.
- OpenFlow:
* The OpenFlow 1.1+ "Write-Actions" instruction is now supported.
* OVS limits the OpenFlow port numbers it assigns to port 32767 and
below, leaving port numbers above that range free for assignment
by the controller.
* ovs-vswitchd now honors changes to the "ofport_request" column
in the Interface table by changing the port's OpenFlow port
number.
- ovs-vswitchd.conf.db.5 man page will contain graphviz/dot
diagram only if graphviz package was installed at the build time.
- Support for Linux kernels up to 3.11
- ovs-dpctl:
The "show" command also displays mega flow mask stats.
- ovs-ofctl:
* New command "ofp-parse-pcap" to dump OpenFlow from PCAP files.
- ovs-controller has been renamed test-controller. It is no longer
packaged or installed by default, because too many users assumed
incorrectly that ovs-controller was a necessary or desirable part
of an Open vSwitch deployment.
- Added vlog option to export to a UDP syslog sink.
- ovsdb-client:
* The "monitor" command can now monitor all tables in a database,
instead of being limited to a single table.
- The flow-eviction-threshold has been replaced by the flow-limit which is a
hard limit on the number of flows in the datapath. It defaults to 200,000
flows. OVS automatically adjusts this number depending on network
conditions.
-------------------------------------------------------------------
Thu Mar 27 12:55:44 UTC 2014 - dmueller@suse.com
- allow to use kmod as well
-------------------------------------------------------------------
Mon Feb 3 17:13:36 UTC 2014 - dmueller@suse.com
- another fix in logrotate
-------------------------------------------------------------------
Mon Jan 27 10:42:05 UTC 2014 - dmueller@suse.com
- fix logrotate configuration
-------------------------------------------------------------------
Tue Jan 21 08:48:03 UTC 2014 - dmueller@suse.com
- add openvswitch.service for systemd distros
-------------------------------------------------------------------
Tue Jan 14 15:03:56 UTC 2014 - dmueller@suse.com
- add kernel-312.diff (build against Kernel 3.12.x)
-------------------------------------------------------------------
Fri Jan 3 17:54:10 UTC 2014 - dmueller@suse.com
- do not build with valgrind-devel on aarch64 (doesn't exist)
-------------------------------------------------------------------
Thu Dec 5 13:14:11 UTC 2013 - dmueller@suse.com
- update to 2.0.0:
- The ovs-vswitchd process is no longer single-threaded. Multiple
threads are now used to handle flow set up and asynchronous
logging.
- OpenFlow:
* Experimental support for OpenFlow 1.1 (in addition to 1.2 and
1.3, which had experimental support in 1.10).
* New support for matching outer source and destination IP address
of tunneled packets, for tunnel ports configured with the newly
added "remote_ip=flow" and "local_ip=flow" options.
* Support for matching on metadata 'pkt_mark' for interacting with
other system components. On Linux this corresponds to the skb
mark.
* Support matching, rewriting SCTP ports
- The Interface table in the database has a new "ifindex" column to
report the interface's OS-assigned ifindex.
- New "check-oftest" Makefile target for running OFTest against Open
vSwitch. See README-OFTest for details.
- The flow eviction threshold has been moved to the Open_vSwitch table.
- Database names are now mandatory when specifying ovsdb-server options
through database paths (e.g. Private key option with the database name
should look like "--private-key=db:Open_vSwitch,SSL,private_key").
- Added ovs-dev.py, a utility script helpful for Open vSwitch developers.
- Support for Linux kernels up to 3.10
- ovs-ofctl:
* New "ofp-parse" for printing OpenFlow messages read from a file.
- Added configurable flow caching support to IPFIX exporter.
- Dropped support for Linux pre-2.6.32.
- Log file timestamps and ovsdb commit timestamps are now reported
with millisecond resolution. (Previous versions only reported
whole seconds.)
-------------------------------------------------------------------
Wed Dec 4 11:44:02 CET 2013 - jsuchome@suse.cz
- added try-restart action to openvswitch-switch init script
(bnc#849222)
-------------------------------------------------------------------
Wed Nov 20 02:51:57 UTC 2013 - kmroz@suse.com
- Incorporate ubuntu Linux 3.11 fix to prevent kernel datapath panics.
Addresses bnc#851395
+ added datapath-add-support-for-linux-3.11.patch
-------------------------------------------------------------------
Tue Oct 1 07:21:16 UTC 2013 - speilicke@suse.com
- Let openvswitch-switch depend on util-linux instead of uuid-runtime
(Debian package name). The ovs-ctl / ovs-pki tools use /usr/bin/uuidgen
-------------------------------------------------------------------
Tue Sep 24 13:17:25 UTC 2013 - bwiedemann@suse.com
- add vlan_apichange.patch to compensate kernel API changes
between 3.8 and 3.11 in commits f646968f and 86a9bad3
-------------------------------------------------------------------
Fri Sep 13 15:25:40 UTC 2013 - dmueller@suse.com
- update to 1.11.0:
* http://openvswitch.org/releases/NEWS-1.11.0
- remove accept-newer-kernel-versions.diff
-------------------------------------------------------------------
Fri Sep 13 10:09:18 UTC 2013 - dmueller@suse.com
- sign modules for secure boot (bnc#839838)
-------------------------------------------------------------------
Tue Jul 2 17:08:11 UTC 2013 - tpaszkowski@novell.com
- Build openvswitch kernel module for xen kernel flavor.
-------------------------------------------------------------------
Sun Jun 16 05:30:24 UTC 2013 - vuntz@suse.com
- Add openvswitch-ipsec.init, Module.supported,
Module.supported.updates and README.packager as sources: they
were not listed as such.
- Install openvswitch-ipsec.init if we build ipsec support.
-------------------------------------------------------------------
Thu Jun 6 14:28:07 UTC 2013 - tpaszkowski@novell.com
- mark openvswitch module shipped with package as supported
-------------------------------------------------------------------
Fri May 17 11:58:32 UTC 2013 - dmueller@suse.com
- only call boot.sh for newer distros
- build parallel
- accept-newer-kernel-versions.diff:
Accept newer kernel versions
- sle11-device-ops-backport.diff
Handle sle11 device ops backport
-------------------------------------------------------------------
Fri May 3 14:28:00 UTC 2013 - e.istomin@edss.ee
- New upstream version 1.10.0
http://openvswitch.org/releases/NEWS-1.10.0
- Removed openvswitch-1.7.0-stp-fwd-delay.patch because of bridge compatibility support removing
-------------------------------------------------------------------
Wed Apr 3 09:30:20 UTC 2013 - tpaszkowski@novell.com

12
openvswitch.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Open vSwitch
After=syslog.target network.target
[Service]
Type=oneshot
ExecStart=/etc/init.d/openvswitch-switch start
ExecStop=/etc/init.d/openvswitch-switch stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@ -1,5 +1,7 @@
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# spec file for package openvswitch
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -14,7 +16,8 @@
#
# Enable KMP building by default:
# needssslcertforbuild
%bcond_without kmp
# Don't build in-kernel module, the shipped one is more feature rich:
%bcond_with kernel_kmp
@ -24,24 +27,29 @@
%bcond_with gui
Name: openvswitch
Version: 1.9.0
Release: 0
License: Apache-2.0
Version: 2.1.2
Release: 0.<RELEASE13>
Summary: An open source, production quality, multilayer virtual switch
Url: http://openswitch.org/
License: Apache-2.0
Group: Productivity/Networking/System
Url: http://openswitch.org/
Source0: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
Source1: preamble
Source2: openvswitch-switch.init
Source3: openvswitch-switch.template
Source4: openvswitch-switch.logrotate
Source5: openvswitch-controller.init
Source6: openvswitch-controller.sysconfig
# brcompat is going to be deprecated soon
# PATCH-FEATURE-UPSTREAM openvswitch-1.7.0-stp-fwd-delay.patch -- Set STP bridge forward delay
Patch1: %{name}-1.7.0-stp-fwd-delay.patch
Source5: openvswitch-vtep.init
Source7: openvswitch-ipsec.init
Source8: openvswitch.service
Source10: Module.supported
Source11: Module.supported.updates
Source99: README.packager
Patch0: sle11-device-ops-backport.diff
Patch1: datapath-Add-support-for-Linux-3.12.patch
Patch2: log-check-module-loop.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: graphviz
@ -52,13 +60,17 @@ BuildRequires: openssl
BuildRequires: perl
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: python-xml
%ifnarch aarch64
BuildRequires: valgrind-devel
BuildRequires: fdupes
%endif
Requires: logrotate
Requires: openssl
Requires: python
Provides: openvswitch-common = %{version}
Obsoletes: openvswitch-common < %{version}
Provides: openvswitch-controller = %{version}
Obsoletes: openvswitch-controller < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%py_requires
@ -71,22 +83,35 @@ it is designed to support distribution across multiple physical servers similar
VMwares vNetwork distributed vswitch or Ciscos Nexus 1000V.
%if %{with kmp}
%package kmp
Summary: Open vSwitch kernel modules
License: GPL-2.0+
Group: System/Kernel
BuildRequires: %kernel_module_package_buildreqs
%if %{with kernel_kmp}
BuildRequires: kernel-source
%endif
%suse_kernel_module_package -p %_sourcedir/preamble ec2 xen xenpae vmi um
%suse_kernel_module_package -p %_sourcedir/preamble ec2 xenpae vmi um
%description -n %{name}-kmp
Kernel modules supporting the openvswitch datapath
%endif
%package devel
Summary: Open vSwitch Devel Libraries
License: Apache-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
%description devel
Devel files for Open vSwitch
%if %{with ipsec}
%package ipsec
Summary: Open vSwitch GRE-over-IPsec support
License: Apache-2.0
Group: Productivity/Networking/System
Requires: %{name} = %{version}
Requires: %{name}-switch = %{version}
@ -105,16 +130,22 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%package switch
Summary: Open vSwitch switch implementations
License: Apache-2.0
Group: Productivity/Networking/System
Requires(pre): %fillup_prereq
Requires(pre): %insserv_prereq
Requires: module-init-tools
Requires: modutils
Requires: openvswitch = %{version}
Requires: procps
Requires: python
Requires: uuid-runtime
# ovs-ctl / ovs-pki use /usr/bin/uuidgen:
Requires: util-linux
Suggests: openvswitch-kmp
Suggests: logrotate
Suggests: logrotate
%if 0%{?suse_version} > 1230
%{?systemd_requires}
%endif
%description switch
openvswitch-switch provides the userspace components and utilities for
the Open vSwitch kernel-based switch.
@ -123,6 +154,7 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%package pki
Summary: Open vSwitch public key infrastructure dependency package
License: Apache-2.0
Group: Productivity/Networking/System
Requires: openvswitch = %{version}
@ -133,19 +165,22 @@ man-in-the-middle attacks on the Open vSwitch network infrastructure.
Open vSwitch is a full-featured software-based Ethernet switch.
%package controller
Summary: Open vSwitch controller implementation
%package vtep
Summary: Open vSwitch VTEP emulator
License: Apache-2.0
Group: Productivity/Networking/System
Requires: openvswitch = %{version}
# Since openvswitch/scripts/ovs-vtep requires various ovs python modules.
Requires: python-openvswitch = %{version}
%description controller
The Open vSwitch controller enables OpenFlow switches that connect to it
to act as MAC-learning Ethernet switches.
%description vtep
A VTEP emulator that uses Open vSwitch for forwarding.
Open vSwitch is a full-featured software-based Ethernet switch.
%package brcompat
Summary: Open vSwitch bridge compatibility support (deprecated)
License: Apache-2.0
Group: Productivity/Networking/System
Requires: openvswitch-switch = %{version}
Recommends: bridge-utils
@ -164,6 +199,7 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%package -n python-openvswitch
Summary: Python bindings for Open vSwitch
License: Python-2.0
Group: Productivity/Networking/System
Requires: python
@ -172,6 +208,7 @@ This package contains the full Python bindings for Open vSwitch database.
%package -n python-openvswitch-test
Summary: Python bindings for Open vSwitch
License: Python-2.0
Group: Productivity/Networking/System
Requires: python
@ -179,8 +216,10 @@ Requires: python
This package contains the full Python bindings for Open vSwitch database.
%if %{with gui}
%package ovsdbmonitor
Summary: Open vSwitch graphical monitoring tool
License: Apache-2.0
Group: Productivity/Networking/System
BuildRequires: python-pyside
BuildRequires: python-qt4-devel
@ -205,6 +244,7 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%package test
Summary: Open vSwitch test package
License: Apache-2.0
Group: Productivity/Networking/System
Requires: python
Requires: python-argparse
@ -219,7 +259,9 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%prep
%setup -q
#%patch0
%patch1 -p1
%patch2 -p0
set -- *
mkdir source
@ -228,8 +270,8 @@ mkdir obj
%build
pushd source
# don't call boot.sh, we don't have appropriate autoconf there
%if ! 0%{?sles_version}
# only call boot.sh for distros with autoconf >= 2.64
%if 0%{?suse_version} > 1110
bash -x boot.sh
%endif
popd
@ -237,24 +279,25 @@ popd
%if %{with kernel_kmp}
for flavor in %flavors_to_build; do
mkdir -p $flavor
cp -a $RPM_SOURCE_DIR/Module.supported $flavor/
cp -a %{SOURCE10} $flavor/
krel=$(make -s -C /usr/src/linux-obj/%_target_cpu/$flavor kernelrelease)
kernel_source_dir=$(readlink /lib/modules/$krel/source)
cp -a $kernel_source_dir/net/openvswitch/* $flavor/
make -C %{kernel_source $flavor} modules M=$PWD/$flavor
make %{?_smp_mflags} -C %{kernel_source $flavor} modules M=$PWD/$flavor
done
%else
export EXTRA_CFLAGS='-DVERSION=\"%{version}\"'
for flavor in %flavors_to_build; do
rm -rf obj/$flavor
cp -r source obj/$flavor
cp -a %{SOURCE11} obj/$flavor/datapath/linux/Module.supported
pushd obj/$flavor
%configure \
--with-logdir=/var/log \
--with-logdir=/var/log/openvswitch \
--with-linux=/usr/src/linux-obj/%_target_cpu/$flavor \
--with-linux-source=/usr/src/linux
cd datapath/linux
make
make %{?_smp_mflags}
popd
done
%endif
@ -262,14 +305,18 @@ done
ls source
pushd source
%configure \
--with-logdir=/var/log
--disable-static \
--enable-shared \
--with-logdir=/var/log/openvswitch
make %{?_smp_mflags}
popd
%install
%if %{with kmp}
export NO_BRP_STALE_LINK_ERROR=yes
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
export BRP_PESIGN_FILES="*.ko /lib/firmware"
for flavor in %flavors_to_build; do
%if %{with kernel_kmp}
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor
@ -288,15 +335,17 @@ install -d -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
install -m 644 %{SOURCE3} \
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}-switch
install -m 644 %{SOURCE6} \
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}-controller
install -m 755 %{SOURCE2} \
%{buildroot}/%{_sysconfdir}/init.d/%{name}-switch
ln -s %{_sysconfdir}/init.d/%{name}-switch %{buildroot}%{_sbindir}/rc%{name}-switch
install -m 755 %{SOURCE5} \
%{buildroot}/%{_sysconfdir}/init.d/%{name}-controller
ln -s %{_sysconfdir}/init.d/%{name}-controller %{buildroot}%{_sbindir}/rc%{name}-controller
%{buildroot}/%{_sysconfdir}/init.d/%{name}-vtep
ln -s %{_sysconfdir}/init.d/%{name}-vtep %{buildroot}%{_sbindir}/rc%{name}-vtep
%if 0%{?suse_version} > 1230
install -D -m 644 %{SOURCE8} \
%{buildroot}%{_unitdir}/openvswitch.service
%endif
install -d -m 755 %{buildroot}/%{_sysconfdir}/sysconfig
install -d -m 755 %{buildroot}/%{_sysconfdir}/logrotate.d
@ -309,9 +358,13 @@ install -d -m 755 %{buildroot}/%{_sysconfdir}/profile.d
install -d -m 755 %{buildroot}/%{_datadir}/%{name}/scripts
install -m 644 vswitchd/vswitch.ovsschema \
%{buildroot}/%{_datadir}/%{name}/vswitch.ovsschema
%if %{with ipsec}
install -m 755 debian/ovs-monitor-ipsec \
%{buildroot}/%{_datadir}/%{name}/ovs-monitor-ipsec
install -m 755 %{SOURCE7} \
%{buildroot}/%{_sysconfdir}/init.d/%{name}-ipsec
ln -s %{_sysconfdir}/init.d/%{name}-ipsec %{buildroot}%{_sbindir}/rc%{name}-ipsec
%endif
popd
@ -322,28 +375,30 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%fdupes %{buildroot}%{py_sitedir}
%pre switch
%if 0%{?suse_version} > 1230
%service_add_pre openvswitch.service
%endif
%post switch
%{fillup_and_insserv openvswitch-switch}
%{fillup_only -n openvswitch-switch}
%if 0%{?suse_version} > 1230
%service_add_post openvswitch.service
%endif
%preun switch
%stop_on_removal openvswitch-switch
%if 0%{?suse_version} > 1230
%service_del_preun openvswitch.service
%endif
%postun switch
%restart_on_update openvswitch-switch
%if 0%{?suse_version} > 1230
%service_del_postun openvswitch.service
%endif
%insserv_cleanup
%preun controller
%stop_on_removal openvswitch-controller
%postun controller
%restart_on_update openvswitch-controller
%insserv_cleanup
%files brcompat
%defattr(-,root,root)
%{_sbindir}/ovs-brcompatd
%{_mandir}/man8/ovs-brcompatd.8.gz
%files
%defattr(-,root,root)
%dir %{_datadir}/openvswitch
@ -354,9 +409,9 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%{_bindir}/ovs-appctl
%{_bindir}/ovs-benchmark
%{_bindir}/ovs-ofctl
%{_bindir}/ovs-parse-leaks
%{_bindir}/ovsdb-client
%{_bindir}/ovs-parse-backtrace
%{_bindir}/ovs-dpctl-top
%{_sbindir}/ovs-bugtool
%{_sbindir}/ovs-vlan-bug-workaround
%dir %{_datadir}/openvswitch/scripts
@ -370,28 +425,29 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%{_datadir}/openvswitch/scripts/ovs-bugtool-daemons-ver
%{_datadir}/openvswitch/scripts/ovs-bugtool-vsctl-show
%{_datadir}/openvswitch/scripts/ovs-bugtool-memory-show
%{_datadir}/openvswitch/scripts/ovs-bugtool-ovs-ofctl-dump-flows
%{_datadir}/openvswitch/scripts/ovs-bugtool-ovs-appctl-dpif
%{_datadir}/openvswitch/scripts/ovs-bugtool-ovs-ofctl-show
%{_datadir}/openvswitch/scripts/ovs-bugtool-bfd-show
%{_datadir}/openvswitch/scripts/ovs-bugtool-list-dbs
%{_libdir}/libofproto-%{version}.so
%{_libdir}/libopenvswitch-%{version}.so
%{_libdir}/libovsdb-%{version}.so
%{_libdir}/libsflow-%{version}.so
%{_mandir}/man1/ovs-benchmark.1.gz
%{_mandir}/man1/ovsdb-client.1.gz
%{_mandir}/man8/ovs-appctl.8.gz
%{_mandir}/man8/ovs-bugtool.8.gz
%{_mandir}/man8/ovs-ofctl.8.gz
%{_mandir}/man8/ovs-parse-leaks.8.gz
%{_mandir}/man8/ovs-vlan-bug-workaround.8.gz
%{_mandir}/man8/ovs-parse-backtrace.8.gz
%{_mandir}/man8/ovs-dpctl-top.8.gz
%files pki
%defattr(-,root,root)
%{_mandir}/man8/ovs-pki.8.gz
%{_bindir}/ovs-pki
%files controller
%defattr(-,root,root)
%{_bindir}/ovs-controller
%{_sysconfdir}/init.d/openvswitch-controller
%{_sbindir}/rc%{name}-controller
%{_mandir}/man8/ovs-controller.8.gz
%{_localstatedir}/adm/fillup-templates/sysconfig.openvswitch-controller
%files -n python-openvswitch
%defattr(-,root,root)
%{py_sitedir}/ovs/
@ -400,10 +456,23 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%defattr(-,root,root)
%{py_sitedir}/ovstest/
%files vtep
%defattr(-,root,root)
%{_bindir}/vtep-ctl
%{_sysconfdir}/init.d/openvswitch-vtep
%{_sbindir}/rc%{name}-vtep
%{_mandir}/man5/vtep.5.gz
%{_mandir}/man8/vtep-ctl.8.gz
%{_datadir}/openvswitch/scripts/ovs-vtep
%{_datadir}/openvswitch/vtep.ovsschema
%if %{with ipsec}
%files ipsec
%defattr(-,root,root)
%{_datadir}/openvswitch/ovs-monitor-ipsec
%{_sysconfdir}/init.d/openvswitch-ipsec
%{_sbindir}/rc%{name}-ipsec
%endif
%files switch
@ -433,6 +502,9 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%{_mandir}/man1/ovsdb-server.1.gz
%{_mandir}/man5/ovs-vswitchd.conf.db.5.gz
%{_mandir}/man8/ovs-ctl.8.gz
%if 0%{?suse_version} > 1230
%{_unitdir}/openvswitch.service
%endif
%dir /var/log/openvswitch
%files test
@ -444,7 +516,19 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%{_mandir}/man8/ovs-l3ping.8.gz
%{_mandir}/man8/ovs-vlan-test.8.gz
%files devel
%defattr(-,root,root)
%{_libdir}/libofproto.so
%{_libdir}/libofproto.la
%{_libdir}/libopenvswitch.so
%{_libdir}/libopenvswitch.la
%{_libdir}/libovsdb.so
%{_libdir}/libovsdb.la
%{_libdir}/libsflow.so
%{_libdir}/libsflow.la
%if %{with gui}
%files ovsdbmonitor
%defattr(-,root,root)
%{_bindir}/ovsdbmonitor

View File

@ -0,0 +1,11 @@
--- datapath/vport-internal_dev.c
+++ datapath/vport-internal_dev.c
@@ -34,7 +34,7 @@
#include "vport-internal_dev.h"
#include "vport-netdev.h"
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
#define HAVE_NET_DEVICE_OPS
#endif