[ovs-git] [openvswitch/ovs] c4d9f9: datapath-windows: Refactor conntrack code.

GitHub noreply at github.com
Fri Feb 2 20:49:59 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c4d9f9319f1a7956b7b308f65ba57995c5d93c92
      https://github.com/openvswitch/ovs/commit/c4d9f9319f1a7956b7b308f65ba57995c5d93c92
  Author: Anand Kumar <kumaranand at vmware.com>
  Date:   2018-02-02 (Fri, 02 Feb 2018)

  Changed paths:
    M datapath-windows/ovsext/Conntrack-nat.c
    M datapath-windows/ovsext/Conntrack.c
    M datapath-windows/ovsext/Conntrack.h

  Log Message:
  -----------
  datapath-windows: Refactor conntrack code.

Some of the functions and  code are refactored
so that new conntrack lock can be implemented

Signed-off-by: Anand Kumar <kumaranand at vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>


  Commit: dea3880466200603cfe64ad21ab6a9d4687c505d
      https://github.com/openvswitch/ovs/commit/dea3880466200603cfe64ad21ab6a9d4687c505d
  Author: Anand Kumar <kumaranand at vmware.com>
  Date:   2018-02-02 (Fri, 02 Feb 2018)

  Changed paths:
    M datapath-windows/ovsext/Conntrack.c

  Log Message:
  -----------
  datapath-windows: Add a global level RW lock for NAT

Currently NAT module relies on the existing conntrack lock.
This patch provides a basic lock implementation for NAT module
in conntrack.

Signed-off-by: Anand Kumar <kumaranand at vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>


  Commit: b0b5ab8bbac73d1f430405c0a76cbc05f619f15a
      https://github.com/openvswitch/ovs/commit/b0b5ab8bbac73d1f430405c0a76cbc05f619f15a
  Author: Anand Kumar <kumaranand at vmware.com>
  Date:   2018-02-02 (Fri, 02 Feb 2018)

  Changed paths:
    M datapath-windows/ovsext/Conntrack-nat.c
    M datapath-windows/ovsext/Conntrack.c
    M datapath-windows/ovsext/Conntrack.h

  Log Message:
  -----------
  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 at vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/79feb3b0de83...b0b5ab8bbac7


More information about the git mailing list