[ovs-git] [openvswitch/ovs] 3c33f0: lib/dpif-netdev: Make emc_mutex recursive.

GitHub noreply at github.com
Tue Sep 9 18:46:01 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 3c33f0ffe76c83f7ec1786175ef34f776892cc0d
      https://github.com/openvswitch/ovs/commit/3c33f0ffe76c83f7ec1786175ef34f776892cc0d
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-08 (Mon, 08 Sep 2014)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  lib/dpif-netdev: Make emc_mutex recursive.

dpif_netdev_execute may be called while doing upcall processing.
Since the context of the input port is not tracked upto this point, we
use the shared dp->emc_cache for packet execution, where the emc_cache
is needed for recirculation.

While recursive mutexes can make thread safety analysis hard, for now
we change emc_mutex to be recursive.  Forthcoming new unit tests will
fail with the current non-recursive mutex.  Later improvements may
remove the need for this recursion.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto at vmware.com>


  Commit: 9efd308e957c26ab42a5210cc9fc7300c7d021f0
      https://github.com/openvswitch/ovs/commit/9efd308e957c26ab42a5210cc9fc7300c7d021f0
  Author: Daniele Venturino <daniele.venturino at m3s.it>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M AUTHORS
    M NOTICE
    M lib/automake.mk
    M lib/packets.h
    A lib/rstp-common.h
    A lib/rstp-state-machines.c
    A lib/rstp-state-machines.h
    A lib/rstp.c
    A lib/rstp.h
    M lib/stp.h
    M ofproto/ofproto-dpif-xlate.c
    M ofproto/ofproto-dpif-xlate.h
    M ofproto/ofproto-dpif.c
    M ofproto/ofproto-provider.h
    M ofproto/ofproto.c
    M ofproto/ofproto.h
    M tests/.gitignore
    M tests/automake.mk
    M tests/ovs-vsctl.at
    A tests/rstp.at
    A tests/test-rstp.c
    M tests/testsuite.at
    M utilities/ovs-vsctl.8.in
    M vswitchd/bridge.c
    M vswitchd/vswitch.ovsschema
    M vswitchd/vswitch.xml

  Log Message:
  -----------
  Rapid Spanning Tree Protocol (IEEE 802.1D).

This is the v5 from June 12th, 2014, rebased to OVS master, further
changes in following patches.

Signed-off by: Daniele Venturino <daniele.venturino at m3s.it>
Signed-off by: Martino Fornasa <mf at fornasa.it>
Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: d62d7cb10299b0fa9cebf98a7e4e921d640afec9
      https://github.com/openvswitch/ovs/commit/d62d7cb10299b0fa9cebf98a7e4e921d640afec9
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M vswitchd/vswitch.xml

  Log Message:
  -----------
  vswitch.xml: Fix RSTP configuration documentation.

Move port's configuration options where they belong, add typing, and
correct errors.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 9a0bb428332bbff251465830a13dbfd1d0d865c3
      https://github.com/openvswitch/ovs/commit/9a0bb428332bbff251465830a13dbfd1d0d865c3
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M ofproto/ofproto-dpif.c
    M tests/rstp.at
    M tests/stp.at

  Log Message:
  -----------
  lib/stp,rstp: Add unit more unit tests.

Existing STP and RSTP test cases only test the protocols with test
utilities.  These tests test them as part of OVS using the
netdev-dummy device.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: fb20b0bf5d77268cc103b2c7a0f5b976f8d05773
      https://github.com/openvswitch/ovs/commit/fb20b0bf5d77268cc103b2c7a0f5b976f8d05773
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/stp.c
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  lib/stp: Some debugging support.

Set the stp port name before enabling it, so that debugging messages
have the name to print out.

Do not treat the first state initialization as a state change.  Zero
is not a valid state, so changing from zero to STP_DISABLED is not a
state change.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 4b30ba0546374145b59aab0de2d1983242bfca13
      https://github.com/openvswitch/ovs/commit/4b30ba0546374145b59aab0de2d1983242bfca13
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-common.h
    M lib/rstp-state-machines.c
    M lib/rstp.c
    M lib/rstp.h
    M ofproto/ofproto-dpif.c
    M vswitchd/bridge.c

  Log Message:
  -----------
  lib/rstp: Better debug messages, style fixes.

Remove unused struct rstp_priority_vector4 definition, fix coding
style, fix sparse warnings.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: aaab616a2d16b8018fb590da3d86c0583b7cf733
      https://github.com/openvswitch/ovs/commit/aaab616a2d16b8018fb590da3d86c0583b7cf733
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp.c

  Log Message:
  -----------
  lib/rstp: Refactor priority vector recalculation.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 801171c171985ba507c4af95cc814a0dc17ee571
      https://github.com/openvswitch/ovs/commit/801171c171985ba507c4af95cc814a0dc17ee571
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp.c

  Log Message:
  -----------
  lib/rstp: Refactor port number allocation.

Port number allocation was O(N^3), this refactoring will make it O(N^2).

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 54d3863b8522268f2d8d88f1f075eb3766c77aa8
      https://github.com/openvswitch/ovs/commit/54d3863b8522268f2d8d88f1f075eb3766c77aa8
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp.c
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  lib/rstp: Refactor port initialization.

Prior to this patch the default values for ports were set in three
different places.  This refactors them all to one helper function.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: cc33c223e2576e3eccf2b7e659b8934f2c9ca9b0
      https://github.com/openvswitch/ovs/commit/cc33c223e2576e3eccf2b7e659b8934f2c9ca9b0
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp.c
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  lib/rstp: CodingStyle changes.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 8fb76a0b7b821a74cca8d43a262e714a4148fd0e
      https://github.com/openvswitch/ovs/commit/8fb76a0b7b821a74cca8d43a262e714a4148fd0e
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp.c
    M lib/rstp.h

  Log Message:
  -----------
  lib/rstp: Inline trivial predicate functions.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: f025bcb7eabbb5598d2cb1f4cdd429b47a3743dc
      https://github.com/openvswitch/ovs/commit/f025bcb7eabbb5598d2cb1f4cdd429b47a3743dc
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-common.h
    M lib/rstp-state-machines.c
    M lib/rstp-state-machines.h
    M lib/rstp.c
    M lib/rstp.h
    M ofproto/ofproto-dpif-xlate.c
    M ofproto/ofproto-dpif-xlate.h
    M ofproto/ofproto-dpif.c
    M tests/rstp.at
    M tests/test-rstp.c

  Log Message:
  -----------
  lib/rstp: More robust thread safety.

Current code expects there to be a single thread that is responsible
for creating rstp and creating and deleting rstp_port objects.  rstp
objects are also deleted from other threads, as managed by reference
counting.

rstp port objects are not reference counted, which means that
references to rstp ports may only be held while holding the rstp
mutex, or by the thread that creates and deletes them.

This patch adds reference counting to RSTP ports, which allows ports
to be passed from ofproto-dpif to ofproto-dpif-xlate without using the
RSTP port number.  This simplifies RSTP port reconfiguration, as the
port need not be resynchronized with xlate if just the port number
changes.  This also avoids lookups on the processing of RSTP BPDUs.

This patch also:

1. Exposes the rstp mutex so that related thread safety annotations
   can be used also within rstp-state-machines.c.

2. Internal variants of most setter an getter functions are defined,
   suffixed with two underscores.  These are annotated to be callable
   only when the mutex is held.

3. Port setters were only called in a specific pattern.  The new external
   port setter combines them in a single rspt_port_set() function.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 6b90bc57e7a23b89a594ceb857f8267c8b4026df
      https://github.com/openvswitch/ovs/commit/6b90bc57e7a23b89a594ceb857f8267c8b4026df
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-common.h
    M lib/rstp-state-machines.c
    M lib/rstp.c
    M lib/rstp.h
    M ofproto/ofproto-dpif.c
    M tests/test-rstp.c

  Log Message:
  -----------
  lib/rstp: Remove lock recursion.

Change the RSTP send_bpdu interface so that a recursive mutex is not
needed.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 311fb15ba9cfe1b1044e53c846dd127b5caeb991
      https://github.com/openvswitch/ovs/commit/311fb15ba9cfe1b1044e53c846dd127b5caeb991
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-state-machines.c

  Log Message:
  -----------
  lib/rstp: CodingStyle fixes.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: a0478216c69a0d4ba06095d6cc67a3190dd8a309
      https://github.com/openvswitch/ovs/commit/a0478216c69a0d4ba06095d6cc67a3190dd8a309
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-state-machines.c

  Log Message:
  -----------
  lib/rstp: Simplify priority vector comparison.

Testing for sameness first makes the logic simpler to follow.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 37db915e434ab01b3c7cf131afd591f5bab46db9
      https://github.com/openvswitch/ovs/commit/37db915e434ab01b3c7cf131afd591f5bab46db9
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-common.h
    M lib/rstp-state-machines.c
    M lib/rstp.c

  Log Message:
  -----------
  lib/rstp: Eliminate ports_count.

It was only used to guard against unintialized list.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: d5f31dc8333304eb46ba7bf9fec1b602d7b76355
      https://github.com/openvswitch/ovs/commit/d5f31dc8333304eb46ba7bf9fec1b602d7b76355
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M lib/rstp-common.h
    M lib/rstp-state-machines.c
    M lib/rstp.c

  Log Message:
  -----------
  lib/rstp: Use hmap instead of a list for ports.

Finding a given port is faster.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Daniele Venturino <daniele.venturino at m3s.it>


  Commit: 3b2a7e92dc8477b920a330535e8c83568c06b7b3
      https://github.com/openvswitch/ovs/commit/3b2a7e92dc8477b920a330535e8c83568c06b7b3
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2014-09-09 (Tue, 09 Sep 2014)

  Changed paths:
    M NEWS

  Log Message:
  -----------
  NEWS: Mention RSTP.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/5545e7826896...3b2a7e92dc84


More information about the git mailing list