Following patch keeps raw hash value (derived from key) in sw_flow. So that new seed value can be used to find hash bucket.
This patch is required for next patch related to hash-table re-hashing. Signed-off-by: Pravin B Shelar <pshe...@nicira.com> --- datapath/flow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/datapath/flow.c b/datapath/flow.c index c6f591a..a357077 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -290,6 +290,7 @@ struct sw_flow *ovs_flow_alloc(void) static struct hlist_head *find_bucket(struct flow_table *table, u32 hash) { + hash = jhash_1word(hash, hash_seed); return flex_array_get(table->buckets, (hash & (table->n_buckets - 1))); } @@ -813,7 +814,7 @@ out: u32 ovs_flow_hash(const struct sw_flow_key *key, int key_len) { - return jhash2((u32 *)key, DIV_ROUND_UP(key_len, sizeof(u32)), hash_seed); + return jhash2((u32 *)key, DIV_ROUND_UP(key_len, sizeof(u32)), 0); } struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *table, -- 1.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev