To better represent the meaning of symbol.
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
[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])])
#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;
free_percpu(dst_cache->cache);
}
EXPORT_SYMBOL_GPL(rpl_dst_cache_destroy);
-#endif /*HAVE_METADATA_DST */
+#endif /*USE_UPSTREAM_TUNNEL */
#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
#include "gso.h"
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#if IS_ENABLED(CONFIG_NET_IPGRE_DEMUX)
#ifndef HAVE_GRE_HANDLE_OFFLOADS
#endif
#endif /* CONFIG_NET_IPGRE_DEMUX */
-#endif /* HAVE_METADATA_DST */
+#endif /* USE_UPSTREAM_TUNNEL */
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)
}
#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.
#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;
#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
#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>
#endif
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/geneve.h>
static inline int rpl_geneve_init_module(void)
#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)
#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
#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. */
#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)
#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
#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
#endif
-#ifdef HAVE_METADATA_DST
+#ifdef USE_UPSTREAM_TUNNEL
#include_next <net/vxlan.h>
static inline int rpl_vxlan_init_module(void)
#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>
#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)
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);
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;
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
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
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;
} 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;
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
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;
#include <linux/version.h>
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#include <linux/module.h>
#include <linux/errno.h>
#endif
#include <net/dst_metadata.h>
-#ifndef HAVE_METADATA_DST
+#ifndef USE_UPSTREAM_TUNNEL
#include "gso.h"
#include "vport-netdev.h"
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));