diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:33:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:33:18 -0400 |
commit | 4dd9ec4946b4651a295d3bc8df9c15ac692a8f4e (patch) | |
tree | afb300c752de7175bb2df4722d5c857e070c75d9 /Documentation/networking/multiqueue.txt | |
parent | 86ed5a93b8b56e4e0877b914af0e10883a196384 (diff) | |
parent | 6861ff35ec5b60fafaf8651754c9a75142bfa9a4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1075 commits)
myri10ge: update driver version number to 1.4.3-1.369
r8169: add shutdown handler
r8169: preliminary 8168d support
r8169: support additional 8168cp chipset
r8169: change default behavior for mildly identified 8168c chipsets
r8169: add a new 8168cp flavor
r8169: add a new 8168c flavor (bis)
r8169: add a new 8168c flavor
r8169: sync existing 8168 device hardware start sequences with vendor driver
r8169: 8168b Tx performance tweak
r8169: make room for more specific 8168 hardware start procedure
r8169: shuffle some registers handling around (8168 operation only)
r8169: new phy init parameters for the 8168b
r8169: update phy init parameters
r8169: wake up the PHY of the 8168
af_key: fix SADB_X_SPDDELETE response
ath9k: Fix return code when ath9k_hw_setpower() fails on reset
ath9k: remove nasty FAIL macro from ath9k_hw_reset()
gre: minor cleanups in netlink interface
gre: fix copy and paste error
...
Diffstat (limited to 'Documentation/networking/multiqueue.txt')
-rw-r--r-- | Documentation/networking/multiqueue.txt | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/Documentation/networking/multiqueue.txt b/Documentation/networking/multiqueue.txt index d391ea631141..4caa0e314cc2 100644 --- a/Documentation/networking/multiqueue.txt +++ b/Documentation/networking/multiqueue.txt | |||
@@ -24,4 +24,56 @@ netif_{start|stop|wake}_subqueue() functions to manage each queue while the | |||
24 | device is still operational. netdev->queue_lock is still used when the device | 24 | device is still operational. netdev->queue_lock is still used when the device |
25 | comes online or when it's completely shut down (unregister_netdev(), etc.). | 25 | comes online or when it's completely shut down (unregister_netdev(), etc.). |
26 | 26 | ||
27 | Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com> | 27 | |
28 | Section 2: Qdisc support for multiqueue devices | ||
29 | |||
30 | ----------------------------------------------- | ||
31 | |||
32 | Currently two qdiscs are optimized for multiqueue devices. The first is the | ||
33 | default pfifo_fast qdisc. This qdisc supports one qdisc per hardware queue. | ||
34 | A new round-robin qdisc, sch_multiq also supports multiple hardware queues. The | ||
35 | qdisc is responsible for classifying the skb's and then directing the skb's to | ||
36 | bands and queues based on the value in skb->queue_mapping. Use this field in | ||
37 | the base driver to determine which queue to send the skb to. | ||
38 | |||
39 | sch_multiq has been added for hardware that wishes to avoid head-of-line | ||
40 | blocking. It will cycle though the bands and verify that the hardware queue | ||
41 | associated with the band is not stopped prior to dequeuing a packet. | ||
42 | |||
43 | On qdisc load, the number of bands is based on the number of queues on the | ||
44 | hardware. Once the association is made, any skb with skb->queue_mapping set, | ||
45 | will be queued to the band associated with the hardware queue. | ||
46 | |||
47 | |||
48 | Section 3: Brief howto using MULTIQ for multiqueue devices | ||
49 | --------------------------------------------------------------- | ||
50 | |||
51 | The userspace command 'tc,' part of the iproute2 package, is used to configure | ||
52 | qdiscs. To add the MULTIQ qdisc to your network device, assuming the device | ||
53 | is called eth0, run the following command: | ||
54 | |||
55 | # tc qdisc add dev eth0 root handle 1: multiq | ||
56 | |||
57 | The qdisc will allocate the number of bands to equal the number of queues that | ||
58 | the device reports, and bring the qdisc online. Assuming eth0 has 4 Tx | ||
59 | queues, the band mapping would look like: | ||
60 | |||
61 | band 0 => queue 0 | ||
62 | band 1 => queue 1 | ||
63 | band 2 => queue 2 | ||
64 | band 3 => queue 3 | ||
65 | |||
66 | Traffic will begin flowing through each queue based on either the simple_tx_hash | ||
67 | function or based on netdev->select_queue() if you have it defined. | ||
68 | |||
69 | The behavior of tc filters remains the same. However a new tc action, | ||
70 | skbedit, has been added. Assuming you wanted to route all traffic to a | ||
71 | specific host, for example 192.168.0.3, through a specific queue you could use | ||
72 | this action and establish a filter such as: | ||
73 | |||
74 | tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \ | ||
75 | match ip dst 192.168.0.3 \ | ||
76 | action skbedit queue_mapping 3 | ||
77 | |||
78 | Author: Alexander Duyck <alexander.h.duyck@intel.com> | ||
79 | Original Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com> | ||