Tunnel: Cleanup old tunnel infrastructure.
[sliver-openvswitch.git] / datapath / datapath.c
index bd2d57b..6b2e239 100644 (file)
@@ -434,10 +434,10 @@ static struct nlattr *reserve_sfa_size(struct sw_flow_actions **sfa, int attr_le
        int next_offset = offsetof(struct sw_flow_actions, actions) +
                                        (*sfa)->actions_len;
 
-       if (req_size <= ((*sfa)->buf_size - next_offset))
+       if (req_size <= (ksize(*sfa) - next_offset))
                goto out;
 
-       new_acts_size = (*sfa)->buf_size * 2;
+       new_acts_size = ksize(*sfa) * 2;
 
        if (new_acts_size > MAX_ACTIONS_BUFSIZE) {
                if ((MAX_ACTIONS_BUFSIZE - next_offset) < req_size)
@@ -451,7 +451,7 @@ static struct nlattr *reserve_sfa_size(struct sw_flow_actions **sfa, int attr_le
 
        memcpy(acts->actions, (*sfa)->actions, (*sfa)->actions_len);
        acts->actions_len = (*sfa)->actions_len;
-       ovs_flow_actions_free(*sfa);
+       kfree(*sfa);
        *sfa = acts;
 
 out:
@@ -604,7 +604,6 @@ static int validate_set(const struct nlattr *a,
        int err;
 
        case OVS_KEY_ATTR_PRIORITY:
-       case OVS_KEY_ATTR_TUN_ID:
        case OVS_KEY_ATTR_ETHERNET:
                break;
 
@@ -1292,7 +1291,7 @@ static int ovs_flow_cmd_new_or_set(struct sk_buff *skb, struct genl_info *info)
        return 0;
 
 err_kfree:
-       ovs_flow_actions_free(acts);
+       kfree(acts);
 error:
        return error;
 }
@@ -2316,13 +2315,9 @@ static int __init dp_init(void)
        if (err)
                goto error_genl_exec;
 
-       err = ovs_tnl_init();
-       if (err)
-               goto error_wq;
-
        err = ovs_flow_init();
        if (err)
-               goto error_tnl_exit;
+               goto error_wq;
 
        err = ovs_vport_init();
        if (err)
@@ -2352,8 +2347,6 @@ error_vport_exit:
        ovs_vport_exit();
 error_flow_exit:
        ovs_flow_exit();
-error_tnl_exit:
-       ovs_tnl_exit();
 error_wq:
        ovs_workqueues_exit();
 error_genl_exec:
@@ -2371,7 +2364,6 @@ static void dp_cleanup(void)
        rcu_barrier();
        ovs_vport_exit();
        ovs_flow_exit();
-       ovs_tnl_exit();
        ovs_workqueues_exit();
        genl_exec_exit();
 }