]> git.proxmox.com Git - mirror_ovs.git/commit
datapath-windows: Optimize conntrack lock implementation.
authorAnand Kumar <kumaranand@vmware.com>
Mon, 29 Jan 2018 18:28:01 +0000 (10:28 -0800)
committerAlin Gabriel Serdean <aserdean@ovn.org>
Fri, 2 Feb 2018 20:46:32 +0000 (22:46 +0200)
commitb0b5ab8bbac73d1f430405c0a76cbc05f619f15a
treec99a8f59017ee5d8d7b6002bfb80e6300f0fba94
parentdea3880466200603cfe64ad21ab6a9d4687c505d
datapath-windows: Optimize conntrack lock implementation.

Currently, there is one global lock for conntrack module, which protects
conntrack entries and conntrack table. All the NAT operations are
performed holding this lock.

This becomes inefficient, as the number of conntrack entries grow.
With new implementation, we will have two PNDIS_RW_LOCK_EX locks in
conntrack.

1. ovsCtBucketLock - one rw lock per bucket of the conntrack table,
which is shared by all the ct entries that belong to the same bucket.
2. lock -  a rw lock in OVS_CT_ENTRY structure that protects the members
of conntrack entry.

Also, OVS_CT_ENTRY structure will have a lock reference(bucketLockRef)
to the corresponding OvsCtBucketLock of conntrack table.
We need this reference to retrieve ovsCtBucketLock from ct entry
for delete operation.

Signed-off-by: Anand Kumar <kumaranand@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
datapath-windows/ovsext/Conntrack-nat.c
datapath-windows/ovsext/Conntrack.c
datapath-windows/ovsext/Conntrack.h