Dominique Leuenberger 2015-01-06 08:06:59 +00:00 committed by Git OBS Bridge
commit 32c6f8890e
6 changed files with 51 additions and 265 deletions

View File

@ -1,235 +0,0 @@
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

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43a2562fe5e8e48e997bfdb04691ffaaaefe73069b5699654538bf2f16ebfb1a
size 3080126

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21174901c311d54703b4a7f498be0c42e5d2cc68bdecb0090dbb555e2af4bcd2
size 3266916

View File

@ -1,3 +1,48 @@
-------------------------------------------------------------------
Sun Dec 28 21:27:49 UTC 2014 - andrea@opensuse.org
- new upstream version 2.3.1
- Compatibility with autoconf 2.63 (previously >=2.64)
- ovs-pki: Changed message digest algorithm from MD5 to SHA-1 because
MD5 is no longer secure and some operating systems have started to disable
it in OpenSSL.
- Keep active bond slave selection across OVS restart.
* v2.3.0 - 14 Aug 2014
- OpenFlow 1.1, 1.2, and 1.3 are now enabled by default in
ovs-vswitchd.
- Linux kernel datapath now has an exact match cache optimizing the
flow matching process.
- Datapath flows now have partially wildcarded tranport port field
matches. This reduces userspace upcalls, but increases the
number of different masks in the datapath. The kernel datapath
exact match cache removes the overhead of matching the incoming
packets with the larger number of masks, but when paired with an
older kernel module, some workloads may perform worse with the
new userspace.
* v2.2.0 - Internal Release
- Internal ports are no longer brought up by default, because it
should be an administrator task to bring up devices as they are
configured properly.
- ovs-vsctl now reports when ovs-vswitchd fails to create a new port or
bridge.
- The "ovsdbmonitor" graphical tool has been removed, because it was
poorly maintained and not widely used.
- New "check-ryu" Makefile target for running Ryu tests for OpenFlow
controllers against Open vSwitch. See INSTALL for details.
- Added IPFIX support for SCTP flows and templates for ICMPv4/v6 flows.
- Upon the receipt of a SIGHUP signal, ovs-vswitchd no longer reopens its
log file (it will terminate instead). Please use 'ovs-appctl vlog/reopen'
instead.
- Support for Linux kernels up to 3.14. From Kernel 3.12 onwards OVS uses
tunnel API for GRE and VXLAN.
- Added experimental DPDK support.
- Added support for custom vlog patterns in Python
- removed datapath-Add-support-for-Linux-3.12.patch no more required
- removed sle11-device-ops-backport.diff , not used before
-------------------------------------------------------------------
Tue Oct 21 11:24:25 UTC 2014 - dmueller@suse.com

View File

@ -18,22 +18,13 @@
# needssslcertforbuild
%if %suse_version > 1315
# The shipped one does not build against newer kernel versions
%bcond_with kmp
%bcond_without kernel_kmp
%else
%bcond_without kmp
%bcond_with kernel_kmp
%endif
# IpSec build disabled temporarily (need to upgrade ipsec-tools):
%bcond_with ipsec
# Disable GUI building by default (heavy Qt4 dependencies):
%bcond_with gui
Name: openvswitch
Version: 2.1.3
Version: 2.3.1
Release: 0
Summary: An open source, production quality, multilayer virtual switch
License: Apache-2.0
@ -50,8 +41,6 @@ Source7: 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
@ -265,8 +254,6 @@ Open vSwitch is a full-featured software-based Ethernet switch.
%prep
%setup -q
#%patch0
%patch1 -p1
%patch2 -p0
set -- *
@ -416,8 +403,8 @@ rmdir %{buildroot}%{_datadir}/%{name}/python
%dir %{_datadir}/openvswitch
%doc source/AUTHORS source/DESIGN source/INSTALL.* source/NOTICE
%doc source/REPORTING-BUGS source/PORTING
%doc source/SubmittingPatches source/CodingStyle source/README
%doc source/WHY-OVS source/COPYING source/README-gcov
%doc source/CodingStyle source/README
%doc source/WHY-OVS source/COPYING
%{_bindir}/ovs-appctl
%{_bindir}/ovs-benchmark
%{_bindir}/ovs-ofctl

View File

@ -1,11 +0,0 @@
--- 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