On Fri, Jan 22, 2016 at 03:12:08PM -0800, William Tu wrote:
> I'm reading through the lib/cmap.c and I wonder if we need an extra lock at
> cmap_insert_bfs().
> 
> When cmap_insert_bfs() found a path and started to move all elements
> backward, it goes through the for loop below and calls cmap_set_bucket()
> one-by-one, and eventually place the new_node. However, is it possible that
> another writer at the same time inserts an element, which is among one of
> the elements in the path, as a result, making the path no longer valid?

No, cmap is single-writer, any writer has to hold an exclusive lock
anyway.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to