aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/multiqueue.txt
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2008-09-12 19:29:34 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-12 19:29:34 -0400
commit92651940ab00dbe64722e908f70d816713d677b7 (patch)
treeb68fdef99784bfa46b67aabaf70c19b0e5e0a144 /Documentation/networking/multiqueue.txt
parent78d15e82754945ee9821fb491b57faf43abfb9d7 (diff)
pkt_sched: Add multiqueue scheduler support
This patch is intended to add a qdisc to support the new tx multiqueue architecture by providing a band for each hardware queue. By doing this it is possible to support a different qdisc per physical hardware queue. This qdisc uses the skb->queue_mapping to select which band to place the traffic onto. It then uses a round robin w/ a check to see if the subqueue is stopped to determine which band to dequeue the packet from. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/multiqueue.txt')
-rw-r--r--Documentation/networking/multiqueue.txt47
1 files changed, 46 insertions, 1 deletions
diff --git a/Documentation/networking/multiqueue.txt b/Documentation/networking/multiqueue.txt
index d391ea631141..5787ee6eca4f 100644
--- a/Documentation/networking/multiqueue.txt
+++ b/Documentation/networking/multiqueue.txt
@@ -24,4 +24,49 @@ netif_{start|stop|wake}_subqueue() functions to manage each queue while the
24device is still operational. netdev->queue_lock is still used when the device 24device is still operational. netdev->queue_lock is still used when the device
25comes online or when it's completely shut down (unregister_netdev(), etc.). 25comes online or when it's completely shut down (unregister_netdev(), etc.).
26 26
27Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com> 27
28Section 2: Qdisc support for multiqueue devices
29
30-----------------------------------------------
31
32Currently two qdiscs support multiqueue devices. The first is the default
33pfifo_fast qdisc. This qdisc supports one qdisc per hardware queue. A new
34round-robin qdisc, sch_multiq also supports multiple hardware queues. The
35qdisc is responsible for classifying the skb's and then directing the skb's to
36bands and queues based on the value in skb->queue_mapping. Use this field in
37the base driver to determine which queue to send the skb to.
38
39sch_multiq has been added for hardware that wishes to avoid unnecessary
40requeuing. It will cycle though the bands and verify that the hardware queue
41associated with the band is not stopped prior to dequeuing a packet.
42
43On qdisc load, the number of bands is based on the number of queues on the
44hardware. Once the association is made, any skb with skb->queue_mapping set,
45will be queued to the band associated with the hardware queue.
46
47
48Section 3: Brief howto using MULTIQ for multiqueue devices
49---------------------------------------------------------------
50
51The userspace command 'tc,' part of the iproute2 package, is used to configure
52qdiscs. To add the MULTIQ qdisc to your network device, assuming the device
53is called eth0, run the following command:
54
55# tc qdisc add dev eth0 root handle 1: multiq
56
57The qdisc will allocate the number of bands to equal the number of queues that
58the device reports, and bring the qdisc online. Assuming eth0 has 4 Tx
59queues, the band mapping would look like:
60
61band 0 => queue 0
62band 1 => queue 1
63band 2 => queue 2
64band 3 => queue 3
65
66Traffic will begin flowing through each queue if your base device has either
67the default simple_tx_hash or a custom netdev->select_queue() defined.
68
69The behavior of tc filters remains the same.
70
71Author: Alexander Duyck <alexander.h.duyck@intel.com>
72Original Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com>