From 462a988b99d6bdc34bea617ad42aecc5cfa61901 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Tue, 19 Feb 2013 11:01:33 -0800 Subject: [PATCH] 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 --- datapath/datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1