Re: [PATCH 1/2] NET: Multiple queue network device support

Previous thread: [KJ][RFC][PATCH] BIT macro cleanup by Milind Choudhary on Friday, February 23, 2007 - 1:14 am. (19 messages)

Next thread: RE: [PATCH 1/2] NET: Multiple queue network device support by Sreenivasa Honnur on Friday, February 23, 2007 - 2:02 am. (1 message)
From: Sreenivasa Honnur
Date: Friday, February 23, 2007 - 2:00 am

Fucntion "map_queue" returns queue index as '0'. There is no support to
return different queue indexes.

-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
On Behalf Of Kok, Auke
Sent: Friday, February 09, 2007 5:40 AM
To: David Miller; Garzik, Jeff; netdev@vger.kernel.org;
linux-kernel@vger.kernel.org
Cc: Kok, Auke; Peter Waskiewicz Jr; Brandeburg, Jesse; Kok, Auke;
Ronciak, John
Subject: [PATCH 1/2] NET: Multiple queue network device support


From: Peter Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

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 <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 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
2e37f50..c7f94a8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -106,6 +106,16 @@ struct netpoll_info;  #define MAX_HEADER
(LL_MAX_HEADER + 48)  #endif
 
+#ifdef CONFIG_NET_MULTI_QUEUE_DEVICE
+
+struct net_device_subqueue
+{
+	/* Give a lock and a flow control state for each queue */
+	unsigned long	state;
+	spinlock_t	queue_lock ____cacheline_aligned_in_smp;
+};
+#endif
+
 /*
  *	Network device statistics. Akin to the 2.0 ether stats ...
From: Waskiewicz Jr, Peter P
Date: Friday, February 23, 2007 - 12:05 pm

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,

-

From: Stephen Hemminger
Date: Friday, February 23, 2007 - 12:19 pm

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 <shemminger@linux-foundation.org>
-

From: Kok, Auke
Date: Friday, February 23, 2007 - 12:23 pm

perhaps when it's stable, yes, but right now it's definately experimental and 
may result in a slight overhead for single-queue devices as the text reads.


Cheers,

Auke
-

Previous thread: [KJ][RFC][PATCH] BIT macro cleanup by Milind Choudhary on Friday, February 23, 2007 - 1:14 am. (19 messages)

Next thread: RE: [PATCH 1/2] NET: Multiple queue network device support by Sreenivasa Honnur on Friday, February 23, 2007 - 2:02 am. (1 message)