netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] headers: use __aligned_xx types for userspace
@ 2011-03-18 18:50 Mike Frysinger
  2011-03-18 22:17 ` David Miller
  2011-03-18 23:28 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Frysinger @ 2011-03-18 18:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev, David S. Miller

Now that we finally have __aligned_xx exported to userspace, convert
the headers that get exported over to the proper type.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/linux/if_ppp.h                    |   16 ++++++++--------
 include/linux/netfilter/nfnetlink_log.h   |    4 ++--
 include/linux/netfilter/nfnetlink_queue.h |    4 ++--
 include/linux/netfilter/xt_connbytes.h    |    4 ++--
 include/linux/netfilter/xt_quota.h        |    2 +-
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index fcef103..c9ad383 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats {
 	__u16		tunnel_id;	/* redundant */
 	__u16		session_id;	/* if zero, get tunnel stats */
 	__u32		using_ipsec:1;	/* valid only for session_id == 0 */
-	aligned_u64	tx_packets;
-	aligned_u64	tx_bytes;
-	aligned_u64	tx_errors;
-	aligned_u64	rx_packets;
-	aligned_u64	rx_bytes;
-	aligned_u64	rx_seq_discards;
-	aligned_u64	rx_oos_packets;
-	aligned_u64	rx_errors;
+	__aligned_u64	tx_packets;
+	__aligned_u64	tx_bytes;
+	__aligned_u64	tx_errors;
+	__aligned_u64	rx_packets;
+	__aligned_u64	rx_bytes;
+	__aligned_u64	rx_seq_discards;
+	__aligned_u64	rx_oos_packets;
+	__aligned_u64	rx_errors;
 };
 
 #define ifr__name       b.ifr_ifrn.ifrn_name
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h
index ea9b8d3..90c2c95 100644
--- a/include/linux/netfilter/nfnetlink_log.h
+++ b/include/linux/netfilter/nfnetlink_log.h
@@ -28,8 +28,8 @@ struct nfulnl_msg_packet_hw {
 };
 
 struct nfulnl_msg_packet_timestamp {
-	aligned_be64	sec;
-	aligned_be64	usec;
+	__aligned_be64	sec;
+	__aligned_be64	usec;
 };
 
 enum nfulnl_attr_type {
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h
index 2455fe5..af94e00 100644
--- a/include/linux/netfilter/nfnetlink_queue.h
+++ b/include/linux/netfilter/nfnetlink_queue.h
@@ -25,8 +25,8 @@ struct nfqnl_msg_packet_hw {
 };
 
 struct nfqnl_msg_packet_timestamp {
-	aligned_be64	sec;
-	aligned_be64	usec;
+	__aligned_be64	sec;
+	__aligned_be64	usec;
 };
 
 enum nfqnl_attr_type {
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h
index 92fcbb0..f1d6c15 100644
--- a/include/linux/netfilter/xt_connbytes.h
+++ b/include/linux/netfilter/xt_connbytes.h
@@ -17,8 +17,8 @@ enum xt_connbytes_direction {
 
 struct xt_connbytes_info {
 	struct {
-		aligned_u64 from;	/* count to be matched */
-		aligned_u64 to;		/* count to be matched */
+		__aligned_u64 from;	/* count to be matched */
+		__aligned_u64 to;	/* count to be matched */
 	} count;
 	__u8 what;		/* ipt_connbytes_what */
 	__u8 direction;	/* ipt_connbytes_direction */
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h
index b0d28c6..468c4e9 100644
--- a/include/linux/netfilter/xt_quota.h
+++ b/include/linux/netfilter/xt_quota.h
@@ -11,7 +11,7 @@ struct xt_quota_priv;
 struct xt_quota_info {
 	u_int32_t		flags;
 	u_int32_t		pad;
-	aligned_u64		quota;
+	__aligned_u64		quota;
 
 	/* Used internally by the kernel */
 	struct xt_quota_priv	*master;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] headers: use __aligned_xx types for userspace
  2011-03-18 18:50 [PATCH] headers: use __aligned_xx types for userspace Mike Frysinger
@ 2011-03-18 22:17 ` David Miller
  2011-03-18 23:28 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-03-18 22:17 UTC (permalink / raw)
  To: vapier; +Cc: akpm, linux-kernel, netdev

From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 18 Mar 2011 14:50:37 -0400

> Now that we finally have __aligned_xx exported to userspace, convert
> the headers that get exported over to the proper type.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] headers: use __aligned_xx types for userspace
  2011-03-18 18:50 [PATCH] headers: use __aligned_xx types for userspace Mike Frysinger
  2011-03-18 22:17 ` David Miller
@ 2011-03-18 23:28 ` Andrew Morton
  2011-03-18 23:29   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2011-03-18 23:28 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-kernel, netdev, David S. Miller

On Fri, 18 Mar 2011 14:50:37 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> Now that we finally have __aligned_xx exported to userspace, convert
> the headers that get exported over to the proper type.
> 

Sob.  Please don't assume that because you're on top of an issue, all
the rest of us are.

A bit of git-log grovelling turns up

: commit 79b5dc0c64d88cda3da23b2e22a5cec0964372ac
: Author: Eric Paris <eparis@redhat.com>
: Date:   Fri Oct 15 14:34:14 2010 -0700                                          
:     types.h: define __aligned_u64 and expose to userspace
:     
:     We currently have a kernel internal type called aligned_u64 which aligns
:     __u64's on 8 bytes boundaries even on systems which would normally align
:     them on 4 byte boundaries.  This patch creates a new type __aligned_u64
:     which does the same thing but which is exposed to userspace rather than
:     being kernel internal.                                                    

but that really doesn't tell us why it was merged either.  Perhaps that
came out in the followup discussion and I failed to fix the changelog.


Still, it doesn't hurt to educate people.  Please explain why we are
making this change?

>  include/linux/if_ppp.h                    |   16 ++++++++--------
>  include/linux/netfilter/nfnetlink_log.h   |    4 ++--
>  include/linux/netfilter/nfnetlink_queue.h |    4 ++--
>  include/linux/netfilter/xt_connbytes.h    |    4 ++--
>  include/linux/netfilter/xt_quota.h        |    2 +-
>  5 files changed, 15 insertions(+), 15 deletions(-)

davem stuff :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] headers: use __aligned_xx types for userspace
  2011-03-18 23:28 ` Andrew Morton
@ 2011-03-18 23:29   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-03-18 23:29 UTC (permalink / raw)
  To: akpm; +Cc: vapier, linux-kernel, netdev

From: Andrew Morton <akpm@linux-foundation.org>
Date: Fri, 18 Mar 2011 16:28:26 -0700

> davem stuff :)

Already applied hours ago.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-18 23:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-18 18:50 [PATCH] headers: use __aligned_xx types for userspace Mike Frysinger
2011-03-18 22:17 ` David Miller
2011-03-18 23:28 ` Andrew Morton
2011-03-18 23:29   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).