* [PATCH] rearrange netdevice structure to save space
@ 2005-03-09 17:26 Stephen Hemminger
2005-03-09 18:47 ` [PATCH] kill ->accept_fastpath hook Jeff Garzik
2005-03-11 2:41 ` [PATCH] rearrange netdevice structure to save space David S. Miller
0 siblings, 2 replies; 5+ messages in thread
From: Stephen Hemminger @ 2005-03-09 17:26 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Trivial reordering of netdevice structure to save four bytes.
Signed-off-by: Stephen Hemminger <shemminger@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] kill ->accept_fastpath hook
2005-03-09 17:26 [PATCH] rearrange netdevice structure to save space Stephen Hemminger
@ 2005-03-09 18:47 ` Jeff Garzik
2005-03-09 18:55 ` Stephen Hemminger
2005-03-11 2:19 ` David S. Miller
2005-03-11 2:41 ` [PATCH] rearrange netdevice structure to save space David S. Miller
1 sibling, 2 replies; 5+ messages in thread
From: Jeff Garzik @ 2005-03-09 18:47 UTC (permalink / raw)
To: David S. Miller, netdev; +Cc: Stephen Hemminger
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
Stephen Hemminger wrote:
> Trivial reordering of netdevice structure to save four bytes.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
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 <jgarzik@pobox.com>
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1108 bytes --]
===== include/linux/netdevice.h 1.99 vs edited =====
--- 1.99/include/linux/netdevice.h 2005-02-11 00:54:25 -05:00
+++ edited/include/linux/netdevice.h 2005-03-09 13:26:25 -05:00
@@ -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 =====
--- 1.17/net/bridge/br_device.c 2004-07-29 17:40:51 -04:00
+++ edited/net/bridge/br_device.c 2005-03-09 13:26:08 -05:00
@@ -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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kill ->accept_fastpath hook
2005-03-09 18:47 ` [PATCH] kill ->accept_fastpath hook Jeff Garzik
@ 2005-03-09 18:55 ` Stephen Hemminger
2005-03-11 2:19 ` David S. Miller
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2005-03-09 18:55 UTC (permalink / raw)
To: Jeff Garzik; +Cc: David S. Miller, netdev
On Wed, 09 Mar 2005 13:47:52 -0500
Jeff Garzik <jgarzik@pobox.com> wrote:
> Stephen Hemminger wrote:
> > Trivial reordering of netdevice structure to save four bytes.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
>
> 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 <jgarzik@pobox.com>
>
yes, kill it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kill ->accept_fastpath hook
2005-03-09 18:47 ` [PATCH] kill ->accept_fastpath hook Jeff Garzik
2005-03-09 18:55 ` Stephen Hemminger
@ 2005-03-11 2:19 ` David S. Miller
1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2005-03-11 2:19 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, shemminger
On Wed, 09 Mar 2005 13:47:52 -0500
Jeff Garzik <jgarzik@pobox.com> wrote:
> Stephen Hemminger wrote:
> > Trivial reordering of netdevice structure to save four bytes.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
>
> 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 <jgarzik@pobox.com>
Applied, thanks Jeff.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rearrange netdevice structure to save space
2005-03-09 17:26 [PATCH] rearrange netdevice structure to save space Stephen Hemminger
2005-03-09 18:47 ` [PATCH] kill ->accept_fastpath hook Jeff Garzik
@ 2005-03-11 2:41 ` David S. Miller
1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2005-03-11 2:41 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
On Wed, 9 Mar 2005 09:26:28 -0800
Stephen Hemminger <shemminger@osdl.org> wrote:
> Trivial reordering of netdevice structure to save four bytes.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Applied, thanks Stephen.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-11 2:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-09 17:26 [PATCH] rearrange netdevice structure to save space Stephen Hemminger
2005-03-09 18:47 ` [PATCH] kill ->accept_fastpath hook Jeff Garzik
2005-03-09 18:55 ` Stephen Hemminger
2005-03-11 2:19 ` David S. Miller
2005-03-11 2:41 ` [PATCH] rearrange netdevice structure to save space David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox