if (upcall_info->userdata)
__nla_put(user_skb, OVS_PACKET_ATTR_USERDATA,
- upcall_info->userdata->nla_len - NLA_HDRLEN,
+ nla_len(upcall_info->userdata),
nla_data(upcall_info->userdata));
nla = __nla_reserve(user_skb, OVS_PACKET_ATTR_PACKET, skb->len);
int next_offset = offsetof(struct sw_flow_actions, actions) +
(*sfa)->actions_len;
- if (req_size <= (ksize(*sfa) - next_offset))
+ if (req_size <= ((*sfa)->buf_size - next_offset))
goto out;
- new_acts_size = ksize(*sfa) * 2;
+ new_acts_size = (*sfa)->buf_size * 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;
- kfree(*sfa);
+ ovs_flow_actions_free(*sfa);
*sfa = acts;
out:
return 0;
err_kfree:
- kfree(acts);
+ ovs_flow_actions_free(acts);
error:
return error;
}