[ovs-dev] [PATCH] lib/classifier: Make classifier_remove() more robust.

Ben Pfaff blp at nicira.com
Fri Oct 10 15:29:08 UTC 2014


On Thu, Oct 09, 2014 at 04:21:51PM -0700, Jarno Rajahalme wrote:
> classifier already provides lockless lookups, and protected
> modifications.  When user wants to remove a flow, we currently require
> the flow to exist in the classifier.  To be thread safe, this requires
> the caller to introduce their own mutex, lock it before a lookup, and
> then issue classifier_remove() while the lock is still held.
> 
> This patch relaxes the "existence requirement" of the rule in
> classifier_remove(), allowing it to be called on a rule that may have
> already been removed from the classifier.  This allows users to do a
> classifier_lookup() and classifier_remove() without additional
> syncronization.
> 
> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>

Are you intending to use this property in dpif-netdev then?

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list