From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Fri, 17 Aug 2007 15:40:22 -0700
> Compile tested only!!! Obviously. The first loopback transmit is guarenteed to crash. > Fix optimization of netdev_priv() lost by the addition of multiqueue. > Move the variable size subqueues to after the constant size priv area. > > When putting back the old netdev_priv() code, I tried to make it > clearer by using roundup() and ALIGN() macros. > > --- a/include/linux/netdevice.h 2007-08-17 12:08:51.000000000 -0400 > +++ b/include/linux/netdevice.h 2007-08-17 12:48:03.000000000 -0400 > @@ -575,16 +575,15 @@ struct net_device > > /* The TX queue control structures */ > unsigned int egress_subqueue_count; > - struct net_device_subqueue egress_subqueue[1]; > + struct net_device_subqueue *egress_subqueue; > }; This just trades off the dev->priv dereference for a dev->egress_subqueue dereference. I bet they occur about equally in the data paths, at least on transmit. And this also breaks loopback again, which uses a static struct netdev in the kernel image, it doesn't use alloc_netdev(), so egress_subqueue of loopback will be NULL. - 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