DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Symmetric RSS Hashing in DPDK
@ 2014-12-16 19:52 Kamraan Nasim
       [not found] ` <CAOhi=LGc68UAe3tK2XPrCZVRAYWxzo5tZp5wtStpd5qdy=-qfw@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Kamraan Nasim @ 2014-12-16 19:52 UTC (permalink / raw)
  To: dev; +Cc: Steve Noble, Jun Du, Ashish Juneja

Hello,

My DPDK application requires bidirectional TCP flows to have the same RSS
hash however default RSS hashing is *asymmetric*.

There are posts such as:
http://dpdk.info/ml/archives/dev/2014-February/001460.html

which point to a symmetric RSS key(0x6d5a). I have tried using it but it is
still hashing bi-directional flows separately. I am using an 82599 NIC.

Have others come across this? What other options are available(I presume
S/W hashing)?

Appreciate any help I can get on this :)

#define RSS_HASH_KEY_LENGTH 40
static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = {
        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
};
// ethernet rx config
static struct rte_eth_conf port_conf = {
    .rxmode = {
        .mq_mode    = ETH_MQ_RX_RSS,
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = hash_key,
            .rss_hf  = ETH_RSS_PROTO_MASK,
        },
    },
    .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
    },
};


Thanks,
Kam

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

* Re: [dpdk-dev] Symmetric RSS Hashing in DPDK
       [not found]   ` <CABmQaND9TYt8cenMR-3Bqhxq42hid9_GHMf+t-nR9HoND7uJ5g@mail.gmail.com>
@ 2014-12-17 19:12     ` Kamraan Nasim
  2014-12-18  1:28       ` Kamraan Nasim
  0 siblings, 1 reply; 6+ messages in thread
From: Kamraan Nasim @ 2014-12-17 19:12 UTC (permalink / raw)
  To: Jeriel Smith, dev; +Cc: Steve Noble, Jun Du, Ashish Juneja

Thank you Jeriel. 0x00 0x01 works and I can get bi-directional symmetry but
you are right, it compromises the packet distribution. I am seeing vastly
different 5 tuples hashed with the same value.

Will let you know if I find a better alternative.

--Kam
On Tue, Dec 16, 2014 at 5:17 PM, Jeriel Smith <sjeriel2@gmail.com> wrote:
>
> Hi Kamraan,
>       Even i noticed it with "0x6d5a". Currently, I use a continuous
> pattern of "0x00 0x01" which helps in getting a symmetrical hashing. But,
> the packet spraying is not that good as "0x6d5a". Please let me know if you
> find a alternative.
> Thanks,
> Jeriel
>
>
>> ---------- Forwarded message ----------
>> From: Kamraan Nasim <knasim@sidebandnetworks.com>
>> Date: Tue, Dec 16, 2014 at 11:52 AM
>> Subject: [dpdk-dev] Symmetric RSS Hashing in DPDK
>> To: dev@dpdk.org
>> Cc: Steve Noble <snoble@sidebandnetworks.com>, Jun Du <
>> jdu@sidebandnetworks.com>, Ashish Juneja <ajuneja@sidebandnetworks.com>
>>
>> Hello,
>>
>> My DPDK application requires bidirectional TCP flows to have the same RSS
>> hash however default RSS hashing is *asymmetric*.
>>
>>
>> There are posts such as:
>> http://dpdk.info/ml/archives/dev/2014-February/001460.html
>>
>> which point to a symmetric RSS key(0x6d5a). I have tried using it but it
>> is
>> still hashing bi-directional flows separately. I am using an 82599 NIC.
>>
>> Have others come across this? What other options are available(I presume
>> S/W hashing)?
>>
>> Appreciate any help I can get on this :)
>>
>> #define RSS_HASH_KEY_LENGTH 40
>> static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = {
>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>> };
>> // ethernet rx config
>> static struct rte_eth_conf port_conf = {
>>     .rxmode = {
>>         .mq_mode    = ETH_MQ_RX_RSS,
>>         .split_hdr_size = 0,
>>         .header_split   = 0, /**< Header Split disabled */
>>         .hw_ip_checksum = 1, /**< IP checksum offload enabled */
>>         .hw_vlan_filter = 0, /**< VLAN filtering disabled */
>>         .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
>>         .hw_strip_crc   = 0, /**< CRC stripped by hardware */
>>     },
>>     .rx_adv_conf = {
>>         .rss_conf = {
>>             .rss_key = hash_key,
>>             .rss_hf  = ETH_RSS_PROTO_MASK,
>>         },
>>     },
>>     .txmode = {
>>                 .mq_mode = ETH_MQ_TX_NONE,
>>     },
>> };
>>
>>
>> Thanks,
>> Kam
>>
>

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

