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

Configure Feed

Select the types of activity you want to include in your feed.

docs: networking: document multi-RSS context

There seems to be no docs for the concept of multiple RSS
contexts and how to configure it. I had to explain it three
times recently, the last one being the charm, document it.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://lore.kernel.org/r/20231018010758.2382742-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jakub Kicinski and committed by
Paolo Abeni
b91f2e13 65e4f450

+42
+42
Documentation/networking/scaling.rst
··· 105 105 initial tests, so limit the number of queues to the number of CPU cores 106 106 in the system. 107 107 108 + Dedicated RSS contexts 109 + ~~~~~~~~~~~~~~~~~~~~~~ 110 + 111 + Modern NICs support creating multiple co-existing RSS configurations 112 + which are selected based on explicit matching rules. This can be very 113 + useful when application wants to constrain the set of queues receiving 114 + traffic for e.g. a particular destination port or IP address. 115 + The example below shows how to direct all traffic to TCP port 22 116 + to queues 0 and 1. 117 + 118 + To create an additional RSS context use:: 119 + 120 + # ethtool -X eth0 hfunc toeplitz context new 121 + New RSS context is 1 122 + 123 + Kernel reports back the ID of the allocated context (the default, always 124 + present RSS context has ID of 0). The new context can be queried and 125 + modified using the same APIs as the default context:: 126 + 127 + # ethtool -x eth0 context 1 128 + RX flow hash indirection table for eth0 with 13 RX ring(s): 129 + 0: 0 1 2 3 4 5 6 7 130 + 8: 8 9 10 11 12 0 1 2 131 + [...] 132 + # ethtool -X eth0 equal 2 context 1 133 + # ethtool -x eth0 context 1 134 + RX flow hash indirection table for eth0 with 13 RX ring(s): 135 + 0: 0 1 0 1 0 1 0 1 136 + 8: 0 1 0 1 0 1 0 1 137 + [...] 138 + 139 + To make use of the new context direct traffic to it using an n-tuple 140 + filter:: 141 + 142 + # ethtool -N eth0 flow-type tcp6 dst-port 22 context 1 143 + Added rule with ID 1023 144 + 145 + When done, remove the context and the rule:: 146 + 147 + # ethtool -N eth0 delete 1023 148 + # ethtool -X eth0 context 1 delete 149 + 108 150 109 151 RPS: Receive Packet Steering 110 152 ============================