Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: networking: convert multiqueue.txt to ReST

- add SPDX header;
- adjust titles and chapters, adding proper markups;
- mark code blocks and literals as such;
- use :field: markup;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mauro Carvalho Chehab and committed by
David S. Miller
e98aa682 e14fd64d

+22 -22
+1 -1
Documentation/networking/bonding.rst
··· 1639 1639 using the traffic control utilities inherent in linux. 1640 1640 1641 1641 By default the bonding driver is multiqueue aware and 16 queues are created 1642 - when the driver initializes (see Documentation/networking/multiqueue.txt 1642 + when the driver initializes (see Documentation/networking/multiqueue.rst 1643 1643 for details). If more or less queues are desired the module parameter 1644 1644 tx_queues can be used to change this value. There is no sysfs parameter 1645 1645 available as the allocation is done at module init time.
+1
Documentation/networking/index.rst
··· 79 79 ltpc 80 80 mac80211-injection 81 81 mpls-sysctl 82 + multiqueue 82 83 83 84 .. only:: subproject and html 84 85
+20 -21
Documentation/networking/multiqueue.txt Documentation/networking/multiqueue.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 1 2 2 - HOWTO for multiqueue network device support 3 - =========================================== 3 + =========================================== 4 + HOWTO for multiqueue network device support 5 + =========================================== 4 6 5 7 Section 1: Base driver requirements for implementing multiqueue support 8 + ======================================================================= 6 9 7 10 Intro: Kernel support for multiqueue devices 8 11 --------------------------------------------------------- 9 12 10 13 Kernel support for multiqueue devices is always present. 11 - 12 - Section 1: Base driver requirements for implementing multiqueue support 13 - ----------------------------------------------------------------------- 14 14 15 15 Base drivers are required to use the new alloc_etherdev_mq() or 16 16 alloc_netdev_mq() functions to allocate the subqueues for the device. The ··· 26 26 27 27 28 28 Section 2: Qdisc support for multiqueue devices 29 - 30 - ----------------------------------------------- 29 + =============================================== 31 30 32 31 Currently two qdiscs are optimized for multiqueue devices. The first is the 33 32 default pfifo_fast qdisc. This qdisc supports one qdisc per hardware queue. ··· 45 46 46 47 47 48 Section 3: Brief howto using MULTIQ for multiqueue devices 48 - --------------------------------------------------------------- 49 + ========================================================== 49 50 50 51 The userspace command 'tc,' part of the iproute2 package, is used to configure 51 52 qdiscs. To add the MULTIQ qdisc to your network device, assuming the device 52 - is called eth0, run the following command: 53 + is called eth0, run the following command:: 53 54 54 - # tc qdisc add dev eth0 root handle 1: multiq 55 + # tc qdisc add dev eth0 root handle 1: multiq 55 56 56 57 The qdisc will allocate the number of bands to equal the number of queues that 57 58 the device reports, and bring the qdisc online. Assuming eth0 has 4 Tx 58 - queues, the band mapping would look like: 59 + queues, the band mapping would look like:: 59 60 60 - band 0 => queue 0 61 - band 1 => queue 1 62 - band 2 => queue 2 63 - band 3 => queue 3 61 + band 0 => queue 0 62 + band 1 => queue 1 63 + band 2 => queue 2 64 + band 3 => queue 3 64 65 65 66 Traffic will begin flowing through each queue based on either the simple_tx_hash 66 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, 69 70 skbedit, has been added. Assuming you wanted to route all traffic to a 70 71 specific host, for example 192.168.0.3, through a specific queue you could use 71 - this action and establish a filter such as: 72 + this action and establish a filter such as:: 72 73 73 - tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \ 74 - match ip dst 192.168.0.3 \ 75 - action skbedit queue_mapping 3 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 76 77 77 - Author: Alexander Duyck <alexander.h.duyck@intel.com> 78 - Original Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com> 78 + :Author: Alexander Duyck <alexander.h.duyck@intel.com> 79 + :Original Author: Peter P. Waskiewicz Jr. <peter.p.waskiewicz.jr@intel.com>