* Re: [dpdk-dev] Symmetric RSS Hashing in DPDK
  2014-12-17 19:12     ` Kamraan Nasim
@ 2014-12-18  1:28       ` Kamraan Nasim
  2014-12-18  6:55         ` Jim Thompson
  0 siblings, 1 reply; 6+ messages in thread
From: Kamraan Nasim @ 2014-12-18  1:28 UTC (permalink / raw)
  To: Jeriel Smith, dev; +Cc: Steve Noble

Hi DPDK community,

Any better RSS hash keys out there?

--Kam

On Wed, Dec 17, 2014 at 2:12 PM, Kamraan Nasim <knasim@sidebandnetworks.com>
wrote:
>
> Thank you Jeriel. 0x00 0x01 works and I can get bi-directional symmetry
> but you are right, it compromises the packet distribution. I am seeing
> vastly different 5 tuples hashed with the same value.
>
> Will let you know if I find a better alternative.
>
> --Kam
>
> On Tue, Dec 16, 2014 at 5:17 PM, Jeriel Smith <sjeriel2@gmail.com> wrote:
>>
>> Hi Kamraan,
>>       Even i noticed it with "0x6d5a". Currently, I use a continuous
>> pattern of "0x00 0x01" which helps in getting a symmetrical hashing. But,
>> the packet spraying is not that good as "0x6d5a". Please let me know if you
>> find a alternative.
>> Thanks,
>> Jeriel
>>
>>
>>> ---------- Forwarded message ----------
>>> From: Kamraan Nasim <knasim@sidebandnetworks.com>
>>> Date: Tue, Dec 16, 2014 at 11:52 AM
>>> Subject: [dpdk-dev] Symmetric RSS Hashing in DPDK
>>> To: dev@dpdk.org
>>> Cc: Steve Noble <snoble@sidebandnetworks.com>, Jun Du <
>>> jdu@sidebandnetworks.com>, Ashish Juneja <ajuneja@sidebandnetworks.com>
>>>
>>> Hello,
>>>
>>> My DPDK application requires bidirectional TCP flows to have the same RSS
>>> hash however default RSS hashing is *asymmetric*.
>>>
>>>
>>> There are posts such as:
>>> http://dpdk.info/ml/archives/dev/2014-February/001460.html
>>>
>>> which point to a symmetric RSS key(0x6d5a). I have tried using it but it
>>> is
>>> still hashing bi-directional flows separately. I am using an 82599 NIC.
>>>
>>> Have others come across this? What other options are available(I presume
>>> S/W hashing)?
>>>
>>> Appreciate any help I can get on this :)
>>>
>>> #define RSS_HASH_KEY_LENGTH 40
>>> static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = {
>>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>         0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>> };
>>> // ethernet rx config
>>> static struct rte_eth_conf port_conf = {
>>>     .rxmode = {
>>>         .mq_mode    = ETH_MQ_RX_RSS,
>>>         .split_hdr_size = 0,
>>>         .header_split   = 0, /**< Header Split disabled */
>>>         .hw_ip_checksum = 1, /**< IP checksum offload enabled */
>>>         .hw_vlan_filter = 0, /**< VLAN filtering disabled */
>>>         .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
>>>         .hw_strip_crc   = 0, /**< CRC stripped by hardware */
>>>     },
>>>     .rx_adv_conf = {
>>>         .rss_conf = {
>>>             .rss_key = hash_key,
>>>             .rss_hf  = ETH_RSS_PROTO_MASK,
>>>         },
>>>     },
>>>     .txmode = {
>>>                 .mq_mode = ETH_MQ_TX_NONE,
>>>     },
>>> };
>>>
>>>
>>> Thanks,
>>> Kam
>>>
>>

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

* Re: [dpdk-dev] Symmetric RSS Hashing in DPDK
  2014-12-18  1:28       ` Kamraan Nasim
