On Thu, Apr 02, 2015 at 07:30:28PM -0400, Russell Bryant wrote:
> On 04/02/2015 06:58 PM, Ben Pfaff wrote:
> > On Thu, Apr 02, 2015 at 05:42:15PM -0400, Russell Bryant wrote:
> >> When ovn-nbd gets notified that the contents of the OVN_Northbound
> >> database have changed, it will now ensure that the contents of the
> >> Bindings table in the OVN database are up to date.  It will create a
> >> binding if none exists.  If one does exist, it will update its
> >> contents as necessary, though today the only thing supported is the
> >> list of MAC addresses.  Finally, any binding associated with a logical
> >> port that has been deleted will be removed from the OVN database.
> >>
> >> Signed-off-by: Russell Bryant <rbry...@redhat.com>
> > 
> > This code assumes that the 'logical_port' column in Bindings is always
> > a UUID.  I guess maybe that's what we're using in OpenStack, but it
> > would be more general if we did not assume a particular format.  I
> > don't think that's really harder--it's just a matter of hashing and
> > comparing strings instead of UUIDs.  I don't think you even need to
> > xstrdup() and free() the string values since you're not keeping them
> > across an ovsdb_idl_run().
> 
> Thanks for the quick review!
> 
> Based on how it's written, the logical_port column in Bindings is always
> a UUID, because it's copying the logical port row's UUID into it.  I
> remember now that it's supposed to be the name.  Otherwise,
> ovn-controller would never be able to match it to an iface-id.  Oops.

Right.

> I also realized that setting the MAC addresses will always be present in
> the transaction for all existing Bindings, even if they haven't changed,
> which is silly.

The IDL should be smart enough to skip sending that to the database
server, but it's even better if we can optimize it out earlier.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to