From: Joe Perches <joe@perches.com> Date: 2011-05-10 03:42:47
Save a bit of space.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/netdevice.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
@@ -1141,13 +1138,16 @@ struct net_device {conststructheader_ops*header_ops;unsignedintflags;/* interface flags (a la BSD) */+unsignedintpriv_flags;/* Like 'flags' but invisible to userspace. */unsignedshortgflags;-unsignedintpriv_flags;/* Like 'flags' but invisible to userspace. */unsignedshortpadded;/* How much padding added by alloc_netdev() */unsignedcharoperstate;/* RFC2863 operstate */unsignedcharlink_mode;/* mapping policy to operstate */+unsignedcharif_port;/* Selectable AUI, TP,..*/+unsignedchardma;/* DMA channel */+unsignedintmtu;/* interface MTU value */unsignedshorttype;/* interface hardware type */unsignedshorthard_header_len;/* hardware hdr length */
From: Eric Dumazet <hidden> Date: 2011-05-10 03:53:20
Le lundi 09 mai 2011 à 20:42 -0700, Joe Perches a écrit :
Save a bit of space.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/netdevice.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Hmm... correct alignements are far more important for this structure.
Did you run benchmarks on 32bit and 64bit platforms ?
BTW we have ____cacheline_aligned_in_smp markers, I am not even sure
this patch saves space.
@@ -1141,13 +1138,16 @@ struct net_device {conststructheader_ops*header_ops;unsignedintflags;/* interface flags (a la BSD) */+unsignedintpriv_flags;/* Like 'flags' but invisible to userspace. */unsignedshortgflags;-unsignedintpriv_flags;/* Like 'flags' but invisible to userspace. */unsignedshortpadded;/* How much padding added by alloc_netdev() */unsignedcharoperstate;/* RFC2863 operstate */unsignedcharlink_mode;/* mapping policy to operstate */+unsignedcharif_port;/* Selectable AUI, TP,..*/+unsignedchardma;/* DMA channel */+unsignedintmtu;/* interface MTU value */unsignedshorttype;/* interface hardware type */unsignedshorthard_header_len;/* hardware hdr length */