summaryrefslogtreecommitdiff
path: root/datapath
diff options
context:
space:
mode:
Diffstat (limited to 'datapath')
-rw-r--r--datapath/linux/Modules.mk1
-rw-r--r--datapath/linux/compat/include/net/dst_metadata.h14
-rw-r--r--datapath/linux/compat/include/net/ip6_fib.h40
3 files changed, 9 insertions, 46 deletions
diff --git a/datapath/linux/Modules.mk b/datapath/linux/Modules.mk
index 2fec6500e..b06ca15a3 100644
--- a/datapath/linux/Modules.mk
+++ b/datapath/linux/Modules.mk
@@ -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 \
diff --git a/datapath/linux/compat/include/net/dst_metadata.h b/datapath/linux/compat/include/net/dst_metadata.h
index e53a29ed2..36f3f390d 100644
--- a/datapath/linux/compat/include/net/dst_metadata.h
+++ b/datapath/linux/compat/include/net/dst_metadata.h
@@ -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
index 4d5837595..000000000
--- a/datapath/linux/compat/include/net/ip6_fib.h
+++ /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