Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-29 Thread Jeff Garzik
David Miller wrote: From: PJ Waskiewicz <[EMAIL PROTECTED]> Date: Thu, 28 Jun 2007 09:21:13 -0700 -struct net_device *alloc_netdev(int sizeof_priv, const char *name, - void (*setup)(struct net_device *)) +struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, +

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread David Miller
From: PJ Waskiewicz <[EMAIL PROTECTED]> Date: Thu, 28 Jun 2007 09:21:13 -0700 > -struct net_device *alloc_netdev(int sizeof_priv, const char *name, > - void (*setup)(struct net_device *)) > +struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, > + void (*se

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread David Miller
From: "Waskiewicz Jr, Peter P" <[EMAIL PROTECTED]> Date: Thu, 28 Jun 2007 16:08:43 -0700 > Thanks Patrick for taking care of this. I am totally fine with this > patch; if anyone else has feedback, please send it. If not, I'm excited > to see if these can be considered for 2.6.23 now. :) Thanks

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >> > >> Looking at Peter's multiqueue patch, which should include all > >> hard_start_xmit users (I'm not seeing sch_teql though, > >> Peter?) the only other one is pktgen. > >> > > > > Ugh. That is another netif_queue_stopped() that needs > > netif_subqueu

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
_teql.c change and repost the core patch? I don't think you need to worry about that, the subqueue patch just follows the existing code. [CORE] Stack changes to add multiqueue hardware support API Add the multiqueue hardware device support API to the core network stack. Allow drivers t

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
/3] NET: [CORE] Stack changes to add > multiqueue hardware support API > > Jeff Garzik wrote: > > Patrick McHardy wrote: > > > >> Yes, but there are users that don't go through qdiscs, > like netpoll, > >> Having them check the QDISC_RUNNING bit seems

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread David Miller
From: Jeff Garzik <[EMAIL PROTECTED]> Date: Thu, 28 Jun 2007 15:32:40 -0400 > Patrick McHardy wrote: > > Yes, but there are users that don't go through qdiscs, like netpoll, > > Having them check the QDISC_RUNNING bit seems ugly. > > Is netpoll the only such user? > > netpoll tends to be a speci

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
Jeff Garzik wrote: > Patrick McHardy wrote: > >> Yes, but there are users that don't go through qdiscs, like netpoll, >> Having them check the QDISC_RUNNING bit seems ugly. > > > Is netpoll the only such user? I'm not sure, I just remembered that one :) Looking at Peter's multiqueue patch, whi

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Jeff Garzik
Patrick McHardy wrote: Yes, but there are users that don't go through qdiscs, like netpoll, Having them check the QDISC_RUNNING bit seems ugly. Is netpoll the only such user? netpoll tends to be a special case in every sense of the word, and I wish it was less so :/ Jeff - To unsu

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
Waskiewicz Jr, Peter P wrote: >>Waskiewicz Jr, Peter P wrote: >> >>Yes, I noticed that now. Doesn't seem right though as long as >>queueing while queue is stopped is treated as a bug by the >>drivers. >> >>But I vaguely recall seeing a discussion about this, I'll check >>the archives. > > > The b

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> Waskiewicz Jr, Peter P wrote: > >>Quick question: where are the sch_generic changes? :) > >> > >>If you hold for ten minutes I'll post a set of slightly changed > >>patches with the NETDEVICES_MULTIQUEUE option and a fix for this. > > > > > > Jamal's and KK's qdisc_restart() rewrite took the

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
Waskiewicz Jr, Peter P wrote: >>Quick question: where are the sch_generic changes? :) >> >>If you hold for ten minutes I'll post a set of slightly >>changed patches with the NETDEVICES_MULTIQUEUE option and a >>fix for this. > > > Jamal's and KK's qdisc_restart() rewrite took the netif_queue_st

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > include/linux/etherdevice.h |3 +- > > include/linux/netdevice.h | 62 > ++- > > include/linux/skbuff.h |4 ++- > > net/core/dev.c | 27 +-- > > net/core/netpoll.c |8 ++

[CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
r the !NETDEVICES_MULTIQUEUE case - move skb->iif and skb->queue_mapping next to the other packet scheduling related members - fix comment: the two byte hole in struct sk_buff is on both 32 and 64 bit [CORE] Stack changes to add multiqueue hardware support API Add the multiqueue hardware device sup

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
PJ Waskiewicz wrote: > include/linux/etherdevice.h |3 +- > include/linux/netdevice.h | 62 > ++- > include/linux/skbuff.h |4 ++- > net/core/dev.c | 27 +-- > net/core/netpoll.c |8 +++--- > net/

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread Patrick McHardy
PJ Waskiewicz wrote: Updated: Fixed allocation of subqueues in alloc_netdev_mq() to allocate all subqueues, not num - 1. Added checks for netif_subqueue_stopped() to netpoll, pktgen, and software device dev_queue_xmit(). This will ensure external events to these subsystems will be handled corre

[PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-28 Thread PJ Waskiewicz
Updated: Fixed allocation of subqueues in alloc_netdev_mq() to allocate all subqueues, not num - 1. Added checks for netif_subqueue_stopped() to netpoll, pktgen, and software device dev_queue_xmit(). This will ensure external events to these subsystems will be handled correctly if a subqueue is s

RE: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-25 Thread Waskiewicz Jr, Peter P
> > /* ensure 32-byte alignment of both the device and > private area */ > > - alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST) & > ~NETDEV_ALIGN_CONST; > > + alloc_size = (sizeof(*dev) + NETDEV_ALIGN_CONST + > > +(sizeof(struct net_device_subqueue) * > (queue_count - 1))

Re: [PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-24 Thread Patrick McHardy
PJ Waskiewicz wrote: > +struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, > + void (*setup)(struct net_device *), int queue_count) > { > void *p; > struct net_device *dev; > @@ -3361,7 +3368,9 @@ struct net_device *alloc_netdev(int sizeof_priv, const >

[PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-23 Thread PJ Waskiewicz
Updated: Added checks for netif_subqueue_stopped() to netpoll, pktgen, and software device dev_queue_xmit(). This will ensure external events to these subsystems will be handled correctly if a subqueue is shut down. Add the multiqueue hardware device support API to the core network stack. Allow

[PATCH 2/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-21 Thread PJ Waskiewicz
Add the multiqueue hardware device support API to the core network stack. Allow drivers to allocate multiple queues and manage them at the netdev level if they choose to do so. Added a new field to sk_buff, namely queue_mapping, for drivers to know which tx_ring to select based on OS classificati

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread Waskiewicz Jr, Peter P
> It's not being allocated at "compile time", it's being > allocated linearly into one block of ram in order to avoid > pointer derefs but it's still "dynamic" in that the size > isn't known until the alloc_netdev() call. > > We do this trick all over the networking, TCP sockets are 3 > or 4 d

Re: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread David Miller
From: "Waskiewicz Jr, Peter P" <[EMAIL PROTECTED]> Date: Tue, 19 Jun 2007 13:01:18 -0700 > I've been thinking about this more today, so please bear with me if I'm > missing something. Right now, with how qdisc_restart() is running, we'd > definitely call netif_subqueue_stopped(dev, skb->queue_map

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread Waskiewicz Jr, Peter P
> From: PJ Waskiewicz <[EMAIL PROTECTED]> > Date: Mon, 18 Jun 2007 11:42:29 -0700 > > > + > > + /* The TX queue control structures */ > > + struct net_device_subqueue *egress_subqueue; > > + int egress_subqueue_count; > > Since every net device will have at

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-19 Thread Waskiewicz Jr, Peter P
> From: PJ Waskiewicz <[EMAIL PROTECTED]> > Date: Mon, 18 Jun 2007 11:42:29 -0700 > > > + > > + /* The TX queue control structures */ > > + struct net_device_subqueue *egress_subqueue; > > + int egress_subqueue_count; > > Since every net device will have at

Re: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-18 Thread David Miller
From: PJ Waskiewicz <[EMAIL PROTECTED]> Date: Mon, 18 Jun 2007 11:42:29 -0700 > + > + /* The TX queue control structures */ > + struct net_device_subqueue *egress_subqueue; > + int egress_subqueue_count; Since every net device will have at least one su

Re: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-18 Thread Patrick McHardy
Waskiewicz Jr, Peter P wrote: /* Functions used for multicast support */ diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e7367c7..8bcd870 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -215,6 +215,7 @@ typedef unsigned char *sk_buff_data_t; * @pk

RE: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-18 Thread Waskiewicz Jr, Peter P
> PJ Waskiewicz wrote: > > Add the multiqueue hardware device support API to the core network > > stack. Allow drivers to allocate multiple queues and > manage them at > > the netdev level if they choose to do so. > > > > Should be 2/3 and qdisc changes should be 3/3. Well actually > the q

Re: [PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-18 Thread Patrick McHardy
PJ Waskiewicz wrote: Add the multiqueue hardware device support API to the core network stack. Allow drivers to allocate multiple queues and manage them at the netdev level if they choose to do so. Should be 2/3 and qdisc changes should be 3/3. Well actually the qdisc sch_generic changes b

[PATCH 3/3] NET: [CORE] Stack changes to add multiqueue hardware support API

2007-06-18 Thread PJ Waskiewicz
Add the multiqueue hardware device support API to the core network stack. Allow drivers to allocate multiple queues and manage them at the netdev level if they choose to do so. Signed-off-by: Peter P Waskiewicz Jr <[EMAIL PROTECTED]> --- include/linux/etherdevice.h |3 +- include/linux/netd