[dpdk-dev] [PATCH v5 1/5] i40e: Use constant random hash keys

Zhang, Helin helin.zhang at intel.com
Mon Nov 3 09:18:40 CET 2014


Hi Thomas

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Monday, November 3, 2014 3:50 PM
> To: Zhang, Helin
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v5 1/5] i40e: Use constant random hash keys
> 
> Hi Helin,
> 
> The title is a bit surprising:
> - it should be about RSS
RSS makes use of hash function to route received packets, though hash function can be used for other cases, e.g. Flow director.

> - a constant cannot be really random ;)
The hash keys are generated by libc random function. It is preparatory to avoid calling random function for each port.

> 
> 2014-10-21 11:14, Helin Zhang:
> > To be simpler, and remove the race condition, it uses prepared
> > constant random hash keys to replace runtime generating the hash keys.
> 
> Could you explain what is the role of rss_key_default?
Hash function needs to be configured with keys, before end users configured them with specific keys, we need to provide a default keys which is generated by libc random function.
The random keys can get the hash function to route the received packets to all the queues well-proportioned.

> 
> Thanks
> --
> Thomas

Regards,
Helin


More information about the dev mailing list