From: Jesse Gross Date: Tue, 19 Feb 2013 19:01:33 +0000 (-0800) Subject: datapath: Use nla_len() in queue_userspace_packet(). X-Git-Tag: sliver-openvswitch-1.10.90-1~11^2~20 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=462a988b99d6bdc34bea617ad42aecc5cfa61901 datapath: Use nla_len() in queue_userspace_packet(). Commit e995e3df57ea4e27678bc0bea5eb30872994155b (Allow OVS_USERSPACE_ATTR_USERDATA to be variable length.) introduced an open coded version of nla_len() in queue_userspace_packet(). This replaces it with the equivalent function call. Signed-off-by: Jesse Gross --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 0920a30a4..fc5d2de8e 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -393,7 +393,7 @@ static int queue_userspace_packet(struct net *net, int dp_ifindex, 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);