On Tue, Apr 17, 2012 at 05:08:52PM -0700, Ethan Jackson wrote: > > + facet = facet_lookup_valid(ofproto, flow, miss->hmap_node.hash); > > Pulling the hash out of hmap_node directly makes me a bit nervous. > Does it make sense to store the hash directly in struct flow_miss with > a comment about how it's computed? At minimum I think we should > document that handle_flow_miss() expects 'miss' to be in a hash table > which uses flow_hash() with a basis of zero as it's hash function.
OK, I added to handle_flow_miss(): uint32_t hash; /* The caller must ensure that miss->hmap_node.hash contains * flow_hash(miss->flow, 0). */ hash = miss->hmap_node.hash; and used 'hash' in place of miss->hmap_node.hash. Is that better? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev