[ovs-dev] [PATCH] ovs-xapi-sync: Always set iface-id, not just when xs-vif-uuid changes.

Justin Pettit jpettit at nicira.com
Thu Feb 2 19:42:50 UTC 2012


On Feb 1, 2012, at 5:19 PM, Ben Pfaff wrote:

> On Wed, Feb 01, 2012 at 04:57:35PM -0800, Justin Pettit wrote:
>> On Feb 1, 2012, at 2:58 PM, Ben Pfaff wrote:
>> 
>>> +            xvu = row.external_ids.get("xs-vif-uuid")
>>> +            if xvu:
>>> +                iface_id = (new_iface_ids.get(xvu)
>>> +                            or iface_ids.get(xvu)
>>> +                            or get_iface_id(row.name, xvu))
>> 
>> Doesn't this prefer an old iface_id (in "iface_ids") over a new one
>> (through get_iface_id())?  Is that intended behavior?  Is your
>> concern about making a bunch of XAPI checks to get
>> "nicira-iface-id"?
> 
> The intent is that the new caching behavior should be the same as the
> old caching behavior.  In either case, after we translate a
> xs-vif-uuid to an iface-id once, we cache the translation until the
> xs-vif-uuid is no longer in use.  That's the intention, anyhow.  Do
> you see a change?

It was a general comment, but it seems like the current behavior has been okay, so no need to change it--especially since those XAPI calls aren't necessarily cheap.

This code does change things slightly because if "xs-vif-uuid" goes away, the "iface-id" will, too.  However, that seems reasonable to me.

--Justin





More information about the dev mailing list