DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Broken RSS hash computation on Intel 82574L
@ 2015-08-31 12:15 Martin Drašar
  2015-09-01 13:45 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Drašar @ 2015-08-31 12:15 UTC (permalink / raw)
  To: dev

Hi,

I am using RSS to get identical hash for both directions of a flow.
Everything is working as it should with the Intel 82599ES, but when I
run the same code with the Intel 82574L, then the hash is not calculated
correctly and returns 0 as a hash value for all flows.

I could use the Toeplitz hash implementation from 2.1.0, but I would
rather do it in hardware, because according to specification, 82574L can
do RSS in hardware.

Any ideas what might be wrong?

Thanks in advance,
Martin

conf:
#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 };

static const struct rte_eth_conf port_conf = {
  .link_speed  = 0,
  .link_duplex = 0,
  .rxmode = {
    .mq_mode        = ETH_RSS,
    .max_rx_pkt_len = 0,
    .split_hdr_size = 0,
    .header_split   = 0,
    .hw_ip_checksum = 0,
    .hw_vlan_filter = 0,
    .hw_vlan_strip  = 0,
    .hw_vlan_extend = 0,
    .jumbo_frame    = 0,
    .hw_strip_crc   = 0,
  },
  .txmode = {
    .mq_mode = ETH_DCB_NONE,
  },
  .lpbk_mode = 0,
  .rx_adv_conf = {
    .rss_conf = {
      .rss_key     = hash_key,
      .rss_key_len = RSS_HASH_KEY_LENGTH,
      .rss_hf      = ETH_RSS_PROTO_MASK,
      },
    },
};

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

* Re: [dpdk-dev] Broken RSS hash computation on Intel 82574L
  2015-08-31 12:15 [dpdk-dev] Broken RSS hash computation on Intel 82574L Martin Drašar
@ 2015-09-01 13:45 ` De Lara Guarch, Pablo
  2015-09-01 14:37   ` Martin Drašar
  0 siblings, 1 reply; 7+ messages in thread
From: De Lara Guarch, Pablo @ 2015-09-01 13:45 UTC (permalink / raw)
  To: Martin Drašar, dev

Hi Martin,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Martin Drašar
> Sent: Monday, August 31, 2015 1:16 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Broken RSS hash computation on Intel 82574L
> 
> Hi,
> 
> I am using RSS to get identical hash for both directions of a flow.
> Everything is working as it should with the Intel 82599ES, but when I
> run the same code with the Intel 82574L, then the hash is not calculated
> correctly and returns 0 as a hash value for all flows.
> 
> I could use the Toeplitz hash implementation from 2.1.0, but I would
> rather do it in hardware, because according to specification, 82574L can
> do RSS in hardware.
> 
> Any ideas what might be wrong?
> 
> Thanks in advance,
> Martin
> 
> conf:
> #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 };
> 
> static const struct rte_eth_conf port_conf = {
>   .link_speed  = 0,
>   .link_duplex = 0,
>   .rxmode = {
>     .mq_mode        = ETH_RSS,
>     .max_rx_pkt_len = 0,
>     .split_hdr_size = 0,
>     .header_split   = 0,
>     .hw_ip_checksum = 0,
>     .hw_vlan_filter = 0,
>     .hw_vlan_strip  = 0,
>     .hw_vlan_extend = 0,
>     .jumbo_frame    = 0,
>     .hw_strip_crc   = 0,
>   },
>   .txmode = {
>     .mq_mode = ETH_DCB_NONE,
>   },
>   .lpbk_mode = 0,
>   .rx_adv_conf = {
>     .rss_conf = {
>       .rss_key     = hash_key,
>       .rss_key_len = RSS_HASH_KEY_LENGTH,
>       .rss_hf      = ETH_RSS_PROTO_MASK,
>       },
>     },
> };

82574L NIC uses em PMD, which does not support more than 1 queue.
Therefore RSS is disabled in the NIC and then you cannot have RSS hashes.

Thanks,
Pablo

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

* Re: [dpdk-dev] Broken RSS hash computation on Intel 82574L
  2015-09-01 13:45 ` De Lara Guarch, Pablo
@ 2015-09-01 14:37   ` Martin Drašar
  2015-09-01 14:47     ` Matthew Hall
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Drašar @ 2015-09-01 14:37 UTC (permalink / raw)
  To: dev

Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a):
> 82574L NIC uses em PMD, which does not support more than 1 queue.
> Therefore RSS is disabled in the NIC and then you cannot have RSS hashes.
> 
> Thanks,
> Pablo

Hi Pablo,

that is an interesting information. I read the rationale in em_ethdev.c
and I was wondering, what would have to be done to enable RSS hash
computation on that card. I can live with just one RX queue, but hashes
would help me a lot. The computer which is using those NICs is not that
powerful and every bit of offloaded computation counts...

Thanks,
Martin

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

* Re: [dpdk-dev] Broken RSS hash computation on Intel 82574L
  2015-09-01 14:37   ` Martin Drašar
@ 2015-09-01 14:47     ` Matthew Hall
  2015-09-01 14:50       ` Avi Kivity
  2015-09-01 15:19       ` Jim Thompson
  0 siblings, 2 replies; 7+ messages in thread
From: Matthew Hall @ 2015-09-01 14:47 UTC (permalink / raw)
  To: Martin Drašar; +Cc: dev

On Tue, Sep 01, 2015 at 04:37:18PM +0200, Martin Drašar wrote:
> Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a):
> > 82574L NIC uses em PMD, which does not support more than 1 queue.
> > Therefore RSS is disabled in the NIC and then you cannot have RSS hashes.
> > 
> > Thanks,
> > Pablo
> 
> Hi Pablo,
> 
> that is an interesting information. I read the rationale in em_ethdev.c
> and I was wondering, what would have to be done to enable RSS hash
> computation on that card. I can live with just one RX queue, but hashes
> would help me a lot. The computer which is using those NICs is not that
> powerful and every bit of offloaded computation counts...
> 
> Thanks,
> Martin

RSS calculations are used to direct packets across multiple RX queues. With 
only one RX queue it cannot possibly increase performance by enabling it.

Matthew.

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

* Re: [dpdk-dev] Broken RSS hash computation on Intel 82574L
  2015-09-01 14:47     ` Matthew Hall
@ 2015-09-01 14:50       ` Avi Kivity
  2015-09-01 15:00         ` Martin Drašar
  2015-09-01 15:19       ` Jim Thompson
  1 sibling, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2015-09-01 14:50 UTC (permalink / raw)
  To: Matthew Hall, Martin Drašar; +Cc: dev

On 09/01/2015 05:47 PM, Matthew Hall wrote:
> On Tue, Sep 01, 2015 at 04:37:18PM +0200, Martin Drašar wrote:
>> Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a):
>>> 82574L NIC uses em PMD, which does not support more than 1 queue.
>>> Therefore RSS is disabled in the NIC and then you cannot have RSS hashes.
>>>
>>> Thanks,
>>> Pablo
>> Hi Pablo,
>>
>> that is an interesting information. I read the rationale in em_ethdev.c
>> and I was wondering, what would have to be done to enable RSS hash
>> computation on that card. I can live with just one RX queue, but hashes
>> would help me a lot. The computer which is using those NICs is not that
>> powerful and every bit of offloaded computation counts...
>>
>> Thanks,
>> Martin
> RSS calculations are used to direct packets across multiple RX queues. With
> only one RX queue it cannot possibly increase performance by enabling it.
>

As an example, seastar uses the RSS hash computed by the NIC to select a 
core to process on, if the number of hardware queues is smaller than the 
number of cores.

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

* Re: [dpdk-dev] Broken RSS hash computation on Intel 82574L
  2015-09-01 14:50       ` Avi Kivity
@ 2015-09-01 15:00         ` Martin Drašar
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Drašar @ 2015-09-01 15:00 UTC (permalink / raw)
  Cc: dev

Dne 1.9.2015 v 16:50 Avi Kivity napsal(a):
> On 09/01/2015 05:47 PM, Matthew Hall wrote:
>> RSS calculations are used to direct packets across multiple RX queues.
>> With
>> only one RX queue it cannot possibly increase performance by enabling it.
>>
> 
> As an example, seastar uses the RSS hash computed by the NIC to select a
> core to process on, if the number of hardware queues is smaller than the
> number of cores.

Yep, we use the hash for pairing of flows and other more complicated
packet processing.

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

* Re: [dpdk-dev] Broken RSS hash computation on Intel 82574L
  2015-09-01 14:47     ` Matthew Hall
  2015-09-01 14:50       ` Avi Kivity
@ 2015-09-01 15:19       ` Jim Thompson
  1 sibling, 0 replies; 7+ messages in thread
From: Jim Thompson @ 2015-09-01 15:19 UTC (permalink / raw)
  To: Matthew Hall; +Cc: dev


> On Sep 1, 2015, at 9:47 AM, Matthew Hall <mhall@mhcomputing.net> wrote:
> 
> On Tue, Sep 01, 2015 at 04:37:18PM +0200, Martin Drašar wrote:
>> Dne 1.9.2015 v 15:45 De Lara Guarch, Pablo napsal(a):
>>> 82574L NIC uses em PMD, which does not support more than 1 queue.
>>> Therefore RSS is disabled in the NIC and then you cannot have RSS hashes.
>>> 
>>> Thanks,
>>> Pablo
>> 
>> Hi Pablo,
>> 
>> that is an interesting information. I read the rationale in em_ethdev.c
>> and I was wondering, what would have to be done to enable RSS hash
>> computation on that card. I can live with just one RX queue, but hashes
>> would help me a lot. The computer which is using those NICs is not that
>> powerful and every bit of offloaded computation counts...
>> 
>> Thanks,
>> Martin
> 
> RSS calculations are used to direct packets across multiple RX queues. With 
> only one RX queue it cannot possibly increase performance by enabling it.

Well, there are other things you could use that hw-provided hash for…

(but point-taken)

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

end of thread, other threads:[~2015-09-01 15:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 12:15 [dpdk-dev] Broken RSS hash computation on Intel 82574L Martin Drašar
2015-09-01 13:45 ` De Lara Guarch, Pablo
2015-09-01 14:37   ` Martin Drašar
2015-09-01 14:47     ` Matthew Hall
2015-09-01 14:50       ` Avi Kivity
2015-09-01 15:00         ` Martin Drašar
2015-09-01 15:19       ` Jim Thompson

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