datapath: Remove vport MAC address configuration.
[sliver-openvswitch.git] / datapath / vport-vxlan.c
index 137e5d8..4f9f339 100644 (file)
@@ -35,7 +35,6 @@
 #include "datapath.h"
 #include "tunnel.h"
 #include "vport.h"
-#include "vport-generic.h"
 
 #define VXLAN_FLAGS 0x08000000  /* struct vxlanhdr.vx_flags required value. */
 
@@ -222,7 +221,7 @@ static int vxlan_socket_init(struct vxlan_port *vxlan_port, struct net *net)
        return 0;
 
 error_sock:
-       sock_release(vxlan_port->vxlan_rcv_socket);
+       sk_release_kernel(vxlan_port->vxlan_rcv_socket->sk);
 error:
        pr_warn("cannot register vxlan protocol handler\n");
        return err;
@@ -234,7 +233,7 @@ static void vxlan_tunnel_release(struct vxlan_port *vxlan_port)
 
        if (vxlan_port->count == 0) {
                /* Release old socket */
-               sock_release(vxlan_port->vxlan_rcv_socket);
+               sk_release_kernel(vxlan_port->vxlan_rcv_socket->sk);
                list_del(&vxlan_port->list);
                kfree(vxlan_port);
        }
@@ -268,6 +267,7 @@ static int vxlan_tunnel_setup(struct net *net, struct nlattr *options,
        if (vxlan_port) {
                vxlan_port->count++;
                err = 0;
+               *vxport = vxlan_port;
                goto out;
        }
 
@@ -372,14 +372,9 @@ const struct vport_ops ovs_vxlan_vport_ops = {
        .flags          = VPORT_F_TUN_ID,
        .create         = vxlan_tnl_create,
        .destroy        = vxlan_tnl_destroy,
-       .set_addr       = ovs_tnl_set_addr,
        .get_name       = ovs_tnl_get_name,
-       .get_addr       = ovs_tnl_get_addr,
        .get_options    = ovs_tnl_get_options,
        .set_options    = vxlan_set_options,
-       .get_dev_flags  = ovs_vport_gen_get_dev_flags,
-       .is_running     = ovs_vport_gen_is_running,
-       .get_operstate  = ovs_vport_gen_get_operstate,
        .send           = ovs_tnl_send,
 };
 #else