[ovs-dev] [PATCH 00/10] Add actions for egress loopback

Ben Pfaff blp at ovn.org
Fri Jan 20 23:33:34 UTC 2017


On Fri, Jan 20, 2017 at 03:17:19PM -0800, Mickey Spiegel wrote:
> On Fri, Jan 20, 2017 at 2:43 PM, Ben Pfaff <blp at ovn.org> wrote:
> 
> > On Fri, Jan 20, 2017 at 12:29:49PM -0800, Mickey Spiegel wrote:
> > > On Fri, Jan 20, 2017 at 9:16 AM, Ben Pfaff <blp at ovn.org> wrote:
> > >
> > > > I believe that, with these patches, egress loopback as proposed by
> > Mickey's
> > > > patches can be implemented with:
> > > >     clone { inport = outport; outport = ""; flags.loopback = 0;
> > > >             reg0 = 0; reg1 = 0; ... regN = 0;
> > > >             next(pipeline=ingress, table=0); }
> > > >
> > >
> > > My main concern is maintainability as new flags or registers are added.
> > > Having one line of code buried deep inside ovn/northd/ovn-northd.c that
> > > needs to be updated whenever a flag or register is added worries me.
> > > Does it make sense to add "clear_regs" and "clear_flags" actions in
> > > order to address that concern?
> >
> > > I would also need to add in_port to symtab in ovn/lib/logical-fields.c so
> > > that I can clear it.
> >
> > Can you explain why in_port needs to be cleared?
> >
> 
> My thought was that the packet should look like it arrived on the
> distributed gateway port.
> One question is whether there can be any bad implications if
> in_port and logical inport do not match?
> It is also possible that the packet will return back to the original
> port after SNAT and DNAT on the distributed gateway port, so
> if I do not clear in_port then I would have to set flags.loopback.

Once a packet has been translated from physical to logical, the only
real use of in_port is to discard packets that would loop back on the
physical input port.  If we want to disable that, one way to do it is to
set flags.loopback to 1, although that also disables discarding packets
that would loop back to the logical input port.


More information about the dev mailing list