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, +

[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

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

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 +++---

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_stopped()

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: 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 basic gist is

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

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, which

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 special case in

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_subqueue_stopped(). I can

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 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

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))) Why

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 char

[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