[ovs-dev] ip_src_flow

Ben Pfaff blp at nicira.com
Tue Aug 27 18:12:52 UTC 2013


On Fri, Aug 23, 2013 at 04:06:13PM -0700, Jarno Rajahalme wrote:
> 
> On Aug 23, 2013, at 1:33 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > On Fri, Aug 23, 2013 at 12:46:47PM -0700, Jarno Rajahalme wrote:
> >> On Aug 23, 2013, at 11:26 AM, Ben Pfaff <blp at nicira.com> wrote:
> >>> Looking at tnl_find() in ofproto/tunnel.c, it maintains the invariant
> >>> "set <field> to 0 if and only if we set <field>_flow to true", except
> >>> for <field> = ip_src.  Is that a bug?
> >>> 
> >> 
> >> No, it is not a bug. Tunnel config allows you to leave local address
> >> unset (=0), allowing the selected route to determine the source
> >> address to use. Even more, it looks like find_route() in kernel
> >> might override the source address, even if it is given (in the
> >> config, or in the flow with _flow set to true).
> > 
> > I see, thanks.
> > 
> > The code might be more obviously correct like this.  If anyone agrees
> > then I'll check it over and write it up formally.
> 
> There is now maybe some duplicate initialization of different tnl_match
> instances between this function and it's sole caller. Maybe pass in a
> const flow * and pick up the pieces for each round from there instead?

Thanks, that's better.

I posted a patch for official review:
        http://openvswitch.org/pipermail/dev/2013-August/031136.html



More information about the dev mailing list