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

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Nov 3 09:59:10 CET 2014

2014-11-03 08:18, Zhang, Helin:
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> > 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.

Yes but this patch is only changing rss_key_default so I guess it's
only related to RSS, right?

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

Here, you remove the call to rte_rand by a constant value.

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

More information about the dev mailing list