]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath: Add support for kernel 4.16.x & 4.17.x
authorYifeng Sun <pkusunyifeng@gmail.com>
Tue, 21 Aug 2018 14:42:08 +0000 (07:42 -0700)
committerBen Pfaff <blp@ovn.org>
Fri, 24 Aug 2018 17:54:00 +0000 (10:54 -0700)
Add support for kernel version up to 4.17.x. On Travis, build passed
for all kernel versions. And no new test fails are introduced by this
patch.

Cleaned up file datapath/linux/compat/include/net/ip6_fib.h which
has no effect to kernel module but brings complexity to porting.

Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
.travis.yml
Documentation/faq/releases.rst
NEWS
acinclude.m4
datapath/linux/Modules.mk
datapath/linux/compat/include/net/dst_metadata.h
datapath/linux/compat/include/net/ip6_fib.h [deleted file]

index 998b33d9e792f96422010e6876ec6321be88cf99..21447b5435b202923a0372e7f68554988101ded0 100644 (file)
@@ -35,6 +35,8 @@ env:
   - BUILD_ENV="-m32" OPTS="--disable-ssl"
   - KERNEL=3.16.54 DPDK=1
   - KERNEL=3.16.54 DPDK=1 OPTS="--enable-shared"
+  - KERNEL=4.17.14
+  - KERNEL=4.16.18
   - KERNEL=4.15.18
   - KERNEL=4.14.63
   - KERNEL=4.9.120
index e64fa22c40343d56993e7b2ba35d886a6d8b86f5..41d41e3fcaae1dbca07f151eea83b6b96313f5d6 100644 (file)
@@ -67,7 +67,7 @@ Q: What Linux kernel versions does each Open vSwitch release work with?
     2.7.x        3.10 to 4.9
     2.8.x        3.10 to 4.12
     2.9.x        3.10 to 4.13
-    2.10.x       3.10 to 4.15
+    2.10.x       3.10 to 4.17
     ============ ==============
 
     Open vSwitch userspace should also work with the Linux kernel module built
diff --git a/NEWS b/NEWS
index 8077c9e8a4acf0791e52bee0b353ca0d727d8b01..33b4d8a2368f3efa4fbaf0ccf3fa5b398f330917 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 Post-v2.10.0
 ---------------------
+   - Linux datapath:
+     * Support for the kernel versions 4.16.x and 4.17.x.
    - The environment variable OVS_SYSLOG_METHOD, if set, is now used
      as the default syslog method.
    - The environment variable OVS_CTL_TIMEOUT, if set, is now used
index a6a0e9ad7efd19874c81e36c9855c4265517beb2..ab141bd70158129a93cbf7db4a4f871eb5776957 100644 (file)
@@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
     AC_MSG_RESULT([$kversion])
 
     if test "$version" -ge 4; then
-       if test "$version" = 4 && test "$patchlevel" -le 15; then
+       if test "$version" = 4 && test "$patchlevel" -le 17; then
           : # Linux 4.x
        else
-          AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.15.x is not supported (please refer to the FAQ for advice)])
+          AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.17.x is not supported (please refer to the FAQ for advice)])
        fi
     elif test "$version" = 3 && test "$patchlevel" -ge 10; then
        : # Linux 3.x
@@ -803,8 +803,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
                   [OVS_DEFINE(HAVE_NF_CONNTRACK_HELPER_PUT)])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h],[[[[:space:]]]SKB_GSO_UDP[[[:space:]]]],
                   [OVS_DEFINE([HAVE_SKB_GSO_UDP])])
-  OVS_GREP_IFELSE([$KSRC/include/net/dst.h],[DST_NOCACHE],
-                  [OVS_DEFINE([HAVE_DST_NOCACHE])])
   OVS_FIND_FIELD_IFELSE([$KSRC/include/net/rtnetlink.h], [rtnl_link_ops],
                         [extack],
                   [OVS_DEFINE([HAVE_EXT_ACK_IN_RTNL_LINKOPS])])
index 2fec6500e7c8e5cd13d0da785df29dbea09ed149..b06ca15a3a03697bfeed73e2cea849e05d5532f5 100644 (file)
@@ -82,7 +82,6 @@ openvswitch_headers += \
        linux/compat/include/net/inetpeer.h \
        linux/compat/include/net/ip.h \
        linux/compat/include/net/ip_tunnels.h \
-       linux/compat/include/net/ip6_fib.h \
        linux/compat/include/net/ip6_route.h \
        linux/compat/include/net/ip6_tunnel.h \
        linux/compat/include/net/ipv6.h \
index e53a29ed22227c505a210a8a76b2a6f930613cd8..36f3f390dbe980e1535e6e2c89ab73b18a261666 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef __NET_DST_METADATA_WRAPPER_H
 #define __NET_DST_METADATA_WRAPPER_H 1
 
-enum metadata_type {
-       METADATA_IP_TUNNEL,
-       METADATA_HW_PORT_MUX,
-};
-
 #ifdef USE_UPSTREAM_TUNNEL
 #include_next <net/dst_metadata.h>
 #else
@@ -16,6 +11,11 @@ enum metadata_type {
 #include <net/ipv6.h>
 #include <net/ip_tunnels.h>
 
+enum metadata_type {
+       METADATA_IP_TUNNEL,
+       METADATA_HW_PORT_MUX,
+};
+
 struct hw_port_info {
        struct net_device *lower_dev;
        u32 port_id;
@@ -119,7 +119,11 @@ void ovs_ip_tunnel_rcv(struct net_device *dev, struct sk_buff *skb,
 static inline struct metadata_dst *
 rpl_metadata_dst_alloc(u8 optslen, enum metadata_type type, gfp_t flags)
 {
+#if defined(HAVE_METADATA_DST_ALLOC_WITH_METADATA_TYPE) && defined(USE_UPSTREAM_TUNNEL)
+       return metadata_dst_alloc(optslen, type, flags);
+#else
        return metadata_dst_alloc(optslen, flags);
+#endif
 }
 #define metadata_dst_alloc rpl_metadata_dst_alloc
 
diff --git a/datapath/linux/compat/include/net/ip6_fib.h b/datapath/linux/compat/include/net/ip6_fib.h
deleted file mode 100644 (file)
index 4d58375..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *      Linux INET6 implementation
- *
- *      Authors:
- *      Pedro Roque             <roque@di.fc.ul.pt>
- *
- *      This program is free software; you can 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 of the License, or (at your option) any later version.
- */
-
-#ifndef _IP6_FIB_WRAPPER_H
-#define _IP6_FIB_WRAPPER_H
-
-#include_next <net/ip6_fib.h>
-
-#ifndef RTF_PCPU
-#define RTF_PCPU        0x40000000
-#endif
-
-#ifndef RTF_LOCAL
-#define RTF_LOCAL       0x80000000
-#endif
-
-#define rt6_get_cookie rpl_rt6_get_cookie
-static inline u32 rt6_get_cookie(const struct rt6_info *rt)
-{
-       if (rt->rt6i_flags & RTF_PCPU ||
-#ifdef HAVE_DST_NOCACHE
-           (unlikely(rt->dst.flags & DST_NOCACHE) && rt->dst.from))
-#else
-           (unlikely(!list_empty(&rt->rt6i_uncached)) && rt->dst.from))
-#endif
-               rt = (struct rt6_info *)(rt->dst.from);
-
-       return rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
-}
-
-#endif