On Wed, Jan 29, 2014 at 11:22 AM, Pravin Shelar <pshe...@nicira.com> wrote: > On Wed, Jan 29, 2014 at 10:44 AM, Jesse Gross <je...@nicira.com> wrote: >> On Wed, Jan 29, 2014 at 9:20 AM, <pshe...@nicira.com> wrote: >>> From: Pravin <pshe...@nicira.com> >>> >>> ovs_flow_free() is not called under ovs-lock during packet >>> execute path. Since packet execute does not touch flow->mask, >>> there is no need to take that lock either. So move assert in >>> case where flow->mask is checked. >>> >>> Found by code inspection. >>> >>> Signed-off-by: Pravin B Shelar <pshe...@nicira.com> >> >> The idea for putting it here is that callers should always hold OVS >> mutex and by putting the check earlier it increases the chances that >> problems will be caught sooner. > > But it is not protecting any data outside of that flow->mask case, so > it is not required.
I agree that it's not required but I don't understand the benefit to removing it. Are there cases where we want to call this function where OVS mutex isn't held because there is no flow mask? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev