[ovs-dev] [PATCH v4 09/28] datapath: compat: rename HAVE_METADATA_DST to USE_UPSTREAM_TUNNEL
Pravin B Shelar
pshelar at ovn.org
Fri Jul 8 00:23:15 UTC 2016
To better represent the meaning of symbol.
Signed-off-by: Pravin B Shelar <pshelar at ovn.org>
Acked-by: Jesse Gross <jesse at kernel.org>
---
acinclude.m4 | 2 +-
datapath/linux/compat/geneve.c | 2 +-
datapath/linux/compat/gre.c | 4 ++--
datapath/linux/compat/gso.h | 4 ++--
datapath/linux/compat/include/net/dst_metadata.h | 2 +-
datapath/linux/compat/include/net/geneve.h | 2 +-
datapath/linux/compat/include/net/gre.h | 4 ++--
datapath/linux/compat/include/net/ip_tunnels.h | 6 +++---
datapath/linux/compat/include/net/udp_tunnel.h | 2 +-
datapath/linux/compat/include/net/vxlan.h | 2 +-
datapath/linux/compat/ip_gre.c | 2 +-
datapath/linux/compat/ip_tunnel.c | 2 +-
datapath/linux/compat/ip_tunnels_core.c | 2 +-
datapath/linux/compat/lisp.c | 8 ++++----
datapath/linux/compat/stt.c | 6 +++---
datapath/linux/compat/udp_tunnel.c | 2 +-
datapath/linux/compat/vxlan.c | 2 +-
datapath/vport-netdev.c | 2 +-
18 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index a596266..4bb65c7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -436,7 +436,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
[label],
[OVS_GREP_IFELSE([$KSRC/include/net/ip_tunnels.h],
[iptunnel_pull_offloads],
- [OVS_DEFINE([HAVE_METADATA_DST])])])
+ [OVS_DEFINE([USE_UPSTREAM_TUNNEL])])])
OVS_GREP_IFELSE([$KSRC/include/linux/net.h], [sock_create_kern.*net],
[OVS_DEFINE([HAVE_SOCK_CREATE_KERN_NET])])
diff --git a/datapath/linux/compat/geneve.c b/datapath/linux/compat/geneve.c
index 4559700..d8e9d57 100644
--- a/datapath/linux/compat/geneve.c
+++ b/datapath/linux/compat/geneve.c
@@ -29,7 +29,7 @@
#include "vport-netdev.h"
#include "compat.h"
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#define GENEVE_NETDEV_VER "0.6"
#define GENEVE_UDP_PORT 6081
diff --git a/datapath/linux/compat/gre.c b/datapath/linux/compat/gre.c
index bb49c8c..a341fa3 100644
--- a/datapath/linux/compat/gre.c
+++ b/datapath/linux/compat/gre.c
@@ -38,7 +38,7 @@
#include "gso.h"
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#if IS_ENABLED(CONFIG_NET_IPGRE_DEMUX)
#ifndef HAVE_GRE_HANDLE_OFFLOADS
@@ -310,4 +310,4 @@ EXPORT_SYMBOL_GPL(rpl_gre_cisco_unregister);
#endif
#endif /* CONFIG_NET_IPGRE_DEMUX */
-#endif /* HAVE_METADATA_DST */
+#endif /* USE_UPSTREAM_TUNNEL */
diff --git a/datapath/linux/compat/gso.h b/datapath/linux/compat/gso.h
index 0f2b09a..0e95970 100644
--- a/datapath/linux/compat/gso.h
+++ b/datapath/linux/compat/gso.h
@@ -8,7 +8,7 @@ typedef void (*gso_fix_segment_t)(struct sk_buff *);
struct ovs_gso_cb {
struct ovs_skb_cb dp_cb;
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
struct metadata_dst *tun_dst;
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
@@ -158,7 +158,7 @@ static inline void skb_reset_inner_headers(struct sk_buff *skb)
}
#endif /* 3.18 */
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
/* We need two separate functions to manage different dst in this case.
* First is dst_entry and second is tunnel-dst.
* So define ovs_* separate functions for tun_dst.
diff --git a/datapath/linux/compat/include/net/dst_metadata.h b/datapath/linux/compat/include/net/dst_metadata.h
index 538a7c9..d5a3f4d 100644
--- a/datapath/linux/compat/include/net/dst_metadata.h
+++ b/datapath/linux/compat/include/net/dst_metadata.h
@@ -1,7 +1,7 @@
#ifndef __NET_DST_METADATA_WRAPPER_H
#define __NET_DST_METADATA_WRAPPER_H 1
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/dst_metadata.h>
#else
#include <linux/skbuff.h>
diff --git a/datapath/linux/compat/include/net/geneve.h b/datapath/linux/compat/include/net/geneve.h
index a7f2252..857c6d7 100644
--- a/datapath/linux/compat/include/net/geneve.h
+++ b/datapath/linux/compat/include/net/geneve.h
@@ -6,7 +6,7 @@
#endif
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/geneve.h>
static inline int rpl_geneve_init_module(void)
diff --git a/datapath/linux/compat/include/net/gre.h b/datapath/linux/compat/include/net/gre.h
index 8082a98..4a78fe8 100644
--- a/datapath/linux/compat/include/net/gre.h
+++ b/datapath/linux/compat/include/net/gre.h
@@ -5,7 +5,7 @@
#include <linux/skbuff.h>
#include <net/ip_tunnels.h>
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/gre.h>
static inline int rpl_ipgre_init(void)
@@ -61,7 +61,7 @@ struct net_device *rpl_gretap_fb_dev_create(struct net *net, const char *name,
#define gre_fb_xmit rpl_gre_fb_xmit
netdev_tx_t rpl_gre_fb_xmit(struct sk_buff *skb);
-#endif /* HAVE_METADATA_DST */
+#endif /* USE_UPSTREAM_TUNNEL */
#define ipgre_init rpl_ipgre_init
#define ipgre_fini rpl_ipgre_fini
diff --git a/datapath/linux/compat/include/net/ip_tunnels.h b/datapath/linux/compat/include/net/ip_tunnels.h
index 7ee0875..bc50a3b 100644
--- a/datapath/linux/compat/include/net/ip_tunnels.h
+++ b/datapath/linux/compat/include/net/ip_tunnels.h
@@ -3,7 +3,7 @@
#include <linux/version.h>
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
/* Block all ip_tunnel functions.
* Only function that do not depend on ip_tunnel structure can
* be used. Those needs to be explicitly defined in this header file. */
@@ -101,7 +101,7 @@ struct tnl_ptk_info {
#define skb_is_encapsulated ovs_skb_is_encapsulated
bool ovs_skb_is_encapsulated(struct sk_buff *skb);
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
/* Used to memset ip_tunnel padding. */
#define IP_TUNNEL_KEY_SIZE offsetofend(struct ip_tunnel_key, tp_dst)
@@ -329,7 +329,7 @@ int rpl_ip_tunnel_get_iflink(const struct net_device *dev);
#define ip_tunnel_get_link_net rpl_ip_tunnel_get_link_net
struct net *rpl_ip_tunnel_get_link_net(const struct net_device *dev);
-#endif /* HAVE_METADATA_DST */
+#endif /* USE_UPSTREAM_TUNNEL */
#ifndef HAVE___IP_TUNNEL_CHANGE_MTU
#define __ip_tunnel_change_mtu rpl___ip_tunnel_change_mtu
diff --git a/datapath/linux/compat/include/net/udp_tunnel.h b/datapath/linux/compat/include/net/udp_tunnel.h
index a50555f..605fe63 100644
--- a/datapath/linux/compat/include/net/udp_tunnel.h
+++ b/datapath/linux/compat/include/net/udp_tunnel.h
@@ -7,7 +7,7 @@
#include <net/dst_metadata.h>
#include <linux/netdev_features.h>
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/udp_tunnel.h>
#else
diff --git a/datapath/linux/compat/include/net/vxlan.h b/datapath/linux/compat/include/net/vxlan.h
index fa64e38..77d260c 100644
--- a/datapath/linux/compat/include/net/vxlan.h
+++ b/datapath/linux/compat/include/net/vxlan.h
@@ -6,7 +6,7 @@
#endif
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/vxlan.h>
static inline int rpl_vxlan_init_module(void)
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index 995f5da..6d7f653 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -52,7 +52,7 @@
#include <net/gre.h>
#include <net/dst_metadata.h>
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#if IS_ENABLED(CONFIG_IPV6)
#include <net/ipv6.h>
#include <net/ip6_fib.h>
diff --git a/datapath/linux/compat/ip_tunnel.c b/datapath/linux/compat/ip_tunnel.c
index b3b4fde..be82b55 100644
--- a/datapath/linux/compat/ip_tunnel.c
+++ b/datapath/linux/compat/ip_tunnel.c
@@ -62,7 +62,7 @@
#include "compat.h"
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
static void ip_tunnel_add(struct ip_tunnel_net *itn, struct ip_tunnel *t)
{
if (t->collect_md)
diff --git a/datapath/linux/compat/ip_tunnels_core.c b/datapath/linux/compat/ip_tunnels_core.c
index cb0223e..9b72f4a 100644
--- a/datapath/linux/compat/ip_tunnels_core.c
+++ b/datapath/linux/compat/ip_tunnels_core.c
@@ -208,7 +208,7 @@ void ovs_ip_tunnel_rcv(struct net_device *dev, struct sk_buff *skb,
ovs_skb_dst_set(skb, (struct dst_entry *)tun_dst);
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
netdev_port_receive(skb, &tun_dst->u.tun_info);
#else
netif_rx(skb);
diff --git a/datapath/linux/compat/lisp.c b/datapath/linux/compat/lisp.c
index 7c1aa31..01c4f59 100644
--- a/datapath/linux/compat/lisp.c
+++ b/datapath/linux/compat/lisp.c
@@ -212,7 +212,7 @@ static int lisp_rcv(struct sock *sk, struct sk_buff *skb)
struct lisphdr *lisph;
struct iphdr *inner_iph;
struct metadata_dst *tun_dst;
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
struct metadata_dst temp;
#endif
__be64 key;
@@ -236,7 +236,7 @@ static int lisp_rcv(struct sock *sk, struct sk_buff *skb)
key = instance_id_to_tunnel_id(&lisph->u2.word2.instance_id[0]);
/* Save outer tunnel values */
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
tun_dst = &temp;
ovs_udp_tun_rx_dst(&tun_dst->u.tun_info, skb, AF_INET, TUNNEL_KEY, key, 0);
#else
@@ -445,7 +445,7 @@ static int lisp_stop(struct net_device *dev)
static netdev_tx_t lisp_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
return rpl_lisp_xmit(skb);
#else
/* Drop All packets coming from networking stack. OVS-CB is
@@ -553,7 +553,7 @@ static void lisp_setup(struct net_device *dev)
dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
#endif
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
netif_keep_dst(dev);
#endif
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
index 423800b..a8c7eae 100644
--- a/datapath/linux/compat/stt.c
+++ b/datapath/linux/compat/stt.c
@@ -1412,7 +1412,7 @@ static void rcv_list(struct net_device *dev, struct sk_buff *skb,
} while ((skb = next));
}
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
static int __stt_rcv(struct stt_dev *stt_dev, struct sk_buff *skb)
{
struct metadata_dst tun_dst;
@@ -1732,7 +1732,7 @@ out:
static netdev_tx_t stt_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
return ovs_stt_xmit(skb);
#else
/* Drop All packets coming from networking stack. OVS-CB is
@@ -1890,7 +1890,7 @@ static void stt_setup(struct net_device *dev)
dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
netif_keep_dst(dev);
#endif
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
diff --git a/datapath/linux/compat/udp_tunnel.c b/datapath/linux/compat/udp_tunnel.c
index af606a9..b4d345b 100644
--- a/datapath/linux/compat/udp_tunnel.c
+++ b/datapath/linux/compat/udp_tunnel.c
@@ -1,6 +1,6 @@
#include <linux/version.h>
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#include <linux/module.h>
#include <linux/errno.h>
diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
index 86ab5a4..d45125d 100644
--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -53,7 +53,7 @@
#endif
#include <net/dst_metadata.h>
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#include "gso.h"
#include "vport-netdev.h"
diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c
index ddd3f5c..2d081c2 100644
--- a/datapath/vport-netdev.c
+++ b/datapath/vport-netdev.c
@@ -74,7 +74,7 @@ static rx_handler_result_t netdev_frame_hook(struct sk_buff **pskb)
if (unlikely(skb->pkt_type == PACKET_LOOPBACK))
return RX_HANDLER_PASS;
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
netdev_port_receive(skb, NULL);
#else
netdev_port_receive(skb, skb_tunnel_info(skb));
--
1.9.1
More information about the dev
mailing list