On Fri, Nov 20, 2020 at 12:44:30PM -0500, Ihar Hrachyshka wrote:
> On Thu, Nov 19, 2020 at 12:19 PM Ben Pfaff <[email protected]> wrote:
> >
> > On Thu, Nov 19, 2020 at 08:31:44AM -0500, Ihar Hrachyshka wrote:
> > > On Thu, Nov 19, 2020 at 12:51 AM Ben Pfaff <[email protected]> wrote:
> > > >
> > > > On Wed, Nov 18, 2020 at 10:35:01PM -0500, Ihar Hrachyshka wrote:
> > > > > It's a legal setup where tunnel ports with the same config are created
> > > > > on different bridges served by Open vSwitch. Specifically, multiple
> > > > > OVN controllers may emulate multiple chassis running on the same
> > > > > physical host, in which case they may need to create separate tunnel
> > > > > ports to connect to the same remote chassis on their respective
> > > > > bridges.
> > > > >
> > > > > Signed-off-by: Ihar Hrachyshka <[email protected]>
> > > >
> > > > That makes sense for sending packets, but which one is supposed to
> > > > receive a packet when one arrives for that tunnel?
> > > >
> > >
> > > If we are talking in OVN context, each virtual ovn-controller chassis
> > > on the same host has to have a different IP / port to distinguish
> > > between chassis. I don't think it's a useful configuration to have two
> > > two incoming tunnel ports with the same config for the same IP that
> > > are not served by separate DST IP addresses.
> >
> > I think that this code rejects tunnel ports with exactly the same
> > configuration, though.  If the two ports were configured with different
> > local IP addresses, then this code would not flag a conflict.  Do I
> > misunderstand?
> >
> 
> Local IP addresses are not part of tunnel interface options map. Only
> remote_ip and dst_port are. Does it address your concern?

I don't see where you're getting that.  Tunnel configuration allows both
local and remote IPs to be specified.  The match structure has slots for
both IP addresses, and both of them may be specified.

If the remote (or local) IP addresses are different, then this warning
won't come up.  And you said that the remote IP addresses are different:
"I don't think it's a useful configuration to have two two incoming
tunnel ports with the same config for the same IP that are not served by
separate DST IP addresses."

tnl_port_receive() looks up the tunnel that should receive a packet.  It
calls into tnl_find().  This calls tnl_find_exact() for each of several
lookup tables.  In the case where a warning would be given here, we know
that tnl_find_exact() would find two matching elements in the map,
because that's the function that we use to know to issue the warning.
If we disable the warning and insert the second match anyway, there will
be two elements in the map with exactly the same key, tnl_find_exact()
will only ever return one of them, thus the other will never receive any
packets.

What am I missing?
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to