Hi OVS-Team: We are porting OVS onto one of our hardware and I had a question in the kernel datapath implementation.
In the function - *masked_flow_lookup* ovs_flow_mask_key(&masked_key, unmasked, mask); hash = flow_hash(&masked_key, &mask->range); head = find_bucket(ti, hash); (*n_mask_hit)++; hlist_for_each_entry_rcu(flow, head, flow_table.node[ti->node_ver]) { if (flow->mask == mask && flow->flow_table.hash == hash && flow_cmp_masked_key(flow, &masked_key, &mask->range)) return flow; } why is that the code compares the flow->mask == mask; is it not enough to just compare the key?? Is it just an optimization?? If mask comparison is needed, can you please explain the traffic context that makes this necessary? The reason I'm asking is that, we have some space issues and cannot store anymore than the keys in the hardware structure. If the mask comparison is not needed, we may want to skip it. If it is needed, we will have to compromise on some of the key elements. Regards, Prathap
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss