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)
memcpy(acts->actions, (*sfa)->actions, (*sfa)->actions_len);
acts->actions_len = (*sfa)->actions_len;
- ovs_flow_actions_free(*sfa);
+ kfree(*sfa);
*sfa = acts;
out:
int err;
case OVS_KEY_ATTR_PRIORITY:
- case OVS_KEY_ATTR_TUN_ID:
case OVS_KEY_ATTR_ETHERNET:
break;
return 0;
err_kfree:
- ovs_flow_actions_free(acts);
+ kfree(acts);
error:
return error;
}
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)
ovs_vport_exit();
error_flow_exit:
ovs_flow_exit();
-error_tnl_exit:
- ovs_tnl_exit();
error_wq:
ovs_workqueues_exit();
error_genl_exec:
rcu_barrier();
ovs_vport_exit();
ovs_flow_exit();
- ovs_tnl_exit();
ovs_workqueues_exit();
genl_exec_exit();
}