Gmane
X-Face
From: Stephen Hemminger <shemminger <at> osdl.org>
Subject: [PATCH] rearrange netdevice structure to save space
Newsgroups: gmane.linux.network
Date: 2005-03-09 17:26:28 GMT (4 years, 16 weeks, 5 days, 6 hours and 7 minutes ago)
Trivial reordering of netdevice structure to save four bytes.

Signed-off-by: Stephen Hemminger <shemminger <at> osdl.org>

diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h
--- a/include/linux/netdevice.h	2005-03-09 09:04:56 -08:00
+++ b/include/linux/netdevice.h	2005-03-09 09:04:56 -08:00
@@ -328,9 +328,7 @@
 	unsigned short		flags;	/* interface flags (a la BSD)	*/
 	unsigned short		gflags;
         unsigned short          priv_flags; /* Like 'flags' but invisible to userspace. */
-        unsigned short          unused_alignment_fixer; /* Because we need priv_flags,
-                                                         * and we want to be 32-bit aligned.
-                                                         */
+	unsigned short		padded;	/* How much padding added by alloc_netdev() */

 	unsigned		mtu;	/* interface MTU value		*/
 	unsigned short		type;	/* interface hardware type	*/
@@ -487,8 +485,6 @@

 	/* class/net/name entry */
 	struct class_device	class_dev;
-	/* how much padding had been added by alloc_netdev() */
-	int padded;
 };

 #define	NETDEV_ALIGN		32