On Nov 14, 2014, at 1:38 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Nov 13, 2014 at 11:56:15AM -0800, Jarno Rajahalme wrote: >> Almost all classifier users already exclude concurrent modifications, >> or are single-threaded, hence the classifier internal mutex can be >> removed. Due to this change, ovs-router.c and tnl-ports.c need new >> mutexes, which are added. >> >> Suggested-by: Ben Pfaff <b...@nicira.com> >> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com> > > I am not sure I fully understand the synchronization rules for the > ovs-router code. At first glance, it seems like rt_entry_delete() and > ovs_router_flush() need external mutual exclusion, e.g. to prevent two > concurrent calls to rt_entry_delete() from deleting the same rule > twice. But maybe it is safe anyway because classifier_remove() checks > that the rule has not already been deleted and freeing of the rule's > memory is RCU-protected?
Yes, the first thread that gets to remove the rule from the classifier get to ovsrcu_postpone it, too. > > I think that ovs_router_flush() leaks the rules that it removes: > doesn't it need to do a postponed rt_entry_free()? > I sent a separate patch to fix this, maybe you can review that, too? > Acked-by: Ben Pfaff <b...@nicira.com> Thanks, will push soon. Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev