datapath: compat: rename HAVE_METADATA_DST to USE_UPSTREAM_TUNNEL
authorPravin B Shelar <pshelar@ovn.org>
Fri, 8 Jul 2016 04:49:20 +0000 (21:49 -0700)
committerPravin B Shelar <pshelar@ovn.org>
Sat, 9 Jul 2016 02:27:49 +0000 (19:27 -0700)
To better represent the meaning of symbol.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
20 files changed:
acinclude.m4
datapath/linux/compat/dst_cache.c
datapath/linux/compat/geneve.c
datapath/linux/compat/gre.c
datapath/linux/compat/gso.h
datapath/linux/compat/include/net/dst_cache.h
datapath/linux/compat/include/net/dst_metadata.h
datapath/linux/compat/include/net/geneve.h
datapath/linux/compat/include/net/gre.h
datapath/linux/compat/include/net/ip_tunnels.h
datapath/linux/compat/include/net/udp_tunnel.h
datapath/linux/compat/include/net/vxlan.h
datapath/linux/compat/ip_gre.c
datapath/linux/compat/ip_tunnel.c
datapath/linux/compat/ip_tunnels_core.c
datapath/linux/compat/lisp.c
datapath/linux/compat/stt.c
datapath/linux/compat/udp_tunnel.c
datapath/linux/compat/vxlan.c
datapath/vport-netdev.c

index a596266..4bb65c7 100644 (file)
@@ -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])])
index 2b0bc37..b936516 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 #include <uapi/linux/in.h>
 
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
 struct dst_cache_pcpu {
        unsigned long refresh_ts;
        struct dst_entry *dst;
@@ -168,4 +168,4 @@ void rpl_dst_cache_destroy(struct dst_cache *dst_cache)
        free_percpu(dst_cache->cache);
 }
 EXPORT_SYMBOL_GPL(rpl_dst_cache_destroy);
-#endif /*HAVE_METADATA_DST */
+#endif /*USE_UPSTREAM_TUNNEL */
index 4559700..d8e9d57 100644 (file)
@@ -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
index bb49c8c..a341fa3 100644 (file)
@@ -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 */
index 7a20942..b0c5c17 100644 (file)
@@ -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)
@@ -163,7 +163,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.
index 8c53370..53ca42a 100644 (file)
@@ -7,7 +7,7 @@
 #include <net/ip6_fib.h>
 #endif
 
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
 struct dst_cache {
        struct dst_cache_pcpu __percpu *cache;
        unsigned long reset_ts;
@@ -102,5 +102,5 @@ int rpl_dst_cache_init(struct dst_cache *dst_cache, gfp_t gfp);
 #define rpl_dst_cache_destroy dst_cache_destroy
 void rpl_dst_cache_destroy(struct dst_cache *dst_cache);
 
-#endif /* HAVE_METADATA_DST */
+#endif /* USE_UPSTREAM_TUNNEL */
 #endif
index 310cfa6..6e38a3e 100644 (file)
@@ -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>
index a7f2252..857c6d7 100644 (file)
@@ -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)
index 8082a98..4a78fe8 100644 (file)
@@ -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
index 7ee0875..bc50a3b 100644 (file)
@@ -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
index a50555f..605fe63 100644 (file)
@@ -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
index fa64e38..77d260c 100644 (file)
@@ -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)
index 995f5da..6d7f653 100644 (file)
@@ -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>
index b3b4fde..be82b55 100644 (file)
@@ -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)
index cb0223e..9b72f4a 100644 (file)
@@ -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);
index 7c1aa31..01c4f59 100644 (file)
@@ -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;
index 423800b..a8c7eae 100644 (file)
@@ -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;
index af606a9..b4d345b 100644 (file)
@@ -1,6 +1,6 @@
 #include <linux/version.h>
 
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
 
 #include <linux/module.h>
 #include <linux/errno.h>
index 86ab5a4..d45125d 100644 (file)
@@ -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"
 
index ddd3f5c..2d081c2 100644 (file)
@@ -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));