@ 2014-12-18  6:55         ` Jim Thompson
  2014-12-18  7:41           ` Zhang, Helin
  2014-12-18  9:08           ` Franck Baudin
  0 siblings, 2 replies; 6+ messages in thread
From: Jim Thompson @ 2014-12-18  6:55 UTC (permalink / raw)
  To: Kamraan Nasim; +Cc: dev, Steve Noble, Jeriel Smith


The issues are outlined in this paper: http://www.ndsl.kaist.edu/~shinae/papers/TR-symRSS.pdf

> On Dec 17, 2014, at 7:28 PM, Kamraan Nasim <knasim@sidebandnetworks.com> wrote:
> 
> Hi DPDK community,
> 
> Any better RSS hash keys out there?
> 
> --Kam
> 
> On Wed, Dec 17, 2014 at 2:12 PM, Kamraan Nasim <knasim@sidebandnetworks.com>
> wrote:
>> 
>> Thank you Jeriel. 0x00 0x01 works and I can get bi-directional symmetry
>> but you are right, it compromises the packet distribution. I am seeing
>> vastly different 5 tuples hashed with the same value.
>> 
>> Will let you know if I find a better alternative.
>> 
>> --Kam
>> 
>> On Tue, Dec 16, 2014 at 5:17 PM, Jeriel Smith <sjeriel2@gmail.com> wrote:
>>> 
>>> Hi Kamraan,
>>>      Even i noticed it with "0x6d5a". Currently, I use a continuous
>>> pattern of "0x00 0x01" which helps in getting a symmetrical hashing. But,
>>> the packet spraying is not that good as "0x6d5a". Please let me know if you
>>> find a alternative.
>>> Thanks,
>>> Jeriel
>>> 
>>> 
>>>> ---------- Forwarded message ----------
>>>> From: Kamraan Nasim <knasim@sidebandnetworks.com>
>>>> Date: Tue, Dec 16, 2014 at 11:52 AM
>>>> Subject: [dpdk-dev] Symmetric RSS Hashing in DPDK
>>>> To: dev@dpdk.org
>>>> Cc: Steve Noble <snoble@sidebandnetworks.com>, Jun Du <
>>>> jdu@sidebandnetworks.com>, Ashish Juneja <ajuneja@sidebandnetworks.com>
>>>> 
>>>> Hello,
>>>> 
>>>> My DPDK application requires bidirectional TCP flows to have the same RSS
>>>> hash however default RSS hashing is *asymmetric*.
>>>> 
>>>> 
>>>> There are posts such as:
>>>> http://dpdk.info/ml/archives/dev/2014-February/001460.html
>>>> 
>>>> which point to a symmetric RSS key(0x6d5a). I have tried using it but it
>>>> is
>>>> still hashing bi-directional flows separately. I am using an 82599 NIC.
>>>> 
>>>> Have others come across this? What other options are available(I presume
>>>> S/W hashing)?
>>>> 
>>>> Appreciate any help I can get on this :)
>>>> 
>>>> #define RSS_HASH_KEY_LENGTH 40
>>>> static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = {
>>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
>>>> };
>>>> // ethernet rx config
>>>> static struct rte_eth_conf port_conf = {
>>>>    .rxmode = {
>>>>        .mq_mode    = ETH_MQ_RX_RSS,
>>>>        .split_hdr_size = 0,
>>>>        .header_split   = 0, /**< Header Split disabled */
>>>>        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
>>>>        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
>>>>        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
>>>>        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
>>>>    },
>>>>    .rx_adv_conf = {
>>>>        .rss_conf = {
>>>>            .rss_key = hash_key,
>>>>            .rss_hf  = ETH_RSS_PROTO_MASK,
>>>>        },
>>>>    },
>>>>    .txmode = {
>>>>                .mq_mode = ETH_MQ_TX_NONE,
>>>>    },
>>>> };
>>>> 
>>>> 
>>>> Thanks,
>>>> Kam
>>>> 
>>> 

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

* Re: [dpdk-dev] Symmetric RSS Hashing in DPDK
  2014-12-18  6:55         ` Jim Thompson
@ 2014-12-18  7:41           ` Zhang, Helin
  2014-12-18  9:08           ` Franck Baudin
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang, Helin @ 2014-12-18  7:41 UTC (permalink / raw)
  To: Jim Thompson, Kamraan Nasim; +Cc: dev, Steve Noble, Jeriel Smith

Hi guys

I40e has hardware offload of symmetric hashing. Patch set has been sent out during R1.8 time slot, but it will be in R2.0.

