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 at least on deref to get to the netdev from the
> driver_private.
> 
> (Ignore the fact that netdev_priv() is not currently optimized
>  as it used to be, that's an abberation of the current multi-queue
>  implementation and will be fixed).
> 
> So this suggestion does have real downsides.

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 allocation
tricks to hide the dev ptr before driver_private, but it's still
implementable).

Perhaps we should do this anyway: it's another "every driver wants it"
kind of deal AFAICT...

Cheers,
Rusty.


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to