- struct vxlan_port *vxlan_port;
- struct tnl_vport *tnl_vport = tnl_vport_priv(vport);
- struct tnl_mutable_config *config;
-
- config = rtnl_dereference(tnl_vport->mutable);
-
- vxlan_port = vxlan_port_exists(ovs_dp_get_net(vport->dp),
- config->dst_port);
-
- vxlan_tunnel_release(vxlan_port);
-
- ovs_tnl_destroy(vport);
-}
-
-static struct vport *vxlan_tnl_create(const struct vport_parms *parms)
-{
- int err;
- struct vport *vport;
- struct vxlan_port *vxlan_port = NULL;
-
- err = vxlan_tunnel_setup(ovs_dp_get_net(parms->dp), parms->options,
- &vxlan_port);
- if (err)
- return ERR_PTR(err);
-
- vport = ovs_tnl_create(parms, &ovs_vxlan_vport_ops, &ovs_vxlan_tnl_ops);
-
- if (IS_ERR(vport))
- vxlan_tunnel_release(vxlan_port);
-
- return vport;