datapath: define compat ip_tunnel_get_link_net()
authorPravin B Shelar <pshelar@nicira.com>
Fri, 11 Dec 2015 04:03:00 +0000 (20:03 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Fri, 11 Dec 2015 21:49:47 +0000 (13:49 -0800)
Same as ip_tunnel_get_iflink(), function ip_tunnel_get_link_net()
also depends on ip_tunnel structure. So this patch defines
compat implementation for same.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@kernel.org>
datapath/linux/compat/include/net/ip_tunnels.h
datapath/linux/compat/ip_tunnel.c

index 185d7e9..7083372 100644 (file)
@@ -304,5 +304,8 @@ void rpl_ip_tunnel_setup(struct net_device *dev, int net_id);
 
 #define ip_tunnel_get_iflink rpl_ip_tunnel_get_iflink
 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 /* __NET_IP_TUNNELS_H */
index db0cb8e..2d4070e 100644 (file)
@@ -290,4 +290,11 @@ int rpl_ip_tunnel_get_iflink(const struct net_device *dev)
        return tunnel->parms.link;
 }
 
+struct net *rpl_ip_tunnel_get_link_net(const struct net_device *dev)
+{
+       struct ip_tunnel *tunnel = netdev_priv(dev);
+
+       return tunnel->net;
+}
+
 #endif