summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-vxlan.c
diff options
context:
space:
mode:
authorPravin B Shelar2015-08-08 08:51:33 +0200
committerDavid S. Miller2015-08-10 23:03:54 +0200
commita9020fde67a6eb77f8130feff633189f99264db1 (patch)
tree4e911a8b9b4a774ba145f1d049df6e417863f902 /net/openvswitch/vport-vxlan.c
parentnet: add explicit logging and stat for neighbour table overflow (diff)
downloadkernel-qcow2-linux-a9020fde67a6eb77f8130feff633189f99264db1.tar.gz
kernel-qcow2-linux-a9020fde67a6eb77f8130feff633189f99264db1.tar.xz
kernel-qcow2-linux-a9020fde67a6eb77f8130feff633189f99264db1.zip
openvswitch: Move tunnel destroy function to oppenvswitch module.
This function will be used in gre and geneve vport implementations. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport-vxlan.c')
-rw-r--r--net/openvswitch/vport-vxlan.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
index c6e937e36f8b..1e8b00a23a23 100644
--- a/net/openvswitch/vport-vxlan.c
+++ b/net/openvswitch/vport-vxlan.c
@@ -146,21 +146,6 @@ static struct vport *vxlan_create(const struct vport_parms *parms)
return ovs_netdev_link(vport, parms->name);
}
-static void vxlan_destroy(struct vport *vport)
-{
- rtnl_lock();
- if (vport->dev->priv_flags & IFF_OVS_DATAPATH)
- ovs_netdev_detach_dev(vport);
-
- /* Early release so we can unregister the device */
- dev_put(vport->dev);
- rtnl_delete_link(vport->dev);
- vport->dev = NULL;
- rtnl_unlock();
-
- call_rcu(&vport->rcu, ovs_vport_free_rcu);
-}
-
static int vxlan_get_egress_tun_info(struct vport *vport, struct sk_buff *skb,
struct ip_tunnel_info *egress_tun_info)
{
@@ -183,7 +168,7 @@ static int vxlan_get_egress_tun_info(struct vport *vport, struct sk_buff *skb,
static struct vport_ops ovs_vxlan_netdev_vport_ops = {
.type = OVS_VPORT_TYPE_VXLAN,
.create = vxlan_create,
- .destroy = vxlan_destroy,
+ .destroy = ovs_netdev_tunnel_destroy,
.get_options = vxlan_get_options,
.send = ovs_netdev_send,
.get_egress_tun_info = vxlan_get_egress_tun_info,