Fucntion "map_queue" returns queue index as '0'. There is no support to
return different queue indexes.
From: email@example.com [mailto:firstname.lastname@example.org]
On Behalf Of Kok, Auke
Sent: Friday, February 09, 2007 5:40 AM
To: David Miller; Garzik, Jeff; email@example.com;
Cc: Kok, Auke; Peter Waskiewicz Jr; Brandeburg, Jesse; Kok, Auke;
Subject: [PATCH 1/2] NET: Multiple queue network device support
From: Peter Waskiewicz Jr <firstname.lastname@example.org>
Added an API and associated supporting routines for multiqueue network
devices. This allows network devices supporting multiple TX queues to
configure each queue within the netdevice and manage each queue
independantly. Changes to the PRIO Qdisc also allow a user to map
multiple flows to individual TX queues, taking advantage of each queue
on the device.
Signed-off-by: Peter Waskiewicz Jr <email@example.com>
Signed-off-by: Auke Kok <firstname.lastname@example.org>
include/linux/netdevice.h | 73 ++++++++++++++++++++++++++++
include/net/sch_generic.h | 3 +
net/Kconfig | 20 ++++++++
net/core/dev.c | 51 ++++++++++++++++++++
net/sched/sch_generic.c | 117
net/sched/sch_prio.c | 106
6 files changed, 364 insertions(+), 6 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index
@@ -106,6 +106,16 @@ struct netpoll_info; #define MAX_HEADER
(LL_MAX_HEADER + 48) #endif
+ /* Give a lock and a flow control state for each queue */
+ unsigned long state;
+ spinlock_t queue_lock ____cacheline_aligned_in_smp;
* Network device statistics. Akin to the 2.0 ether stats ...
map_queue will always return 0 in the pfifo_fast Qdisc. This is because
pfifo_fast is the default scheduler when a device is brought up. I
didn't want to make any assumptions about a device's functionality, so
using queue 0 seems the least dangerous.
However, in the prio qdisc, there is a small problem with the queue to
band assignment logic. If you have the same number of bands as queues
(e.g. 4 prio bands and 4 Tx queues), then you will have all bands
assigned to queue 0. I have a fix for that, which I plan to send when I
finish up a documentation piece for this patch's repost.
Thanks for the feedback,
On Fri, 23 Feb 2007 04:00:55 -0500
This should not be a user visible configuration option.
It should either: always be part of the kernel API
or be selected by drivers that need/want it.
Stephen Hemminger <email@example.com>