Regards,
Helin

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jim Thompson
> Sent: Thursday, December 18, 2014 2:56 PM
> To: Kamraan Nasim
> Cc: dev@dpdk.org; Steve Noble; Jeriel Smith
> Subject: Re: [dpdk-dev] Symmetric RSS Hashing in DPDK
> 
> 
> The issues are outlined in this paper:
> http://www.ndsl.kaist.edu/~shinae/papers/TR-symRSS.pdf
> 
> > On Dec 17, 2014, at 7:28 PM, Kamraan Nasim
> <knasim@sidebandnetworks.com> wrote:
> >
> > Hi DPDK community,
> >
> > Any better RSS hash keys out there?
> >
> > --Kam
> >
> > On Wed, Dec 17, 2014 at 2:12 PM, Kamraan Nasim
> > <knasim@sidebandnetworks.com>
> > wrote:
> >>
> >> Thank you Jeriel. 0x00 0x01 works and I can get bi-directional
> >> symmetry but you are right, it compromises the packet distribution. I
> >> am seeing vastly different 5 tuples hashed with the same value.
> >>
> >> Will let you know if I find a better alternative.
> >>
> >> --Kam
> >>
> >> On Tue, Dec 16, 2014 at 5:17 PM, Jeriel Smith <sjeriel2@gmail.com> wrote:
> >>>
> >>> Hi Kamraan,
> >>>      Even i noticed it with "0x6d5a". Currently, I use a continuous
> >>> pattern of "0x00 0x01" which helps in getting a symmetrical hashing.
> >>> But, the packet spraying is not that good as "0x6d5a". Please let me
> >>> know if you find a alternative.
> >>> Thanks,
> >>> Jeriel
> >>>
> >>>
> >>>> ---------- Forwarded message ----------
> >>>> From: Kamraan Nasim <knasim@sidebandnetworks.com>
> >>>> Date: Tue, Dec 16, 2014 at 11:52 AM
> >>>> Subject: [dpdk-dev] Symmetric RSS Hashing in DPDK
> >>>> To: dev@dpdk.org
> >>>> Cc: Steve Noble <snoble@sidebandnetworks.com>, Jun Du <
> >>>> jdu@sidebandnetworks.com>, Ashish Juneja
> >>>> <ajuneja@sidebandnetworks.com>
> >>>>
> >>>> Hello,
> >>>>
> >>>> My DPDK application requires bidirectional TCP flows to have the
> >>>> same RSS hash however default RSS hashing is *asymmetric*.
> >>>>
> >>>>
> >>>> There are posts such as:
> >>>> http://dpdk.info/ml/archives/dev/2014-February/001460.html
> >>>>
> >>>> which point to a symmetric RSS key(0x6d5a). I have tried using it
> >>>> but it is still hashing bi-directional flows separately. I am using
> >>>> an 82599 NIC.
> >>>>
> >>>> Have others come across this? What other options are available(I
> >>>> presume S/W hashing)?
> >>>>
> >>>> Appreciate any help I can get on this :)
> >>>>
> >>>> #define RSS_HASH_KEY_LENGTH 40
> >>>> static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = {
> >>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
> >>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
> >>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
> >>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
> >>>>        0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, }; //
> >>>> ethernet rx config static struct rte_eth_conf port_conf = {
> >>>>    .rxmode = {
> >>>>        .mq_mode    = ETH_MQ_RX_RSS,
> >>>>        .split_hdr_size = 0,
> >>>>        .header_split   = 0, /**< Header Split disabled */
> >>>>        .hw_ip_checksum = 1, /**< IP checksum offload enabled */
> >>>>        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
> >>>>        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
> >>>>        .hw_strip_crc   = 0, /**< CRC stripped by hardware */
> >>>>    },
> >>>>    .rx_adv_conf = {
> >>>>        .rss_conf = {
> >>>>            .rss_key = hash_key,
> >>>>            .rss_hf  = ETH_RSS_PROTO_MASK,
> >>>>        },
> >>>>    },
> >>>>    .txmode = {
> >>>>                .mq_mode = ETH_MQ_TX_NONE,
> >>>>    },
> >>>> };
> >>>>
> >>>>
> >>>> Thanks,
> >>>> Kam
> >>>>
> >>>

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

* Re: [dpdk-dev] Symmetric RSS Hashing in DPDK
  2014-12-18  6:55         ` Jim Thompson
  2014-12-18  7:41           ` Zhang, Helin
@ 2014-12-18  9:08           ` Franck Baudin
  1 sibling, 0 replies; 6+ messages in thread
From: Franck Baudin @ 2014-12-18  9:08 UTC (permalink / raw)
  To: dev

On 12/18/14 07:55, Jim Thompson wrote:
> The issues are outlined in this paper: http://www.ndsl.kaist.edu/~shinae/papers/TR-symRSS.pdf

If the RSS scope is limited to IP addresses (2-tuple instead of a 
5-tuple), do we have a symmetric distribution with the default RSS key 
provided by DPDK with 82599 NICs?

Thanks,
Franck

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

end of thread, other threads:[~2014-12-18  9:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-16 19:52 [dpdk-dev] Symmetric RSS Hashing in DPDK Kamraan Nasim
     [not found] ` <CAOhi=LGc68UAe3tK2XPrCZVRAYWxzo5tZp5wtStpd5qdy=-qfw@mail.gmail.com>
     [not found]   ` <CABmQaND9TYt8cenMR-3Bqhxq42hid9_GHMf+t-nR9HoND7uJ5g@mail.gmail.com>
2014-12-17 19:12     ` Kamraan Nasim
2014-12-18  1:28       ` Kamraan Nasim
2014-12-18  6:55         ` Jim Thompson
2014-12-18  7:41           ` Zhang, Helin
2014-12-18  9:08           ` Franck Baudin

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