At 2022-07-04 16:43:20, "Paolo Valerio" <[email protected]> wrote:
>Hello wenxu,
>
>thanks for having a look at it.
>
>wenxu <[email protected]> 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.
>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
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev