Re: [RFC] netdevice ops

2007-05-19 Thread Andi Kleen
Stephen Hemminger <[EMAIL PROTECTED]> writes: > > I would think a non-conditional deref would be easily pipelined. > If the net_device struct was more cache dense, it probably would > even out. It might be a good idea to consider strategic prefetch points for it. e.g. TCP executes quite a lot of

Re: [RFC] netdevice ops

2007-05-17 Thread Ben Greear
David Miller wrote: From: Ben Greear <[EMAIL PROTECTED]> Date: Thu, 17 May 2007 21:23:16 -0700 Vlan code uses several of the methods, so I'm not sure how it will save any memory Feeling particularly dense today? Ahh, yes indeed. Ben -- Ben Greear <[EMAIL PROTECTED]> Candela Tec

Re: [RFC] netdevice ops

2007-05-17 Thread Stephen Hemminger
On Thu, 17 May 2007 22:05:29 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > From: Jeff Garzik <[EMAIL PROTECTED]> > Date: Fri, 18 May 2007 00:54:13 -0400 > > > Stephen Hemminger wrote: > > > I want to take all the function pointers of 'struct net_device' and > > > move them to 'struct net_

Re: [RFC] netdevice ops

2007-05-17 Thread David Miller
From: Jeff Garzik <[EMAIL PROTECTED]> Date: Fri, 18 May 2007 00:54:13 -0400 > Stephen Hemminger wrote: > > I want to take all the function pointers of 'struct net_device' and > > move them to 'struct net_device_ops'. This will save memory for the > > case of lots of devices, as well as reduce init

Re: [RFC] netdevice ops

2007-05-17 Thread Jeff Garzik
Stephen Hemminger wrote: I want to take all the function pointers of 'struct net_device' and move them to 'struct net_device_ops'. This will save memory for the case of lots of devices, as well as reduce initialization code. It will also add an additional deref to every operation, right?

Re: [RFC] netdevice ops

2007-05-17 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Thu, 17 May 2007 21:07:37 -0700 > I want to take all the function pointers of 'struct net_device' and > move them to 'struct net_device_ops'. This will save memory for the > case of lots of devices, as well as reduce initialization code. > > Rough

Re: [RFC] netdevice ops

2007-05-17 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Thu, 17 May 2007 21:23:16 -0700 > Vlan code uses several of the methods, so I'm not sure how it will save > any memory Feeling particularly dense today? Only one copy of the ops will be needed for all vlan devices: static const struct netdev_ops vlan_

Re: [RFC] netdevice ops

2007-05-17 Thread Ben Greear
Stephen Hemminger wrote: I want to take all the function pointers of 'struct net_device' and move them to 'struct net_device_ops'. This will save memory for the case of lots of devices, as well as reduce initialization code. Rough plan: 1. Introduce inline accessors so protocols don't dereferenc

[RFC] netdevice ops

2007-05-17 Thread Stephen Hemminger
I want to take all the function pointers of 'struct net_device' and move them to 'struct net_device_ops'. This will save memory for the case of lots of devices, as well as reduce initialization code. Rough plan: 1. Introduce inline accessors so protocols don't dereference dev->XXX directly. 2. Fix