[ovs-dev] [PATCH] xlate: Perform bridge lookup before using xlate cache.

Jarno Rajahalme jarno at ovn.org
Wed Sep 7 00:01:02 UTC 2016


> On Sep 6, 2016, at 4:24 PM, Joe Stringer <joe at ovn.org> wrote:
> 
> On 2 September 2016 at 17:43, Jarno Rajahalme <jarno at ovn.org> wrote:
>> Bridges might get deleted while revalidation is going through the
>> xlate cache entries.  Thus we need to do the xbridge lookup before we
>> use the xlate cache, and use uuid's instead of pointers on xlate cache
>> entries that might refer to other bridges.
>> 
>> This has the side effect of not updating the learned flow or mac table
>> on a peer bridge if the first bridge is deleted.  Such cases should be
>> very rare though, as no-one has reported this bug so far.  So it
>> appears that this corner-case is not work the code complication
>> covering it would cause.
>> 
>> Found by inspection.
>> 
>> Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
> 
> As we discussed offline, this should not be possible. The main thread
> will call the ofproto's destruct() method, which in ofproto-dpif first
> calls xlate_remove_ofproto(), then udpif_synchronize(), meaning that
> the ofproto cannot be looked up, then all threads stop and the main
> thread flushes all datapath flows and udpif (including ukey,
> xlate_cache) state before restarting udpif. Subsequent incoming
> packets will fail to find the ofproto being deleted, so there should
> be no inappropriate deref of ofproto pointers.

Right, no need for this patch then,

  Jarno





More information about the dev mailing list