Commit d916785ce98c("dpif-netdev: Fix improper use of CMAP_FOR_EACH.") fixes a problem that's worth documenting.
Requested-by: Jarno Rajahalme <ja...@ovn.org> Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com> --- lib/cmap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cmap.h b/lib/cmap.h index c653424..c7c65af 100644 --- a/lib/cmap.h +++ b/lib/cmap.h @@ -169,6 +169,11 @@ unsigned long cmap_find_batch(const struct cmap *cmap, unsigned long map, * node being deleted may be visited once or not at all. Other nodes * will be visited once.) * + * - If the cmap is changing, it is not safe to quiesce while iterating. + * Even if the changes are done by the same thread that's performing the + * iteration (Corollary: it is not safe to call cmap_remove() and quiesce + * in the loop body). + * * * Example * ======= -- 2.1.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev