[ovs-dev] [PATCH 2/3] datapath: Optimize flow key match for non tunnel flows.

Ben Pfaff blp at nicira.com
Wed Oct 17 22:52:12 UTC 2012

On Sun, Oct 14, 2012 at 06:41:25PM -0700, Pravin B Shelar wrote:
> Following patch adds start offset for sw_flow-key, so that we can
> skip tunneling information in key for non-tunnel flows.
> Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
> CC: Kyle Mestery <kmestery at cisco.com>
> Cc: Simon Horman <horms at verge.net.au>
> Cc: Jesse Gross <jesse at nicira.com>

Does this actually speed up the fast path?  (Did you measure it?)

In struct sw_flow_key, why put tun inside phy?  Why not just move it
to the beginning without nesting it?  Why change tun from struct to
(one-member) union?

When a range is expressed as an offset and a length, I expect that the
length is relative to the offset, not to the start of the buffer.  The
usage here is more like what I'd expect to be called a start and an
end, not an offset and a length.

In ovs_flow_tbl_lookup(), I think there's a (faint) possibility that
the key and the hash are equal, but the bucket's key_offset differs
from the searched-for key_offset, so I would check for a match in that

The ovs_flow_metadata_from_nlattrs() change seems almost unrelated to
the main goal of the patch.  I guess it's OK though.



More information about the dev mailing list