-error_free:
- kfree_skb(skb);
- ovs_vport_record_error(vport, err);
- return sent_len;
-}
-
-struct vport *ovs_tnl_create(const struct vport_parms *parms,
- const struct vport_ops *vport_ops,
- const struct tnl_ops *tnl_ops)
-{
- struct vport *vport;
- struct tnl_vport *tnl_vport;
- int err;
-
- vport = ovs_vport_alloc(sizeof(struct tnl_vport), vport_ops, parms);
- if (IS_ERR(vport)) {
- err = PTR_ERR(vport);
- goto error;
- }
-
- tnl_vport = tnl_vport_priv(vport);
-
- strcpy(tnl_vport->name, parms->name);
- tnl_vport->tnl_ops = tnl_ops;
-
- return vport;
-