Skip to content

Commit

Permalink
datapath: define compat ip_tunnel_get_link_net()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pravin B Shelar committed Dec 11, 2015
1 parent bc2e744 commit 71bfe2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datapath/linux/compat/include/net/ip_tunnels.h
Expand Up @@ -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 */
7 changes: 7 additions & 0 deletions datapath/linux/compat/ip_tunnel.c
Expand Up @@ -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

0 comments on commit 71bfe2f

Please sign in to comment.