Skip to content

Commit

Permalink
datapath: define compat ip_tunnel_get_iflink()
Browse files Browse the repository at this point in the history
ip_tunnel_get_iflink() depends on ip_tunnel structure. But OVS
compat layer defines its own ip_tunnel structure which is not
compatible with all upstream kernel versions. Therefore we
can no use such function.

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 3edfaf6 commit 00d662b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datapath/linux/compat/include/net/ip_tunnels.h
Expand Up @@ -302,5 +302,7 @@ void rpl_ip_tunnel_delete_net(struct ip_tunnel_net *itn, struct rtnl_link_ops *o
#define ip_tunnel_setup rpl_ip_tunnel_setup
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);
#endif /* HAVE_METADATA_DST */
#endif /* __NET_IP_TUNNELS_H */
8 changes: 8 additions & 0 deletions datapath/linux/compat/ip_tunnel.c
Expand Up @@ -282,4 +282,12 @@ void rpl_ip_tunnel_setup(struct net_device *dev, int net_id)

tunnel->ip_tnl_net_id = net_id;
}

int rpl_ip_tunnel_get_iflink(const struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);

return tunnel->parms.link;
}

#endif

0 comments on commit 00d662b

Please sign in to comment.