aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2016-04-22 17:31:19 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-23 20:13:24 -0400
commite9bbe898cbe89b17ad3993c136aa13d0431cd537 (patch)
tree685d579676b410db7bd8b1a41d6f63fd1952ec2c /include/net
parentlibnl: nla_put_be64(): align on a 64-bit area (diff)
downloadlinux-dev-e9bbe898cbe89b17ad3993c136aa13d0431cd537.tar.xz
linux-dev-e9bbe898cbe89b17ad3993c136aa13d0431cd537.zip
libnl: nla_put_net64(): align on a 64-bit area
nla_data() is now aligned on a 64-bit area. The temporary function nla_put_be64_32bit() is removed in this patch. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netlink.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 47d7d1356fa3..066a921e7cbe 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -868,20 +868,18 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
return nla_put_64bit(skb, attrtype, sizeof(__be64), &value, padattr);
}
-static inline int nla_put_be64_32bit(struct sk_buff *skb, int attrtype,
- __be64 value)
-{
- return nla_put(skb, attrtype, sizeof(__be64), &value);
-}
/**
- * nla_put_net64 - Add 64-bit network byte order netlink attribute to a socket buffer
+ * nla_put_net64 - Add 64-bit network byte order nlattr to a skb and align it
* @skb: socket buffer to add attribute to
* @attrtype: attribute type
* @value: numeric value
+ * @padattr: attribute type for the padding
*/
-static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value)
+static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
+ int padattr)
{
- return nla_put_be64_32bit(skb, attrtype | NLA_F_NET_BYTEORDER, value);
+ return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, value,
+ padattr);
}
/**