xref: /linux/Documentation/networking/scaling.rst (revision 70c29b35fd87f87a7b8dad6eb8d55ce54a0d549a)
1.. SPDX-License-Identifier: GPL-2.0
2
3=====================================
4Scaling in the Linux Networking Stack
5=====================================
6
7
8Introduction
9============
10
11This document describes a set of complementary techniques in the Linux
12networking stack to increase parallelism and improve performance for
13multi-processor systems.
14
15The following technologies are described:
16
17- RSS: Receive Side Scaling
18- RPS: Receive Packet Steering
19- RFS: Receive Flow Steering
20- Accelerated Receive Flow Steering
21- XPS: Transmit Packet Steering
22
23
24RSS: Receive Side Scaling
25=========================
26
27Contemporary NICs support multiple receive and transmit descriptor queues
28(multi-queue). On reception, a NIC can send different packets to different
29queues to distribute processing among CPUs. The NIC distributes packets by
30applying a filter to each packet that assigns it to one of a small number
31of logical flows. Packets for each flow are steered to a separate receive
32queue, which in turn can be processed by separate CPUs. This mechanism is
33generally known as “Receive-side Scaling” (RSS). The goal of RSS and
34the other scaling techniques is to increase performance uniformly.
35Multi-queue distribution can also be used for traffic prioritization, but
36that is not the focus of these techniques.
37
38The filter used in RSS is typically a hash function over the network
39and/or transport layer headers-- for example, a 4-tuple hash over
40IP addresses and TCP ports of a packet. The most common hardware
41implementation of RSS uses an indirection table where each entry
42stores a queue number. The receive queue for a packet is determined
43by indexing the indirection table with the low order bits of the
44computed hash for the packet (usually a Toeplitz hash).
45
46The indirection table helps even out the traffic distribution when queue
47count is not a power of two. NICs should provide an indirection table
48at least 4 times larger than the queue count. 4x table results in ~16%
49imbalance between the queues, which is acceptable for most applications.
50
51The Toeplitz hash is linear over GF(2), so the quality of the hash key
52matters as much as its randomness. For a key made of uniformly random
53bytes, the q lowest order bits of a given header field fail to spread
54flows over all 2^q queues with probability 1/2, and a burst of connections
55picking nearly consecutive ephemeral ports then lands on a fraction of the
56queues while the others stay idle. The netdev_rss_key_fill() helper draws
57a random key that is free of this defect; drivers should use it rather
58than seeding a key of their own.
59
60Some NICs support symmetric RSS hashing where, if the IP (source address,
61destination address) and TCP/UDP (source port, destination port) tuples
62are swapped, the computed hash is the same. This is beneficial in some
63applications that monitor TCP/IP flows (IDS, firewalls, ...etc) and need
64both directions of the flow to land on the same Rx queue (and CPU). The
65"Symmetric-XOR" and "Symmetric-OR-XOR" are types of RSS algorithms that
66achieve this hash symmetry by XOR/ORing the input source and destination
67fields of the IP and/or L4 protocols. This, however, results in reduced
68input entropy and could potentially be exploited.
69
70Specifically, the "Symmetric-XOR" algorithm XORs the input
71as follows::
72
73    # (SRC_IP ^ DST_IP, SRC_IP ^ DST_IP, SRC_PORT ^ DST_PORT, SRC_PORT ^ DST_PORT)
74
75The "Symmetric-OR-XOR" algorithm, on the other hand, transforms the input as
76follows::
77
78    # (SRC_IP | DST_IP, SRC_IP ^ DST_IP, SRC_PORT | DST_PORT, SRC_PORT ^ DST_PORT)
79
80The result is then fed to the underlying RSS algorithm.
81
82Some advanced NICs allow steering packets to queues based on
83programmable filters. For example, webserver bound TCP port 80 packets
84can be directed to their own receive queue. Such “n-tuple” filters can
85be configured from ethtool (--config-ntuple).
86
87
88RSS Configuration
89-----------------
90
91The driver for a multi-queue capable NIC typically provides a kernel
92module parameter for specifying the number of hardware queues to
93configure. In the bnx2x driver, for instance, this parameter is called
94num_queues. A typical RSS configuration would be to have one receive queue
95for each CPU if the device supports enough queues, or otherwise at least
96one for each memory domain, where a memory domain is a set of CPUs that
97share a particular memory level (L1, L2, NUMA node, etc.).
98
99The indirection table of an RSS device, which resolves a queue by masked
100hash, is usually programmed by the driver at initialization. The
101default mapping is to distribute the queues evenly in the table, but the
102indirection table can be retrieved and modified at runtime using ethtool
103commands (--show-rxfh-indir and --set-rxfh-indir). Modifying the
104indirection table could be done to give different queues different
105relative weights.
106
107
108RSS IRQ Configuration
109~~~~~~~~~~~~~~~~~~~~~
110
111Each receive queue has a separate IRQ associated with it. The NIC triggers
112this to notify a CPU when new packets arrive on the given queue. The
113signaling path for PCIe devices uses message signaled interrupts (MSI-X),
114that can route each interrupt to a particular CPU. The active mapping
115of queues to IRQs can be determined from /proc/interrupts. By default,
116an IRQ may be handled on any CPU. Because a non-negligible part of packet
117processing takes place in receive interrupt handling, it is advantageous
118to spread receive interrupts between CPUs. To manually adjust the IRQ
119affinity of each interrupt see Documentation/core-api/irq/irq-affinity.rst. Some systems
120will be running irqbalance, a daemon that dynamically optimizes IRQ
121assignments and as a result may override any manual settings.
122
123
124Suggested Configuration
125~~~~~~~~~~~~~~~~~~~~~~~
126
127RSS should be enabled when latency is a concern or whenever receive
128interrupt processing forms a bottleneck. Spreading load between CPUs
129decreases queue length. For low latency networking, the optimal setting
130is to allocate as many queues as there are CPUs in the system (or the
131NIC maximum, if lower). The most efficient high-rate configuration
132is likely the one with the smallest number of receive queues where no
133receive queue overflows due to a saturated CPU, because in default
134mode with interrupt coalescing enabled, the aggregate number of
135interrupts (and thus work) grows with each additional queue.
136
137Per-cpu load can be observed using the mpstat utility, but note that on
138processors with hyperthreading (HT), each hyperthread is represented as
139a separate CPU. For interrupt handling, HT has shown no benefit in
140initial tests, so limit the number of queues to the number of CPU cores
141in the system.
142
143Dedicated RSS contexts
144~~~~~~~~~~~~~~~~~~~~~~
145
146Modern NICs support creating multiple co-existing RSS configurations
147which are selected based on explicit matching rules. This can be very
148useful when application wants to constrain the set of queues receiving
149traffic for e.g. a particular destination port or IP address.
150The example below shows how to direct all traffic to TCP port 22
151to queues 0 and 1.
152
153To create an additional RSS context use::
154
155  # ethtool -X eth0 hfunc toeplitz context new
156  New RSS context is 1
157
158Kernel reports back the ID of the allocated context (the default, always
159present RSS context has ID of 0). The new context can be queried and
160modified using the same APIs as the default context::
161
162  # ethtool -x eth0 context 1
163  RX flow hash indirection table for eth0 with 13 RX ring(s):
164    0:      0     1     2     3     4     5     6     7
165    8:      8     9    10    11    12     0     1     2
166  [...]
167  # ethtool -X eth0 equal 2 context 1
168  # ethtool -x eth0 context 1
169  RX flow hash indirection table for eth0 with 13 RX ring(s):
170    0:      0     1     0     1     0     1     0     1
171    8:      0     1     0     1     0     1     0     1
172  [...]
173
174To make use of the new context direct traffic to it using an n-tuple
175filter::
176
177  # ethtool -N eth0 flow-type tcp6 dst-port 22 context 1
178  Added rule with ID 1023
179
180When done, remove the context and the rule::
181
182  # ethtool -N eth0 delete 1023
183  # ethtool -X eth0 context 1 delete
184
185
186RPS: Receive Packet Steering
187============================
188
189Receive Packet Steering (RPS) is logically a software implementation of
190RSS. Being in software, it is necessarily called later in the datapath.
191Whereas RSS selects the queue and hence CPU that will run the hardware
192interrupt handler, RPS selects the CPU to perform protocol processing
193above the interrupt handler. This is accomplished by placing the packet
194on the desired CPU’s backlog queue and waking up the CPU for processing.
195RPS has some advantages over RSS:
196
1971) it can be used with any NIC
1982) software filters can easily be added to hash over new protocols
1993) it does not increase hardware device interrupt rate (although it does
200   introduce inter-processor interrupts (IPIs))
201
202RPS is called during bottom half of the receive interrupt handler, when
203a driver sends a packet up the network stack with netif_rx() or
204netif_receive_skb(). These call the get_rps_cpu() function, which
205selects the queue that should process a packet.
206
207The first step in determining the target CPU for RPS is to calculate a
208flow hash over the packet’s addresses or ports (2-tuple or 4-tuple hash
209depending on the protocol). This serves as a consistent hash of the
210associated flow of the packet. The hash is either provided by hardware
211or will be computed in the stack. Capable hardware can pass the hash in
212the receive descriptor for the packet; this would usually be the same
213hash used for RSS (e.g. computed Toeplitz hash). The hash is saved in
214skb->hash and can be used elsewhere in the stack as a hash of the
215packet’s flow.
216
217Each receive hardware queue has an associated list of CPUs to which
218RPS may enqueue packets for processing. For each received packet,
219an index into the list is computed from the flow hash modulo the size
220of the list. The indexed CPU is the target for processing the packet,
221and the packet is queued to the tail of that CPU’s backlog queue. At
222the end of the bottom half routine, IPIs are sent to any CPUs for which
223packets have been queued to their backlog queue. The IPI wakes backlog
224processing on the remote CPU, and any queued packets are then processed
225up the networking stack.
226
227
228RPS Configuration
229-----------------
230
231RPS requires a kernel compiled with the CONFIG_RPS kconfig symbol (on
232by default for SMP). Even when compiled in, RPS remains disabled until
233explicitly configured. The list of CPUs to which RPS may forward traffic
234can be configured for each receive queue using a sysfs file entry::
235
236  /sys/class/net/<dev>/queues/rx-<n>/rps_cpus
237
238This file implements a bitmap of CPUs. RPS is disabled when it is zero
239(the default), in which case packets are processed on the interrupting
240CPU. Documentation/core-api/irq/irq-affinity.rst explains how CPUs are assigned to
241the bitmap.
242
243
244Suggested Configuration
245~~~~~~~~~~~~~~~~~~~~~~~
246
247For a single queue device, a typical RPS configuration would be to set
248the rps_cpus to the CPUs in the same memory domain of the interrupting
249CPU. If NUMA locality is not an issue, this could also be all CPUs in
250the system. At high interrupt rate, it might be wise to exclude the
251interrupting CPU from the map since that already performs much work.
252
253For a multi-queue system, if RSS is configured so that a hardware
254receive queue is mapped to each CPU, then RPS is probably redundant
255and unnecessary. If there are fewer hardware queues than CPUs, then
256RPS might be beneficial if the rps_cpus for each queue are the ones that
257share the same memory domain as the interrupting CPU for that queue.
258
259
260RPS Flow Limit
261--------------
262
263RPS scales kernel receive processing across CPUs without introducing
264reordering. The trade-off to sending all packets from the same flow
265to the same CPU is CPU load imbalance if flows vary in packet rate.
266In the extreme case a single flow dominates traffic. Especially on
267common server workloads with many concurrent connections, such
268behavior indicates a problem such as a misconfiguration or spoofed
269source Denial of Service attack.
270
271Flow Limit is an optional RPS feature that prioritizes small flows
272during CPU contention by dropping packets from large flows slightly
273ahead of those from small flows. It is active only when an RPS or RFS
274destination CPU approaches saturation.  Once a CPU's input packet
275queue exceeds half the maximum queue length (as set by sysctl
276net.core.netdev_max_backlog), the kernel starts a per-flow packet
277count over the last 256 packets. If a flow exceeds a set ratio (by
278default, half) of these packets when a new packet arrives, then the
279new packet is dropped. Packets from other flows are still only
280dropped once the input packet queue reaches netdev_max_backlog.
281No packets are dropped when the input packet queue length is below
282the threshold, so flow limit does not sever connections outright:
283even large flows maintain connectivity.
284
285
286Interface
287~~~~~~~~~
288
289Flow limit is compiled in by default (CONFIG_NET_FLOW_LIMIT), but not
290turned on. It is implemented for each CPU independently (to avoid lock
291and cache contention) and toggled per CPU by setting the relevant bit
292in sysctl net.core.flow_limit_cpu_bitmap. It exposes the same CPU
293bitmap interface as rps_cpus (see above) when called from procfs::
294
295  /proc/sys/net/core/flow_limit_cpu_bitmap
296
297Per-flow rate is calculated by hashing each packet into a hashtable
298bucket and incrementing a per-bucket counter. The hash function is
299the same that selects a CPU in RPS, but as the number of buckets can
300be much larger than the number of CPUs, flow limit has finer-grained
301identification of large flows and fewer false positives. The default
302table has 4096 buckets. This value can be modified through sysctl::
303
304  net.core.flow_limit_table_len
305
306The value is only consulted when a new table is allocated. Modifying
307it does not update active tables.
308
309
310Suggested Configuration
311~~~~~~~~~~~~~~~~~~~~~~~
312
313Flow limit is useful on systems with many concurrent connections,
314where a single connection taking up 50% of a CPU indicates a problem.
315In such environments, enable the feature on all CPUs that handle
316network rx interrupts (as set in /proc/irq/N/smp_affinity).
317
318The feature depends on the input packet queue length to exceed
319the flow limit threshold (50%) + the flow history length (256).
320Setting net.core.netdev_max_backlog to either 1000 or 10000
321performed well in experiments.
322
323
324RFS: Receive Flow Steering
325==========================
326
327While RPS steers packets solely based on hash, and thus generally
328provides good load distribution, it does not take into account
329application locality. This is accomplished by Receive Flow Steering
330(RFS). The goal of RFS is to increase datacache hitrate by steering
331kernel processing of packets to the CPU where the application thread
332consuming the packet is running. RFS relies on the same RPS mechanisms
333to enqueue packets onto the backlog of another CPU and to wake up that
334CPU.
335
336In RFS, packets are not forwarded directly by the value of their hash,
337but the hash is used as index into a flow lookup table. This table maps
338flows to the CPUs where those flows are being processed. The flow hash
339(see RPS section above) is used to calculate the index into this table.
340The CPU recorded in each entry is the one which last processed the flow.
341If an entry does not hold a valid CPU, then packets mapped to that entry
342are steered using plain RPS. Multiple table entries may point to the
343same CPU. Indeed, with many flows and few CPUs, it is very likely that
344a single application thread handles flows with many different flow hashes.
345
346rps_sock_flow_table is a global flow table that contains the *desired* CPU
347for flows: the CPU that is currently processing the flow in userspace.
348Each table value is a CPU index that is updated during calls to recvmsg
349and sendmsg (specifically, inet_recvmsg(), inet_sendmsg() and
350tcp_splice_read()).
351
352When the scheduler moves a thread to a new CPU while it has outstanding
353receive packets on the old CPU, packets may arrive out of order. To
354avoid this, RFS uses a second flow table to track outstanding packets
355for each flow: rps_dev_flow_table is a table specific to each hardware
356receive queue of each device. Each table value stores a CPU index and a
357counter. The CPU index represents the *current* CPU onto which packets
358for this flow are enqueued for further kernel processing. Ideally, kernel
359and userspace processing occur on the same CPU, and hence the CPU index
360in both tables is identical. This is likely false if the scheduler has
361recently migrated a userspace thread while the kernel still has packets
362enqueued for kernel processing on the old CPU.
363
364The counter in rps_dev_flow_table values records the length of the current
365CPU's backlog when a packet in this flow was last enqueued. Each backlog
366queue has a head counter that is incremented on dequeue. A tail counter
367is computed as head counter + queue length. In other words, the counter
368in rps_dev_flow[i] records the last element in flow i that has
369been enqueued onto the currently designated CPU for flow i (of course,
370entry i is actually selected by hash and multiple flows may hash to the
371same entry i).
372
373And now the trick for avoiding out of order packets: when selecting the
374CPU for packet processing (from get_rps_cpu()) the rps_sock_flow table
375and the rps_dev_flow table of the queue that the packet was received on
376are compared. If the desired CPU for the flow (found in the
377rps_sock_flow table) matches the current CPU (found in the rps_dev_flow
378table), the packet is enqueued onto that CPU’s backlog. If they differ,
379the current CPU is updated to match the desired CPU if one of the
380following is true:
381
382  - The current CPU's queue head counter >= the recorded tail counter
383    value in rps_dev_flow[i]
384  - The current CPU is unset (>= nr_cpu_ids)
385  - The current CPU is offline
386
387After this check, the packet is sent to the (possibly updated) current
388CPU. These rules aim to ensure that a flow only moves to a new CPU when
389there are no packets outstanding on the old CPU, as the outstanding
390packets could arrive later than those about to be processed on the new
391CPU.
392
393
394RFS Configuration
395-----------------
396
397RFS is only available if the kconfig symbol CONFIG_RPS is enabled (on
398by default for SMP). The functionality remains disabled until explicitly
399configured. The number of entries in the global flow table is set through::
400
401  /proc/sys/net/core/rps_sock_flow_entries
402
403The number of entries in the per-queue flow table are set through::
404
405  /sys/class/net/<dev>/queues/rx-<n>/rps_flow_cnt
406
407
408Suggested Configuration
409~~~~~~~~~~~~~~~~~~~~~~~
410
411Both of these need to be set before RFS is enabled for a receive queue.
412Values for both are rounded up to the nearest power of two. The
413suggested flow count depends on the expected number of active connections
414at any given time, which may be significantly less than the number of open
415connections. We have found that a value of 65536 for rps_sock_flow_entries
416works fairly well on a moderately loaded server. Big servers might
417need 1048576 or even higher values.
418
419On a NUMA host it is advisable to spread rps_sock_flow_entries on all nodes.
420
421numactl --interleave=all bash -c "echo 1048576 >/proc/sys/net/core/rps_sock_flow_entries"
422
423For a single queue device, the rps_flow_cnt value for the single queue
424would normally be configured to the same value as rps_sock_flow_entries.
425For a multi-queue device, the rps_flow_cnt for each queue might be
426configured as rps_sock_flow_entries / N, where N is the number of
427queues. So for instance, if rps_sock_flow_entries is set to 131072 and there
428are 16 configured receive queues, rps_flow_cnt for each queue might be
429configured as 8192.
430
431
432Accelerated RFS
433===============
434
435Accelerated RFS is to RFS what RSS is to RPS: a hardware-accelerated load
436balancing mechanism that uses soft state to steer flows based on where
437the application thread consuming the packets of each flow is running.
438Accelerated RFS should perform better than RFS since packets are sent
439directly to a CPU local to the thread consuming the data. The target CPU
440will either be the same CPU where the application runs, or at least a CPU
441which is local to the application thread’s CPU in the cache hierarchy.
442
443To enable accelerated RFS, the networking stack calls the
444ndo_rx_flow_steer driver function to communicate the desired hardware
445queue for packets matching a particular flow. The network stack
446automatically calls this function every time a flow entry in
447rps_dev_flow_table is updated. The driver in turn uses a device specific
448method to program the NIC to steer the packets.
449
450The hardware queue for a flow is derived from the CPU recorded in
451rps_dev_flow_table. The stack consults a CPU to hardware queue map which
452is maintained by the NIC driver. This is an auto-generated reverse map of
453the IRQ affinity table shown by /proc/interrupts. Drivers can use
454functions in the cpu_rmap (“CPU affinity reverse map”) kernel library
455to populate the map. Alternatively, drivers can delegate the cpu_rmap
456management to the Kernel by calling netif_enable_cpu_rmap(). For each CPU,
457the corresponding queue in the map is set to be one whose processing CPU is
458closest in cache locality.
459
460
461Accelerated RFS Configuration
462-----------------------------
463
464Accelerated RFS is only available if the kernel is compiled with
465CONFIG_RFS_ACCEL and support is provided by the NIC device and driver.
466It also requires that ntuple filtering is enabled via ethtool. The map
467of CPU to queues is automatically deduced from the IRQ affinities
468configured for each receive queue by the driver, so no additional
469configuration should be necessary.
470
471
472Suggested Configuration
473~~~~~~~~~~~~~~~~~~~~~~~
474
475This technique should be enabled whenever one wants to use RFS and the
476NIC supports hardware acceleration.
477
478
479XPS: Transmit Packet Steering
480=============================
481
482Transmit Packet Steering is a mechanism for intelligently selecting
483which transmit queue to use when transmitting a packet on a multi-queue
484device. This can be accomplished by recording two kinds of maps, either
485a mapping of CPU to hardware queue(s) or a mapping of receive queue(s)
486to hardware transmit queue(s).
487
4881. XPS using CPUs map
489
490The goal of this mapping is usually to assign queues
491exclusively to a subset of CPUs, where the transmit completions for
492these queues are processed on a CPU within this set. This choice
493provides two benefits. First, contention on the device queue lock is
494significantly reduced since fewer CPUs contend for the same queue
495(contention can be eliminated completely if each CPU has its own
496transmit queue). Secondly, cache miss rate on transmit completion is
497reduced, in particular for data cache lines that hold the sk_buff
498structures.
499
5002. XPS using receive queues map
501
502This mapping is used to pick transmit queue based on the receive
503queue(s) map configuration set by the administrator. A set of receive
504queues can be mapped to a set of transmit queues (many:many), although
505the common use case is a 1:1 mapping. This will enable sending packets
506on the same queue associations for transmit and receive. This is useful for
507busy polling multi-threaded workloads where there are challenges in
508associating a given CPU to a given application thread. The application
509threads are not pinned to CPUs and each thread handles packets
510received on a single queue. The receive queue number is cached in the
511socket for the connection. In this model, sending the packets on the same
512transmit queue corresponding to the associated receive queue has benefits
513in keeping the CPU overhead low. Transmit completion work is locked into
514the same queue-association that a given application is polling on. This
515avoids the overhead of triggering an interrupt on another CPU. When the
516application cleans up the packets during the busy poll, transmit completion
517may be processed along with it in the same thread context and so result in
518reduced latency.
519
520XPS is configured per transmit queue by setting a bitmap of
521CPUs/receive-queues that may use that queue to transmit. The reverse
522mapping, from CPUs to transmit queues or from receive-queues to transmit
523queues, is computed and maintained for each network device. When
524transmitting the first packet in a flow, the function get_xps_queue() is
525called to select a queue. This function uses the ID of the receive queue
526for the socket connection for a match in the receive queue-to-transmit queue
527lookup table. Alternatively, this function can also use the ID of the
528running CPU as a key into the CPU-to-queue lookup table. If the
529ID matches a single queue, that is used for transmission. If multiple
530queues match, one is selected by using the flow hash to compute an index
531into the set. When selecting the transmit queue based on receive queue(s)
532map, the transmit device is not validated against the receive device as it
533requires expensive lookup operation in the datapath.
534
535The queue chosen for transmitting a particular flow is saved in the
536corresponding socket structure for the flow (e.g. a TCP connection).
537This transmit queue is used for subsequent packets sent on the flow to
538prevent out of order (ooo) packets. The choice also amortizes the cost
539of calling get_xps_queues() over all packets in the flow. To avoid
540ooo packets, the queue for a flow can subsequently only be changed if
541skb->ooo_okay is set for a packet in the flow. This flag indicates that
542there are no outstanding packets in the flow, so the transmit queue can
543change without the risk of generating out of order packets. The
544transport layer is responsible for setting ooo_okay appropriately. TCP,
545for instance, sets the flag when all data for a connection has been
546acknowledged.
547
548XPS Configuration
549-----------------
550
551XPS is only available if the kconfig symbol CONFIG_XPS is enabled (on by
552default for SMP). If compiled in, it is driver dependent whether, and
553how, XPS is configured at device init. The mapping of CPUs/receive-queues
554to transmit queue can be inspected and configured using sysfs:
555
556For selection based on CPUs map::
557
558  /sys/class/net/<dev>/queues/tx-<n>/xps_cpus
559
560For selection based on receive-queues map::
561
562  /sys/class/net/<dev>/queues/tx-<n>/xps_rxqs
563
564
565Suggested Configuration
566~~~~~~~~~~~~~~~~~~~~~~~
567
568For a network device with a single transmission queue, XPS configuration
569has no effect, since there is no choice in this case. In a multi-queue
570system, XPS is preferably configured so that each CPU maps onto one queue.
571If there are as many queues as there are CPUs in the system, then each
572queue can also map onto one CPU, resulting in exclusive pairings that
573experience no contention. If there are fewer queues than CPUs, then the
574best CPUs to share a given queue are probably those that share the cache
575with the CPU that processes transmit completions for that queue
576(transmit interrupts).
577
578For transmit queue selection based on receive queue(s), XPS has to be
579explicitly configured mapping receive-queue(s) to transmit queue(s). If the
580user configuration for receive-queue map does not apply, then the transmit
581queue is selected based on the CPUs map.
582
583
584Per TX Queue rate limitation
585============================
586
587These are rate-limitation mechanisms implemented by HW, where currently
588a max-rate attribute is supported, by setting a Mbps value to::
589
590  /sys/class/net/<dev>/queues/tx-<n>/tx_maxrate
591
592A value of zero means disabled, and this is the default.
593
594
595Further Information
596===================
597RPS and RFS were introduced in kernel 2.6.35. XPS was incorporated into
5982.6.38. Original patches were submitted by Tom Herbert
599(therbert@google.com)
600
601Accelerated RFS was introduced in 2.6.35. Original patches were
602submitted by Ben Hutchings (bwh@kernel.org)
603
604Authors:
605
606- Tom Herbert (therbert@google.com)
607- Willem de Bruijn (willemb@google.com)
608