On May 8, 2013, at 11:13 , ext Rajahalme, Jarno (NSN - FI/Espoo) wrote: >> >> old_rule = insert_rule(cls, table, rule); >> if (!old_rule) { >> + if (minimask_get_metadata_mask(&rule->match.mask) == OVS_BE64_MAX) { >> + ovs_be64 metadata = miniflow_get_metadata(&rule->match.flow); >> + rule->partition = create_partition(cls, table, metadata); > > I guess that Andy's comment on masked metadata support would be a > generalization to this, where the metadata mask would be made part of the > cls_partition, and the hmap would be keyed by the combination of the (masked) > metadata and the mask. It would be pretty straightforward, but would be a bit > more work. With this generalization this part would look like something like > this: > > ovs_be64 metadata_mask = > minimask_get_metadata_mask(&rule->match.mask); > if (metadata_mask) { > ovs_be64 metadata = miniflow_get_metadata(&rule->match.flow); > rule->partition = create_partition(cls, table, metadata, > metadata_mask); > > Corresponding changes would be needed elsewhere. > > I have no idea of the performance impact, though. >
Just came to think that on lookup this would need a separate find_partition() call for each table (with the table's metadata mask), which would not be very efficient. So, unless there is a use case that would benefit from the masked metadata partitioning, it likely would not be worth the additional cost. Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev