[ovs-dev] classifier versioning and rule_dpif_try_ref()

Ben Pfaff blp at nicira.com
Sun Aug 2 18:52:08 UTC 2015


On Sat, Aug 01, 2015 at 11:03:49AM -0700, Jarno Rajahalme wrote:
> 
> > On Jul 31, 2015, at 21:54, Ben Pfaff <blp at nicira.com> wrote:
> > 
> > Now that the classifier is versioned, is it still possible for
> > rule_dpif_try_ref() to return false?  Specifically, can we change the
> > loop in rule_dpif_lookup_in_table() to do an ordinary ref instead of a
> > try_ref?
> > 
> > My motive is that, if we could change it, then we could drop the
> > 'take_ref' parameter from rule_dpif_lookup_from_table(), instead letting
> > the caller take the ref if it wants it, which seems like a cleaner
> > interface.  But, of course, correctness is more important.
> 
> Right, now rule removal is rcu postponed after a version bump, so the
> rule is not removed while the lookup on the old version is in
> progress, so it is safe to make this change.

Thanks, I sent out a patch:
        http://openvswitch.org/pipermail/dev/2015-August/058448.html
I don't know whether the commit message is clear enough.



More information about the dev mailing list