On Oct 6, 2014, at 3:01 PM, Ben Pfaff <b...@nicira.com> wrote: > On Wed, Oct 01, 2014 at 04:02:34PM -0700, Jarno Rajahalme wrote: >> miniflow_extract_from_flow() is faster than miniflow_init(), since it >> does not scan the fields not significant for the packet type. More >> importantly, it produces the same layout as miniflow_extract, which >> does not try to compress zero-valued packet header fields. >> >> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com> > > I'm surprised that it's faster, since it's much more complex. > > As for the layout, I can believe that it's the same (though it is > somewhat tricky to verify), but I wonder how to ensure that that > property is correctly maintained over time. Do you have any thoughts?
I realized that Joe’s flow ID patches will make this patch mostly unnecessary, so I decided to drop this patch. There is one remaining case where we need to convert a struct flow to struct netdev_flow_key. This is in dpif_netdev_flow_put(), which is no longer used for upcall processing (it is still used by probes). Since dpif_netdev_flow_put() is no longer performance critical, I decided to use flow_compose() and miniflow_extract() to first convert struct flow to a packet, and then extract it to a miniflow. This is trivially correct, so there is no issue with code maintenance in this regard. Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev