wenxu  <wenx05124...@163.com> writes:

> At 2022-07-04 16:43:20, "Paolo Valerio" <pvale...@redhat.com> wrote:
>>Hello wenxu,
>>
>>thanks for having a look at it.
>>
>>wenxu  <wenx05124...@163.com> writes:
>>
>>> Hi Paolo,
>>>
>>> There are two small question.
>>> First the ct_lock lock/unlock as below maybe also can be dropped with this
>>> patch ?
>>>
>>>        ovs_mutex_lock(&ct->ct_lock);
>>>         if (!conn_lookup(ct, &ctx->key, now, NULL, NULL)) {
>>>             conn = conn_not_found(ct, pkt, ctx, commit, now, 
>>> nat_action_info,
>>>                                   helper, alg_exp, ct_alg_ctl, tp_id);
>>>         }
>>>         ovs_mutex_unlock(&ct->ct_lock);
>>>
>>
>>The locked lookup/insertion should be kept, as it could lead e.g. to a
>>double insertion in the case we lookup without locking.
> Yes, What I mean is narrow the region of the lock. Only the insertion
> need this lock.
>

Just to clarify what I was referring to in my previous email [1].

[1] 
http://patchwork.ozlabs.org/project/openvswitch/patch/9ae8ad243da85be4853b90eccc958600dace7726.1623786081.git.gr...@u256.net/#2728678

>>But you're right, in general, there should be room for improvement
>>because we could probably narrow the region we lock.
>>IMO, we should keep this out of this series, and maybe follow up
>>later, to avoid introducing too many changes at once.
>>

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to