* [PATCH net-next] docs: networking: document multi-RSS context
@ 2023-10-18 1:07 Jakub Kicinski
2023-10-18 15:47 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jakub Kicinski @ 2023-10-18 1:07 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, Jakub Kicinski, ecree.xilinx, corbet,
linux-doc
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>
---
CC: ecree.xilinx@gmail.com
CC: corbet@lwn.net
CC: linux-doc@vger.kernel.org
---
Documentation/networking/scaling.rst | 42 ++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/Documentation/networking/scaling.rst b/Documentation/networking/scaling.rst
index 92c9fb46d6a2..03ae19a689fc 100644
--- a/Documentation/networking/scaling.rst
+++ b/Documentation/networking/scaling.rst
@@ -105,6 +105,48 @@ a separate CPU. For interrupt handling, HT has shown no benefit in
initial tests, so limit the number of queues to the number of CPU cores
in the system.
+Dedicated RSS contexts
+~~~~~~~~~~~~~~~~~~~~~~
+
+Modern NICs support creating multiple co-existing RSS configurations
+which are selected based on explicit matching rules. This can be very
+useful when application wants to constrain the set of queues receiving
+traffic for e.g. a particular destination port or IP address.
+The example below shows how to direct all traffic to TCP port 22
+to queues 0 and 1.
+
+To create an additional RSS context use::
+
+ # ethtool -X eth0 hfunc toeplitz context new
+ New RSS context is 1
+
+Kernel reports back the ID of the allocated context (the default, always
+present RSS context has ID of 0). The new context can be queried and
+modified using the same APIs as the default context::
+
+ # ethtool -x eth0 context 1
+ RX flow hash indirection table for eth0 with 13 RX ring(s):
+ 0: 0 1 2 3 4 5 6 7
+ 8: 8 9 10 11 12 0 1 2
+ [...]
+ # ethtool -X eth0 equal 2 context 1
+ # ethtool -x eth0 context 1
+ RX flow hash indirection table for eth0 with 13 RX ring(s):
+ 0: 0 1 0 1 0 1 0 1
+ 8: 0 1 0 1 0 1 0 1
+ [...]
+
+To make use of the new context direct traffic to it using an n-tuple
+filter::
+
+ # ethtool -N eth0 flow-type tcp6 dst-port 22 context 1
+ Added rule with ID 1023
+
+When done, remove the context and the rule::
+
+ # ethtool -N eth0 delete 1023
+ # ethtool -X eth0 context 1 delete
+
RPS: Receive Packet Steering
============================
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] docs: networking: document multi-RSS context
2023-10-18 1:07 [PATCH net-next] docs: networking: document multi-RSS context Jakub Kicinski
@ 2023-10-18 15:47 ` Simon Horman
2023-10-18 19:35 ` Edward Cree
2023-10-19 10:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-10-18 15:47 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, ecree.xilinx, corbet, linux-doc
On Tue, Oct 17, 2023 at 06:07:58PM -0700, Jakub Kicinski wrote:
> 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>
Looks good :)
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] docs: networking: document multi-RSS context
2023-10-18 1:07 [PATCH net-next] docs: networking: document multi-RSS context Jakub Kicinski
2023-10-18 15:47 ` Simon Horman
@ 2023-10-18 19:35 ` Edward Cree
2023-10-19 10:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Edward Cree @ 2023-10-18 19:35 UTC (permalink / raw)
To: Jakub Kicinski, davem; +Cc: netdev, edumazet, pabeni, corbet, linux-doc
On 18/10/2023 02:07, Jakub Kicinski wrote:
> 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>
> ---
> CC: ecree.xilinx@gmail.com
> CC: corbet@lwn.net
> CC: linux-doc@vger.kernel.org
> ---
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Thanks for doing this (and sorry for not documenting it in the
first place).
-ed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] docs: networking: document multi-RSS context
2023-10-18 1:07 [PATCH net-next] docs: networking: document multi-RSS context Jakub Kicinski
2023-10-18 15:47 ` Simon Horman
2023-10-18 19:35 ` Edward Cree
@ 2023-10-19 10:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-19 10:00 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, ecree.xilinx, corbet, linux-doc
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 17 Oct 2023 18:07:58 -0700 you wrote:
> 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>
> ---
> CC: ecree.xilinx@gmail.com
> CC: corbet@lwn.net
> CC: linux-doc@vger.kernel.org
>
> [...]
Here is the summary with links:
- [net-next] docs: networking: document multi-RSS context
https://git.kernel.org/netdev/net-next/c/b91f2e13c972
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-19 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 1:07 [PATCH net-next] docs: networking: document multi-RSS context Jakub Kicinski
2023-10-18 15:47 ` Simon Horman
2023-10-18 19:35 ` Edward Cree
2023-10-19 10:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).