[ovs-git] Open vSwitch: ovsdb: Add tests for transient ovsdb-server. (next)

dev at openvswitch.org dev at openvswitch.org
Wed Mar 17 21:27:31 UTC 2010

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, next has been updated
       via  9ff373db19ef8e1e93f60a4da26bdaefdbb76ede (commit)
       via  939ff2674caa93d15b607bc514932533490ff2a0 (commit)
       via  7360012bdf64effd898242a58634267e203a2795 (commit)
       via  17d18afbfd65619e830d551cb002441519cde059 (commit)
       via  c7d85e0df048a9fda6e1a111cd74e5a82e6b3b91 (commit)
       via  3e010b7a56dc293239e0ea135600b456b078ab5b (commit)
       via  80af01eda87eaaf16369642d2733e561b3d56b71 (commit)
       via  b405dcfb4ee1d105ffcf3931873fb13121375aa8 (commit)
       via  b932d88b16c8a48c332495ddd3f70ea97dc1abf1 (commit)
      from  f479c2f42b01cbb6fb0a60448f314021b1c3c9df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9ff373db19ef8e1e93f60a4da26bdaefdbb76ede
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9ff373db19ef8e1e93f60a4da26bdaefdbb76ede
Author: Ben Pfaff <blp at nicira.com>
ovsdb: Add tests for transient ovsdb-server.
This variant of the ovsdb execution tests runs each transaction against a
separately started ovsdb-server.  The idea is that this should help to
ferret out any differences between what ovsdb-server has in memory and what
actually gets committed to disk.  There should not be any such differences,
but we need to test for that.

commit 939ff2674caa93d15b607bc514932533490ff2a0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=939ff2674caa93d15b607bc514932533490ff2a0
Author: Ben Pfaff <blp at nicira.com>
vswitch: Use weak references in Mirror table.
A port mirror seems sufficiently disconnected from the ports that it
mirrors that it seems counterproductive to forbid removing a port if
it is mirrored.  This commit therefore changes the references from
Mirror to Port from strong references to weak references, so that
removing a port automatically removes references to it from the Mirror

Since this could cause the port and VLAN selection for the Mirror to
become empty, which would make the mirror select all packets, at the same
time this commit adds a new column "select_all" to Mirror, to explicitly
allow selecting all packets.

commit 7360012bdf64effd898242a58634267e203a2795
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7360012bdf64effd898242a58634267e203a2795
Author: Ben Pfaff <blp at nicira.com>
ovsdb: Add support for weak references.

commit 17d18afbfd65619e830d551cb002441519cde059
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=17d18afbfd65619e830d551cb002441519cde059
Author: Ben Pfaff <blp at nicira.com>
ovsdb: Check for changed columns only once per transaction commit.
Until now, each part of a transaction commit that is interested in whether
a column's value has changed has had to do a comparison of the old and new
values itself.  There can be several interested parties per commit
(generally one for file storage and one for each remove OVSDB connection),
so this seems like too much redundancy.  This commit adds a bitmap
to struct ovsdb_txn_row that tracks whether a column's value has actually
changed, to reduce this overhead.

As a convenient side effect of doing these checks up front, it then
becomes easily possible to drop txn_rows (and txn_tables and entire txns)
that become no-ops.  (This probably fixes bug #2400, which reported that
some no-ops actually report updates over monitors.)

commit c7d85e0df048a9fda6e1a111cd74e5a82e6b3b91
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c7d85e0df048a9fda6e1a111cd74e5a82e6b3b91
Author: Ben Pfaff <blp at nicira.com>
ovsdb: Simplify referential integrity checking commit logic.
Until now, the commit-time logic for verifying referential integrity
modified row reference counts in-place.  That meant that it had to be
careful to be able to roll back those changes if it did detect a violation.
This commit changes the logic to avoid making any in-place changes.
Instead, the reference counts are tracked outside the rows themselves and
committed only if the transaction as a whole satisfies the constraints.
This eliminates a fair bit of code and paves the way for implementing
weak references as well.

commit 3e010b7a56dc293239e0ea135600b456b078ab5b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3e010b7a56dc293239e0ea135600b456b078ab5b
Author: Ben Pfaff <blp at nicira.com>
ovsdb: Introduce for_each_txn_row() iterator function for transactions.
A number of places in the transaction code want to iterate over all of
the txn_rows and possibly modify them.  It is getting messy to duplicate
the code to do this everywhere.  This commit introduces a new function that
encapsulates the iteration logic, efficiently handling modifications made
by the callback function.

Upcoming commits will add more uses of this iterator function.

commit 80af01eda87eaaf16369642d2733e561b3d56b71
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=80af01eda87eaaf16369642d2733e561b3d56b71
Author: Ben Pfaff <blp at nicira.com>
New function ovsdb_error_assert() for verifying that no error occurred.

commit b405dcfb4ee1d105ffcf3931873fb13121375aa8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b405dcfb4ee1d105ffcf3931873fb13121375aa8
Author: Ben Pfaff <blp at nicira.com>
ovsdb: Centralize and make consistent setting txn_row members of rows.
When a transaction modified a row, the "old" row's txn_row member was
not being set to the txn_row.  This commit changes that and factors out
the code to set the txn_row member of the rows within a txn_row.

This is not a bug fix, because nothing previously cared about the txn_row
member of the old version of a row, but it does matter for an upcoming

commit b932d88b16c8a48c332495ddd3f70ea97dc1abf1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b932d88b16c8a48c332495ddd3f70ea97dc1abf1
Author: Ben Pfaff <blp at nicira.com>
ovsdb-tool: Fix segfault if deleted row doesn't exist.
This "can't happen" normally, but it will if you monkey with the OVSDB
file by hand such that a row that gets deleted never actually existed in
the db.


Summary of changes:
 lib/bitmap.h                |   17 ++-
 lib/ovsdb-error.c           |   22 ++-
 lib/ovsdb-error.h           |    4 +-
 lib/ovsdb-types.c           |   23 ++
 lib/ovsdb-types.h           |   33 +++-
 lib/vlog-modules.def        |    1 +
 ovsdb/OVSDB.py              |   13 +-
 ovsdb/SPECS                 |   33 ++-
 ovsdb/file.c                |   15 +-
 ovsdb/jsonrpc-server.c      |   13 +-
 ovsdb/ovsdb-tool.c          |    7 +-
 ovsdb/row.c                 |   17 ++
 ovsdb/row.h                 |   34 +++-
 ovsdb/transaction.c         |  529 +++++++++++++++++++++++++++++++++----------
 ovsdb/transaction.h         |    3 +-
 tests/automake.mk           |    2 +-
 tests/ovsdb-execution.at    |  162 +++++++++++++
 tests/ovsdb-monitor-sort.pl |   49 ++++
 tests/ovsdb-monitor.at      |   62 ++++--
 tests/ovsdb-server.at       |   38 +++-
 tests/uuidfilt.pl           |   12 +
 vswitchd/bridge.c           |   49 ++---
 vswitchd/vswitch.ovsschema  |   14 +-
 vswitchd/vswitch.xml        |    9 +-
 24 files changed, 950 insertions(+), 211 deletions(-)
 create mode 100755 tests/ovsdb-monitor-sort.pl

Open vSwitch

More information about the git mailing list