DPDK usage discussions
 help / color / mirror / Atom feed
* Symmetric RSS Hashing support in DPDK
@ 2024-03-06  7:28 Balakrishnan K
  2024-03-06 15:03 ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: Balakrishnan K @ 2024-03-06  7:28 UTC (permalink / raw)
  To: users

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Hello,
   Our application needs symmetric hashing to handle the reverse traffic on the same core, also to
Improve performance by distributing the traffic across core.
Tried using rss config as below .
action_rss_tcp.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY| ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY;
but could not get desired result.
Is there any options or API available to enable symmetric RSS hashing .
We are using dpdk 20.11 and intel NIC X710 10GbE .

Regards,
Bala

[-- Attachment #2: Type: text/html, Size: 2676 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symmetric RSS Hashing support in DPDK
  2024-03-06  7:28 Symmetric RSS Hashing support in DPDK Balakrishnan K
@ 2024-03-06 15:03 ` Stephen Hemminger
  2024-03-08  5:53   ` Balakrishnan K
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2024-03-06 15:03 UTC (permalink / raw)
  To: Balakrishnan K; +Cc: users

On Wed, 6 Mar 2024 07:28:40 +0000
Balakrishnan K <Balakrishnan.K1@tatacommunications.com> wrote:

> Hello,
>    Our application needs symmetric hashing to handle the reverse traffic on the same core, also to
> Improve performance by distributing the traffic across core.
> Tried using rss config as below .
> action_rss_tcp.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY| ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY;
> but could not get desired result.
> Is there any options or API available to enable symmetric RSS hashing .
> We are using dpdk 20.11 and intel NIC X710 10GbE .
> 
> Regards,
> Bala

With XL710 there are two choices:
	1. Set RSS hash function to RTE_ETH_HASH_SYMMETRIC_TOEPLITZ in
	   the rte_eth_rss_conf passed in during configure
	2. Use default (non symmetric TOEPLITZ) but pass in a rss_key that
	   has duplicated bits in the right place. Like:

0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a

	https://www.ndsl.kaist.edu/~kyoungsoo/papers/TR-symRSS.pdf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Symmetric RSS Hashing support in DPDK
  2024-03-06 15:03 ` Stephen Hemminger
@ 2024-03-08  5:53   ` Balakrishnan K
  2024-03-08  7:29     ` Lukáš Šišmiš
  0 siblings, 1 reply; 6+ messages in thread
From: Balakrishnan K @ 2024-03-08  5:53 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users

Hi Stephen,
  Thanks for the response . I will below option and come back if any help required.

Regards,
Bala

-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org>
Sent: Wednesday, March 6, 2024 8:34 PM
To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>
Cc: users@dpdk.org
Subject: Re: Symmetric RSS Hashing support in DPDK

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Wed, 6 Mar 2024 07:28:40 +0000
Balakrishnan K <Balakrishnan.K1@tatacommunications.com> wrote:

> Hello,
>    Our application needs symmetric hashing to handle the reverse
> traffic on the same core, also to Improve performance by distributing the traffic across core.
> Tried using rss config as below .
> action_rss_tcp.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY|
> ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY; but could not get desired result.
> Is there any options or API available to enable symmetric RSS hashing .
> We are using dpdk 20.11 and intel NIC X710 10GbE .
>
> Regards,
> Bala

With XL710 there are two choices:
        1. Set RSS hash function to RTE_ETH_HASH_SYMMETRIC_TOEPLITZ in
           the rte_eth_rss_conf passed in during configure
        2. Use default (non symmetric TOEPLITZ) but pass in a rss_key that
           has duplicated bits in the right place. Like:

0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a
0x6d5a 0x6d5a 0x6d5a 0x6d5a

        https://www.ndsl.kaist.edu/~kyoungsoo/papers/TR-symRSS.pdf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symmetric RSS Hashing support in DPDK
  2024-03-08  5:53   ` Balakrishnan K
@ 2024-03-08  7:29     ` Lukáš Šišmiš
  0 siblings, 0 replies; 6+ messages in thread
From: Lukáš Šišmiš @ 2024-03-08  7:29 UTC (permalink / raw)
  To: Balakrishnan K, Stephen Hemminger; +Cc: users

Hi all,

I've made minimalist example app on how to set symmetric RSS support for 
X710 that uses RTE_FLOW rules - check it out here:

https://github.com/lukashino/i40e-symmetric-rss-rte-flow

Lukas

On 08. 03. 24 6:53, Balakrishnan K wrote:
> Hi Stephen,
>    Thanks for the response . I will below option and come back if any help required.
>
> Regards,
> Bala
>
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Wednesday, March 6, 2024 8:34 PM
> To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>
> Cc: users@dpdk.org
> Subject: Re: Symmetric RSS Hashing support in DPDK
>
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Wed, 6 Mar 2024 07:28:40 +0000
> Balakrishnan K <Balakrishnan.K1@tatacommunications.com> wrote:
>
>> Hello,
>>     Our application needs symmetric hashing to handle the reverse
>> traffic on the same core, also to Improve performance by distributing the traffic across core.
>> Tried using rss config as below .
>> action_rss_tcp.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY|
>> ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY; but could not get desired result.
>> Is there any options or API available to enable symmetric RSS hashing .
>> We are using dpdk 20.11 and intel NIC X710 10GbE .
>>
>> Regards,
>> Bala
> With XL710 there are two choices:
>          1. Set RSS hash function to RTE_ETH_HASH_SYMMETRIC_TOEPLITZ in
>             the rte_eth_rss_conf passed in during configure
>          2. Use default (non symmetric TOEPLITZ) but pass in a rss_key that
>             has duplicated bits in the right place. Like:
>
> 0x6d5a 0x6d5a 0x6d5a 0x6d5a
> 0x6d5a 0x6d5a 0x6d5a 0x6d5a
> 0x6d5a 0x6d5a 0x6d5a 0x6d5a
> 0x6d5a 0x6d5a 0x6d5a 0x6d5a
> 0x6d5a 0x6d5a 0x6d5a 0x6d5a
>
>          https://www.ndsl.kaist.edu/~kyoungsoo/papers/TR-symRSS.pdf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symmetric RSS Hashing support in DPDK
  2024-03-31 11:47 ` Shaul Hamoi (shamoi)
@ 2024-04-01 16:40   ` Shaul Hamoi (shamoi)
  0 siblings, 0 replies; 6+ messages in thread
From: Shaul Hamoi (shamoi) @ 2024-04-01 16:40 UTC (permalink / raw)
  To: sismis; +Cc: Balakrishnan.K1, stephen, users

[-- Attachment #1: Type: text/plain, Size: 4649 bytes --]

OK,  I found my issue.

The input to the hash function should include all  4 parameters also in case of symmetic:
(SRC_IP^DST_IP ,  SRC_IP^DST_IP, SRC_PORT^DST_PORT, SRC_PORT^DST_PORT)

Shaul.

From: Shaul Hamoi (shamoi) <shamoi@cisco.com>
Date: Sunday, 31 March 2024 at 14:48
To: sismis@cesnet.cz <sismis@cesnet.cz>
Cc: Balakrishnan.K1@tatacommunications.com <Balakrishnan.K1@tatacommunications.com>, stephen@networkplumber.org <stephen@networkplumber.org>, users@dpdk.org <users@dpdk.org>
Subject: Re: Symmetric RSS Hashing support in DPDK

Hi,


I am looking to determine the target queue for a flow in advance
I’m using dpdk-rss-flows.py to calculate the Toeplitz hash with I40E key.

However, If I use the script as is, I don’t obtain the correct queue because the hash calculation isn’t symmetric.
I have attempted to XOR the source and destination IP addresses  and source and destination  port before performing the calculation  but I still don’t get the correct queue.


In case you use RTE_ETH_HASH_SYMMETRIC_TOEPLITZ , the I40E key doesn’t change - Right ?
How do I find that the NIC does for symmetric hash so I can simulate it ?

(src="1.0.0.1", dst="2.0.0.2")/TCP(sport=8819, dport=80)

Actual queue - 7 (32 RX queues)



Result with XOR:

dpdk-rss-flows.py -s 8819 -d 80 -k i40e 32 1.0.0.1 2.0.0.2

SRC_IP     SPORT    DST_IP     DPORT    QUEUE

1.0.0.1    8819     2.0.0.2    80       19



Result without (original script):

dpdk-rss-flows.py -s 8819 -d 80 -k i40e 32 1.0.0.1 2.0.0.2

SRC_IP     SPORT    DST_IP     DPORT    QUEUE

1.0.0.1    8819     2.0.0.2    80       20





Thanks in advance,
Shaul.



From: "Lukáš Šišmiš" <sismis@cesnet.cz>

To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>,

        Stephen Hemminger <stephen@networkplumber.org>

Cc: "users@dpdk.org" <users@dpdk.org>

Subject: Re: Symmetric RSS Hashing support in DPDK<https://inbox.dpdk.org/users/90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz/#r>

Date: Fri, 8 Mar 2024 08:29:32 +0100  [thread overview]<https://inbox.dpdk.org/users/90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz/#r>

Message-ID: <90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz> (raw<https://inbox.dpdk.org/users/90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz/raw>)

In-Reply-To: <PSAPR04MB551616841D8221851FF79214D6272@PSAPR04MB5516.apcprd04.prod.outlook.com<https://inbox.dpdk.org/users/PSAPR04MB551616841D8221851FF79214D6272@PSAPR04MB5516.apcprd04.prod.outlook.com/>>



Hi all,



I've made minimalist example app on how to set symmetric RSS support for

X710 that uses RTE_FLOW rules - check it out here:



https://github.com/lukashino/i40e-symmetric-rss-rte-flow



Lukas



On 08. 03. 24 6:53, Balakrishnan K wrote:

> Hi Stephen,

>    Thanks for the response . I will below option and come back if any help required.

>

> Regards,

> Bala

>

> -----Original Message-----

> From: Stephen Hemminger <stephen@networkplumber.org>

> Sent: Wednesday, March 6, 2024 8:34 PM

> To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>

> Cc: users@dpdk.org

> Subject: Re: Symmetric RSS Hashing support in DPDK

>

> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

>

> On Wed, 6 Mar 2024 07:28:40 +0000

> Balakrishnan K <Balakrishnan.K1@tatacommunications.com> wrote:

>

>> Hello,

>>     Our application needs symmetric hashing to handle the reverse

>> traffic on the same core, also to Improve performance by distributing the traffic across core.

>> Tried using rss config as below .

>> action_rss_tcp.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY|

>> ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY; but could not get desired result.

>> Is there any options or API available to enable symmetric RSS hashing .

>> We are using dpdk 20.11 and intel NIC X710 10GbE .

>>

>> Regards,

>> Bala

> With XL710 there are two choices:

>          1. Set RSS hash function to RTE_ETH_HASH_SYMMETRIC_TOEPLITZ in

>             the rte_eth_rss_conf passed in during configure

>          2. Use default (non symmetric TOEPLITZ) but pass in a rss_key that

>             has duplicated bits in the right place. Like:

>

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

>
> https://www.ndsl.kaist.edu/~kyoungsoo/papers/TR-symRSS.pdf



[-- Attachment #2: Type: text/html, Size: 13902 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symmetric RSS Hashing support in DPDK
       [not found] <CDE5E416-0537-498B-BE79-D351B4051D99@cisco.com>
@ 2024-03-31 11:47 ` Shaul Hamoi (shamoi)
  2024-04-01 16:40   ` Shaul Hamoi (shamoi)
  0 siblings, 1 reply; 6+ messages in thread
From: Shaul Hamoi (shamoi) @ 2024-03-31 11:47 UTC (permalink / raw)
  To: sismis; +Cc: Balakrishnan.K1, stephen, users

[-- Attachment #1: Type: text/plain, Size: 4093 bytes --]

Hi,


I am looking to determine the target queue for a flow in advance
I’m using dpdk-rss-flows.py to calculate the Toeplitz hash with I40E key.

However, If I use the script as is, I don’t obtain the correct queue because the hash calculation isn’t symmetric.
I have attempted to XOR the source and destination IP addresses  and source and destination  port before performing the calculation  but I still don’t get the correct queue.


In case you use RTE_ETH_HASH_SYMMETRIC_TOEPLITZ , the I40E key doesn’t change - Right ?
How do I find that the NIC does for symmetric hash so I can simulate it ?

(src="1.0.0.1", dst="2.0.0.2")/TCP(sport=8819, dport=80)

Actual queue - 7 (32 RX queues)



Result with XOR:

dpdk-rss-flows.py -s 8819 -d 80 -k i40e 32 1.0.0.1 2.0.0.2

SRC_IP     SPORT    DST_IP     DPORT    QUEUE

1.0.0.1    8819     2.0.0.2    80       19



Result without (original script):

dpdk-rss-flows.py -s 8819 -d 80 -k i40e 32 1.0.0.1 2.0.0.2

SRC_IP     SPORT    DST_IP     DPORT    QUEUE

1.0.0.1    8819     2.0.0.2    80       20





Thanks in advance,
Shaul.



From: "Lukáš Šišmiš" <sismis@cesnet.cz>

To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>,

        Stephen Hemminger <stephen@networkplumber.org>

Cc: "users@dpdk.org" <users@dpdk.org>

Subject: Re: Symmetric RSS Hashing support in DPDK<https://inbox.dpdk.org/users/90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz/#r>

Date: Fri, 8 Mar 2024 08:29:32 +0100  [thread overview]<https://inbox.dpdk.org/users/90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz/#r>

Message-ID: <90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz> (raw<https://inbox.dpdk.org/users/90dc11cf-8c60-4b90-a3fc-43b2351b6c93@cesnet.cz/raw>)

In-Reply-To: <PSAPR04MB551616841D8221851FF79214D6272@PSAPR04MB5516.apcprd04.prod.outlook.com<https://inbox.dpdk.org/users/PSAPR04MB551616841D8221851FF79214D6272@PSAPR04MB5516.apcprd04.prod.outlook.com/>>



Hi all,



I've made minimalist example app on how to set symmetric RSS support for

X710 that uses RTE_FLOW rules - check it out here:



https://github.com/lukashino/i40e-symmetric-rss-rte-flow



Lukas



On 08. 03. 24 6:53, Balakrishnan K wrote:

> Hi Stephen,

>    Thanks for the response . I will below option and come back if any help required.

>

> Regards,

> Bala

>

> -----Original Message-----

> From: Stephen Hemminger <stephen@networkplumber.org>

> Sent: Wednesday, March 6, 2024 8:34 PM

> To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>

> Cc: users@dpdk.org

> Subject: Re: Symmetric RSS Hashing support in DPDK

>

> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

>

> On Wed, 6 Mar 2024 07:28:40 +0000

> Balakrishnan K <Balakrishnan.K1@tatacommunications.com> wrote:

>

>> Hello,

>>     Our application needs symmetric hashing to handle the reverse

>> traffic on the same core, also to Improve performance by distributing the traffic across core.

>> Tried using rss config as below .

>> action_rss_tcp.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY|

>> ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY; but could not get desired result.

>> Is there any options or API available to enable symmetric RSS hashing .

>> We are using dpdk 20.11 and intel NIC X710 10GbE .

>>

>> Regards,

>> Bala

> With XL710 there are two choices:

>          1. Set RSS hash function to RTE_ETH_HASH_SYMMETRIC_TOEPLITZ in

>             the rte_eth_rss_conf passed in during configure

>          2. Use default (non symmetric TOEPLITZ) but pass in a rss_key that

>             has duplicated bits in the right place. Like:

>

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

> 0x6d5a 0x6d5a 0x6d5a 0x6d5a

>
> https://www.ndsl.kaist.edu/~kyoungsoo/papers/TR-symRSS.pdf



[-- Attachment #2: Type: text/html, Size: 12290 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-01 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06  7:28 Symmetric RSS Hashing support in DPDK Balakrishnan K
2024-03-06 15:03 ` Stephen Hemminger
2024-03-08  5:53   ` Balakrishnan K
2024-03-08  7:29     ` Lukáš Šišmiš
     [not found] <CDE5E416-0537-498B-BE79-D351B4051D99@cisco.com>
2024-03-31 11:47 ` Shaul Hamoi (shamoi)
2024-04-01 16:40   ` Shaul Hamoi (shamoi)

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).