Re: [PATCH]: Resurrect napi_poll patch.

2007-07-23 Thread Stephen Hemminger
On Mon, 23 Jul 2007 19:06:42 +0200 Andi Kleen <[EMAIL PROTECTED]> wrote: > On Mon, Jul 23, 2007 at 10:58:22AM +0100, Stephen Hemminger wrote: > > On 21 Jul 2007 15:26:00 +0200 > > Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > > David Miller <[EMAIL PROTECTED]> writes: > > > > > > > > Good candid

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-23 Thread Andi Kleen
On Mon, Jul 23, 2007 at 10:58:22AM +0100, Stephen Hemminger wrote: > On 21 Jul 2007 15:26:00 +0200 > Andi Kleen <[EMAIL PROTECTED]> wrote: > > > David Miller <[EMAIL PROTECTED]> writes: > > > > > > Good candidates for taking advantage of multi-napi are: > > > > > > 1) e1000 > > > 2) ucc_geth > >

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-23 Thread Stephen Hemminger
On 21 Jul 2007 15:26:00 +0200 Andi Kleen <[EMAIL PROTECTED]> wrote: > David Miller <[EMAIL PROTECTED]> writes: > > > > Good candidates for taking advantage of multi-napi are: > > > > 1) e1000 > > 2) ucc_geth > > 3) ehea > > 4) sunvnet > > s2io.c sky2.c could use it because of issues with dual-

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-22 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Sun, 22 Jul 2007 17:51:52 +1000 > On Sun, 2007-07-22 at 00:18 -0700, David Miller wrote: > > --- a/net/core/dev.c > > +++ b/net/core/dev.c > > @@ -220,7 +220,8 @@ static RAW_NOTIFIER_HEAD(netdev_chain); > > * Device drivers call our routines to queue

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-22 Thread Rusty Russell
On Sun, 2007-07-22 at 00:18 -0700, David Miller wrote: > Rusty, how does it look otherwise? I like it. For a start, the simplification of the NAPI api was long overdue, and the damage done by separating the napi_struct is really minimal. Overall the tg3 driver just looks a little nicer now, and

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-22 Thread David Miller
From: David Miller <[EMAIL PROTECTED]> Date: Sun, 22 Jul 2007 00:18:18 -0700 (PDT) > To facilitate discussion I converted the core and tg3, and include > just that part of the patch below. And for those for whom it makes it easier to play around with these changes, here is the updated e1000 conve

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-22 Thread David Miller
From: David Miller <[EMAIL PROTECTED]> Date: Sat, 21 Jul 2007 20:54:25 -0700 (PDT) > Ok, I'll put the napi_struct info the driver private and respin > the patch. To facilitate discussion I converted the core and tg3, and include just that part of the patch below. Consequences: 1) rtnetlink and

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Sun, 22 Jul 2007 12:39:32 +1000 > But if netdev -> driver_private can be optimized, so can driver_private > -> netdev. We just don't have a wrapper for it. netdev_of() perhaps? > > (If it can't be implemented by ptr arith, we have to do some allocat

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread Rusty Russell
On Sat, 2007-07-21 at 18:59 -0700, David Miller wrote: > But note that you'd be adding a pointer deref, the current sequence: > > napi_struct --> netdev --> driver_private > > involves all pointer arithmetic and no derefs, whereas: > > napi_struct --> driver_private --> netdev > > will involve

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Sun, 22 Jul 2007 09:10:23 +1000 > In five years' time, the "napi_struct for simple drivers" in net_device > will look confusing. Since your change touches all NAPI drivers anyway, > it'd be nice to go straight to "everyone allocates their own NAPI > s

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread Rusty Russell
On Sat, 2007-07-21 at 11:54 -0700, David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Sat, 21 Jul 2007 18:00:11 +1000 > > > No, I was just thinking that drivers will put the napi_struct in their > > driver-specific struct (eg. struct e1000_adapter *adapter = > > container_of(con

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Sat, 21 Jul 2007 18:00:11 +1000 > No, I was just thinking that drivers will put the napi_struct in their > driver-specific struct (eg. struct e1000_adapter *adapter = > container_of(container_of(napi, struct e1000_adapter, napi);). That works. > Mu

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread Andi Kleen
David Miller <[EMAIL PROTECTED]> writes: > > Good candidates for taking advantage of multi-napi are: > > 1) e1000 > 2) ucc_geth > 3) ehea > 4) sunvnet s2io.c -Andi - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo i

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread Rusty Russell
On Sat, 2007-07-21 at 00:42 -0700, David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Sat, 21 Jul 2007 17:14:31 +1000 > > > This looks good! It might be nice though to go further and remove the > > internal napi_struct. It's kind of a wart for multi-queue drivers which > >

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Sat, 21 Jul 2007 17:14:31 +1000 > This looks good! It might be nice though to go further and remove the > internal napi_struct. It's kind of a wart for multi-queue drivers which > are going to have their own array (or whatever). I guess you're

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-21 Thread Rusty Russell
On Fri, 2007-07-20 at 22:31 -0700, David Miller wrote: > Stephen asked me if I could resurrect the last version of > his napi_poll patch that I posted a long time ago, I finally > got to that tonight. > > Basically, this disconnects the ->poll() object from the net > device. This will allow drive

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-20 Thread David Miller
From: Patrick McHardy <[EMAIL PROTECTED]> Date: Sat, 21 Jul 2007 07:46:39 +0200 > I believe the compat attribute should work fine. One thing thing > that is not explicitly supported as datatype, but works fine, is > lists of attributes (using nla_for_each_attr), which looks like a > good match for

Re: [PATCH]: Resurrect napi_poll patch.

2007-07-20 Thread Patrick McHardy
David Miller wrote: [ huge patch, not looked at it :) ] > One area for discussion is what to do about rtnetlink, it allows > setting the dev->napi.weight, but we need to extend it so it can > do something sane in multi-napi-per-netdev situations. I believe the compat attribute should work fine.