diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2015-12-10 20:02:59 -0800 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2015-12-11 13:49:47 -0800 |
commit | 00d662ba54aa18d271bd04f51b85f2ecc03cd90a (patch) | |
tree | 76dea5c7c353d946cfd26dd27aac0fbb24853880 /datapath | |
parent | 3edfaf604aa3cbc0ee0d0f657fce2ac0c43e2ed0 (diff) | |
download | openvswitch-00d662ba54aa18d271bd04f51b85f2ecc03cd90a.tar.gz |
datapath: define compat ip_tunnel_get_iflink()
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>
Diffstat (limited to 'datapath')
-rw-r--r-- | datapath/linux/compat/include/net/ip_tunnels.h | 2 | ||||
-rw-r--r-- | datapath/linux/compat/ip_tunnel.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/datapath/linux/compat/include/net/ip_tunnels.h b/datapath/linux/compat/include/net/ip_tunnels.h index 47dce784d..185d7e985 100644 --- a/datapath/linux/compat/include/net/ip_tunnels.h +++ b/datapath/linux/compat/include/net/ip_tunnels.h @@ -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 */ diff --git a/datapath/linux/compat/ip_tunnel.c b/datapath/linux/compat/ip_tunnel.c index f43e2d457..db0cb8ef0 100644 --- a/datapath/linux/compat/ip_tunnel.c +++ b/datapath/linux/compat/ip_tunnel.c @@ -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 |