Lines Matching +full:hardware +full:- +full:wise

1 .. SPDX-License-Identifier: GPL-2.0
13 multi-processor systems.
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
28 (multi-queue). On reception, a NIC can send different packets to different
33 generally known as “Receive-side Scaling” (RSS). The goal of RSS and
35 Multi-queue distribution can also be used for traffic prioritization, but
39 and/or transport layer headers-- for example, a 4-tuple hash over
40 IP addresses and TCP ports of a packet. The most common hardware
41 implementation of RSS uses a 128-entry indirection table where each entry
52 "Symmetric-XOR" is a type of RSS algorithms that achieves this hash
64 can be directed to their own receive queue. Such “n-tuple” filters can
65 be configured from ethtool (--config-ntuple).
69 -----------------
71 The driver for a multi-queue capable NIC typically provides a kernel
72 module parameter for specifying the number of hardware queues to
83 commands (--show-rxfh-indir and --set-rxfh-indir). Modifying the
93 signaling path for PCIe devices uses message signaled interrupts (MSI-X),
96 an IRQ may be handled on any CPU. Because a non-negligible part of packet
99 affinity of each interrupt see Documentation/core-api/irq/irq-affinity.rst. Some systems
111 NIC maximum, if lower). The most efficient high-rate configuration
117 Per-cpu load can be observed using the mpstat utility, but note that on
126 Modern NICs support creating multiple co-existing RSS configurations
135 # ethtool -X eth0 hfunc toeplitz context new
142 # ethtool -x eth0 context 1
147 # ethtool -X eth0 equal 2 context 1
148 # ethtool -x eth0 context 1
154 To make use of the new context direct traffic to it using an n-tuple
157 # ethtool -N eth0 flow-type tcp6 dst-port 22 context 1
162 # ethtool -N eth0 delete 1023
163 # ethtool -X eth0 context 1 delete
171 Whereas RSS selects the queue and hence CPU that will run the hardware
179 3) it does not increase hardware device interrupt rate (although it does
180 introduce inter-processor interrupts (IPIs))
188 flow hash over the packet’s addresses or ports (2-tuple or 4-tuple hash
190 associated flow of the packet. The hash is either provided by hardware
191 or will be computed in the stack. Capable hardware can pass the hash in
194 skb->hash and can be used elsewhere in the stack as a hash of the
197 Each receive hardware queue has an associated list of CPUs to which
209 -----------------
216 /sys/class/net/<dev>/queues/rx-<n>/rps_cpus
220 CPU. Documentation/core-api/irq/irq-affinity.rst explains how CPUs are assigned to
230 the system. At high interrupt rate, it might be wise to exclude the
233 For a multi-queue system, if RSS is configured so that a hardware
235 and unnecessary. If there are fewer hardware queues than CPUs, then
241 --------------
244 reordering. The trade-off to sending all packets from the same flow
256 net.core.netdev_max_backlog), the kernel starts a per-flow packet
277 Per-flow rate is calculated by hashing each packet into a hashtable
278 bucket and incrementing a per-bucket counter. The hash function is
280 be much larger than the number of CPUs, flow limit has finer-grained
335 for each flow: rps_dev_flow_table is a table specific to each hardware
362 - The current CPU's queue head counter >= the recorded tail counter
364 - The current CPU is unset (>= nr_cpu_ids)
365 - The current CPU is offline
375 -----------------
383 The number of entries in the per-queue flow table are set through::
385 /sys/class/net/<dev>/queues/rx-<n>/rps_flow_cnt
400 For a multi-queue device, the rps_flow_cnt for each queue might be
410 Accelerated RFS is to RFS what RSS is to RPS: a hardware-accelerated load
419 ndo_rx_flow_steer driver function to communicate the desired hardware
425 The hardware queue for a flow is derived from the CPU recorded in
426 rps_dev_flow_table. The stack consults a CPU to hardware queue map which
427 is maintained by the NIC driver. This is an auto-generated reverse map of
435 -----------------------------
449 NIC supports hardware acceleration.
456 which transmit queue to use when transmitting a packet on a multi-queue
458 a mapping of CPU to hardware queue(s) or a mapping of receive queue(s)
459 to hardware transmit queue(s).
480 busy polling multi-threaded workloads where there are challenges in
487 the same queue-association that a given application is polling on. This
494 CPUs/receive-queues that may use that queue to transmit. The reverse
495 mapping, from CPUs to transmit queues or from receive-queues to transmit
499 for the socket connection for a match in the receive queue-to-transmit queue
501 running CPU as a key into the CPU-to-queue lookup table. If the
514 skb->ooo_okay is set for a packet in the flow. This flag indicates that
522 -----------------
526 how, XPS is configured at device init. The mapping of CPUs/receive-queues
531 /sys/class/net/<dev>/queues/tx-<n>/xps_cpus
533 For selection based on receive-queues map::
535 /sys/class/net/<dev>/queues/tx-<n>/xps_rxqs
542 has no effect, since there is no choice in this case. In a multi-queue
552 explicitly configured mapping receive-queue(s) to transmit queue(s). If the
553 user configuration for receive-queue map does not apply, then the transmit
560 These are rate-limitation mechanisms implemented by HW, where currently
561 a max-rate attribute is supported, by setting a Mbps value to::
563 /sys/class/net/<dev>/queues/tx-<n>/tx_maxrate
579 - Tom Herbert (therbert@google.com)
580 - Willem de Bruijn (willemb@google.com)