All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, linux-kernel@vger.kernel.org,
	linux-wpan@vger.kernel.org, aar@pengutronix.de,
	pablo@netfilter.org, kaber@trash.net, kadlec@blackhole.kfki.hu,
	pshelar@nicira.com, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, netfilter-devel@vger.kernel.org,
	dev@openvswitch.org, steffen.klassert@secunet.com,
	herbert@gondor.apana.org.au, bsingharora@gmail.com,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: [PATCH net-next 5/9] libnl: nla_put_s64(): align on a 64-bit area
Date: Fri, 22 Apr 2016 17:31:20 +0200	[thread overview]
Message-ID: <1461339084-3849-6-git-send-email-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <1461339084-3849-1-git-send-email-nicolas.dichtel@6wind.com>

nla_data() is now aligned on a 64-bit area.
In fact, there is no user of this function.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/net/netlink.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/net/netlink.h b/include/net/netlink.h
index 066a921e7cbe..074215a59d19 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -102,7 +102,8 @@
  *   nla_put_s8(skb, type, value)	add s8 attribute to skb
  *   nla_put_s16(skb, type, value)	add s16 attribute to skb
  *   nla_put_s32(skb, type, value)	add s32 attribute to skb
- *   nla_put_s64(skb, type, value)	add s64 attribute to skb
+ *   nla_put_s64(skb, type, value,
+ *               padattr)		add s64 attribute to skb
  *   nla_put_string(skb, type, str)	add string attribute to skb
  *   nla_put_flag(skb, type)		add flag attribute to skb
  *   nla_put_msecs(skb, type, jiffies)	add msecs attribute to skb
@@ -929,14 +930,16 @@ static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
 }
 
 /**
- * nla_put_s64 - Add a s64 netlink attribute to a socket buffer
+ * nla_put_s64 - Add a s64 netlink attribute to a socket buffer 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_s64(struct sk_buff *skb, int attrtype, s64 value)
+static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value,
+			      int padattr)
 {
-	return nla_put(skb, attrtype, sizeof(s64), &value);
+	return nla_put_64bit(skb, attrtype, sizeof(s64), &value, padattr);
 }
 
 /**
-- 
2.8.1

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Dichtel <nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
	steffen.klassert-opNxpl+3fjRBDgjK7y7TUQ@public.gmane.org,
	herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org,
	aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	bsingharora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Nicolas Dichtel
	<nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
	yoshfuji-VfPWfsRibaP+Ru+s062T9g@public.gmane.org,
	netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kadlec-K40Dz/62t/MgiyqX0sVFJYdd74u8MsAO@public.gmane.org,
	kuznet-v/Mj1YrvjDBInbfyfbPRSQ@public.gmane.org,
	jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org,
	linux-wpan-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org,
	pablo-Cap9r6Oaw4JrovVCs/uTlw@public.gmane.org
Subject: [PATCH net-next 5/9] libnl: nla_put_s64(): align on a 64-bit area
Date: Fri, 22 Apr 2016 17:31:20 +0200	[thread overview]
Message-ID: <1461339084-3849-6-git-send-email-nicolas.dichtel@6wind.com> (raw)
In-Reply-To: <1461339084-3849-1-git-send-email-nicolas.dichtel-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

nla_data() is now aligned on a 64-bit area.
In fact, there is no user of this function.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/net/netlink.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/net/netlink.h b/include/net/netlink.h
index 066a921e7cbe..074215a59d19 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -102,7 +102,8 @@
  *   nla_put_s8(skb, type, value)	add s8 attribute to skb
  *   nla_put_s16(skb, type, value)	add s16 attribute to skb
  *   nla_put_s32(skb, type, value)	add s32 attribute to skb
- *   nla_put_s64(skb, type, value)	add s64 attribute to skb
+ *   nla_put_s64(skb, type, value,
+ *               padattr)		add s64 attribute to skb
  *   nla_put_string(skb, type, str)	add string attribute to skb
  *   nla_put_flag(skb, type)		add flag attribute to skb
  *   nla_put_msecs(skb, type, jiffies)	add msecs attribute to skb
@@ -929,14 +930,16 @@ static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
 }
 
 /**
- * nla_put_s64 - Add a s64 netlink attribute to a socket buffer
+ * nla_put_s64 - Add a s64 netlink attribute to a socket buffer 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_s64(struct sk_buff *skb, int attrtype, s64 value)
+static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value,
+			      int padattr)
 {
-	return nla_put(skb, attrtype, sizeof(s64), &value);
+	return nla_put_64bit(skb, attrtype, sizeof(s64), &value, padattr);
 }
 
 /**
-- 
2.8.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

  parent reply	other threads:[~2016-04-22 15:42 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 15:31 [PATCH net-next 0/9] netlink: align attributes when needed (patchset #1) Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 1/9] libnl: fix help of _64bit functions Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 2/9] libnl: nla_put_le64(): align on a 64-bit area Nicolas Dichtel
2016-04-22 16:51   ` Eric Dumazet
2016-04-22 16:51     ` Eric Dumazet
2016-04-23 17:05     ` Alexander Aring
2016-04-23 17:28       ` Alexander Aring
2016-04-25  7:41         ` Nicolas Dichtel
2016-04-25  7:41           ` Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 3/9] libnl: nla_put_be64(): " Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 4/9] libnl: nla_put_net64(): " Nicolas Dichtel
2016-04-22 15:31 ` Nicolas Dichtel [this message]
2016-04-22 15:31   ` [PATCH net-next 5/9] libnl: nla_put_s64(): " Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 6/9] libnl: nla_put_msecs(): " Nicolas Dichtel
2016-04-22 15:31   ` Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 7/9] libnl: add nla_put_u64_64bit() helper Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 8/9] xfrm: align nlattr properly when needed Nicolas Dichtel
2016-04-22 15:31 ` [PATCH net-next 9/9] taskstats: use the libnl API to align nlattr on 64-bit Nicolas Dichtel
2016-04-27  1:14   ` Balbir Singh
2016-04-27  1:14     ` Balbir Singh
2016-04-27  7:29     ` Nicolas Dichtel
2016-04-27  7:29       ` Nicolas Dichtel
2016-04-27 12:29       ` Balbir Singh
2016-04-27 12:29         ` Balbir Singh
2016-04-27 15:46         ` Nicolas Dichtel
2016-04-27 15:46           ` Nicolas Dichtel
2016-04-27 15:47           ` [PATCH net-next] taskstats: fix nl parsing in accounting/getdelays.c Nicolas Dichtel
2016-04-27 15:49             ` Nicolas Dichtel
2016-04-27 15:49               ` Nicolas Dichtel
2016-04-27 15:53               ` [PATCH net-next v2] " Nicolas Dichtel
2016-04-27 15:53                 ` Nicolas Dichtel
2016-04-27 16:56                 ` David Miller
2016-04-27 16:56                   ` David Miller
2016-04-27 16:41         ` [PATCH net-next 9/9] taskstats: use the libnl API to align nlattr on 64-bit David Miller
2016-04-24  0:13 ` [PATCH net-next 0/9] netlink: align attributes when needed (patchset #1) David Miller
2016-04-24  0:13   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461339084-3849-6-git-send-email-nicolas.dichtel@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=aar@pengutronix.de \
    --cc=bsingharora@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=pshelar@nicira.com \
    --cc=steffen.klassert@secunet.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.