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

Pravin Shelar pshelar at nicira.com
Wed Oct 17 23:09:52 UTC 2012

On Wed, Oct 17, 2012 at 3:52 PM, Ben Pfaff <blp at nicira.com> wrote:
> 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?)
perf does show flow hashing as one of top symbol in netperf test.

> 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?
tun_id was always in phy, that why I kept it in phy. once we have
support for ipv6 tunnels it will be union, so I am changed it to
union. if you want I can revert it.

> 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
> also.
I am not sure I understand that possibility, non-tunnel and tunnel
keys can not be same as key still have in_port as differentiator.


More information about the dev mailing list