From: Saeed Mahameed <saeed@kernel.org>
To: Ahmed Zaki <ahmed.zaki@intel.com>
Cc: netdev@vger.kernel.org, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com
Subject: Re: [RFC PATCH net-next 1/3] net: ethtool: add symmetric Toeplitz RSS hash function
Date: Thu, 24 Aug 2023 11:36:37 -0700 [thread overview]
Message-ID: <ZOejNYJgR74JGRse@x130> (raw)
In-Reply-To: <94d9c857-2c2b-77f0-9b17-8088068eee6d@intel.com>
On 24 Aug 07:14, Ahmed Zaki wrote:
>
>On 2023-08-23 13:45, Saeed Mahameed wrote:
>>On 23 Aug 10:48, Ahmed Zaki wrote:
>>>Symmetric RSS hash functions are beneficial in applications that monitor
>>>both Tx and Rx packets of the same flow (IDS, software firewalls,
>>>..etc).
>>>Getting all traffic of the same flow on the same RX queue results in
>>>higher CPU cache efficiency.
>>>
...
>>
>>What is the expectation of the symmetric toeplitz hash, how do you
>>achieve
>>that? by sorting packet fields? which fields?
>>
>>Can you please provide a link to documentation/spec?
>>We should make sure all vendors agree on implementation and
>>expectation of
>>the symmetric hash function.
>
>The way the Intel NICs are achieving this hash symmetry is by XORing
>the source and destination values of the IP and L4 ports and then
>feeding these values to the regular Toeplitz (in-tree) hash algorithm.
>
>For example, for UDP/IPv4, the input fields for the Toeplitz hash would be:
>
>(SRC_IP, DST_IP, SRC_PORT, DST_PORT)
>
So you mangle the input. This is different than the paper you
referenced below which doesn't change the input but it modifies the RSS
algorithm and uses a special hash key.
>If symmetric Toeplitz is set, the NIC XOR the src and dst fields:
>
>(SRC_IP^DST_IP , SRC_IP^DST_IP, SRC_PORT^DST_PORT, SRC_PORT^DST_PORT)
>
>This way, the output hash would be the same for both flow directions.
>Same is applicable for IPv6, TCP and SCTP.
>
I understand the motivation, I just want to make sure the interpretation is
clear, I agree with Jakub, we should use a clear name for the ethtool
parameter or allow users to select "xor-ed"/"sorted" fields as Jakub
suggested.
>Regarding the documentation, the above is available in our public
>datasheets [2]. In the final version, I can add similar explanation in
>the headers (kdoc) and under "Documentation/networking/" so that there
>is a clear understanding of the algorithm.
>
>
>[1] https://www.ndsl.kaist.edu/~kyoungsoo/papers/TR-symRSS.pdf
>
>[2] E810 datasheet: 7.10.10.2 : Symmetric Hash
>
>https://www.intel.com/content/www/us/en/content-details/613875/intel-ethernet-controller-e810-datasheet.html
>
This document doesn't mention anything about implementation.
next prev parent reply other threads:[~2023-08-24 18:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 16:48 [RFC PATCH net-next 0/3] Support Symmetric Toeplitz RSS hash Ahmed Zaki
2023-08-23 16:48 ` [RFC PATCH net-next 1/3] net: ethtool: add symmetric Toeplitz RSS hash function Ahmed Zaki
2023-08-23 19:45 ` Saeed Mahameed
2023-08-24 13:14 ` Ahmed Zaki
2023-08-24 18:36 ` Saeed Mahameed [this message]
2023-08-24 22:56 ` Ahmed Zaki
2023-08-24 23:30 ` Willem de Bruijn
2023-08-25 21:21 ` Ahmed Zaki
2023-08-24 18:14 ` Jakub Kicinski
2023-08-24 22:55 ` Ahmed Zaki
2023-08-25 0:43 ` Jakub Kicinski
2023-08-25 20:46 ` Ahmed Zaki
2023-08-26 0:49 ` Jakub Kicinski
2023-08-30 18:11 ` Ahmed Zaki
2023-08-23 16:48 ` [RFC PATCH net-next 2/3] ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values Ahmed Zaki
2023-08-23 16:48 ` [RFC PATCH net-next 3/3] ice: add support for symmetric Toeplitz RSS hash function Ahmed Zaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZOejNYJgR74JGRse@x130 \
--to=saeed@kernel.org \
--cc=ahmed.zaki@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).