[ovs-discuss] flow hash calculation in open vswitch.
Ben Pfaff
blp at nicira.com
Wed Apr 14 04:41:17 UTC 2010
On Wed, Apr 14, 2010 at 12:26:59AM -0400, mandar284 at aim.com wrote:
> Does all the members of struct odp_flow_key? are used in hash calculation ?
Yes.
> Can you please elaborate the parameters used in hash calculations?
The code that calculates the hash is in datapath/flow.c:
static u32 flow_hash(const struct dp_table *table,
const struct odp_flow_key *key)
{
return jhash2((u32*)key, sizeof *key / sizeof(u32), table->hash_seed);
}
The only "parameter" here is table->hash_seed, which is randomly
generated when the flow table is created.
More information about the discuss
mailing list