rearrange netdevice structure to save space
Subsystems (3)
PATCH 1/1 rearrange netdevice structure to save space
Trivial reordering of netdevice structure to save four bytes.
include/linux/netdevice.h +1 -5
@@ -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
PATCH 1/1 kill ->accept_fastpath hook
Quoted 3 lines · Stephen Hemminger
Trivial reordering of netdevice structure to save four bytes.
Signed-off-by Stephen Hemminger <[email protected]>
If we are twiddling struct net_device, might as well kill this hook. Never called AFAICS, and only assigned -- to a no-op stub -- in one driver.
===== include/linux/netdevice.h 1.99 vs edited =====
include/linux/netdevice.h +0 -1
@@ -469,7 +469,6 @@int (*hard_header_parse)(struct sk_buff *skb,unsigned char *haddr);int (*neigh_setup)(struct net_device *dev,struct neigh_parms *); -int (*accept_fastpath)(struct net_device *,struct dst_entry *);#ifdef CONFIG_NETPOLL int netpoll_rx;#endif
===== net/bridge/br_device.c 1.17 vs edited =====
net/bridge/br_device.c +0 -6
@@ -83,11 +83,6 @@return 0 ; } -static int br_dev_accept_fastpath (struct net_device *dev,struct dst_entry *dst) -{ -return -1 ; -} -void br_dev_setup (struct net_device *dev) {memset (dev->dev_addr,0 ,ETH_ALEN );
@@ -103,7 +98,6 @@ dev->destructor = free_netdev;SET_MODULE_OWNER (dev); dev->stop = br_dev_stop; - dev->accept_fastpath = br_dev_accept_fastpath; dev->tx_queue_len =0 ; dev->set_mac_address =NULL ; dev->priv_flags =IFF_EBRIDGE ;
Re: [PATCH] kill ->accept_fastpath hook
Quoted 10 lines · On Wed, 09 Mar 2005 13:47:52 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 3 lines · Stephen Hemminger
Trivial reordering of netdevice structure to save four bytes.
Signed-off-by Stephen Hemminger <[email protected]>If we are twiddling struct
net_device, might as well kill this hook. Never called AFAICS, and only assigned -- to a no-op stub -- in one driver.Signed-off-by Jeff Garzik <[email protected]>
yes, kill it.
Re: [PATCH] kill ->accept_fastpath hook
In reply to Jeff GarzikQuoted 9 lines · On Wed, 09 Mar 2005 13:47:52 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 3 lines · Stephen Hemminger
Trivial reordering of netdevice structure to save four bytes.
Signed-off-by Stephen Hemminger <[email protected]>If we are twiddling struct
net_device, might as well kill this hook. Never called AFAICS, and only assigned -- to a no-op stub -- in one driver.Signed-off-by Jeff Garzik <[email protected]>
Applied, thanks Jeff.
Quoted 3 lines · On Wed, 9 Mar 2005 09:26:28 -0800 Stephen Hemminger <[email protected]> wrote:
Trivial reordering of netdevice structure to save four bytes.
Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks Stephen.