]> git.proxmox.com Git - ovs.git/log
ovs.git
14 years agouuid: New function uuid_from_string_prefix().
Ben Pfaff [Wed, 10 Feb 2010 23:54:43 +0000 (15:54 -0800)]
uuid: New function uuid_from_string_prefix().

For use in an upcoming commit.

14 years agoovsdb-client: Introduce new data formatting style as the default.
Ben Pfaff [Fri, 12 Feb 2010 19:32:36 +0000 (11:32 -0800)]
ovsdb-client: Introduce new data formatting style as the default.

The new data formatting style is generally shorter and easier to read than
the JSON representation (which is still available using "-d json").

14 years agoovsdb-client: Remove --wide option.
Ben Pfaff [Wed, 10 Feb 2010 22:38:05 +0000 (14:38 -0800)]
ovsdb-client: Remove --wide option.

This option just confused people, since no one really expected the output
to be truncated at 79 columns by default.

14 years agoovsdb: Fix commit to disk of rows added to a table with all-default values.
Ben Pfaff [Fri, 12 Feb 2010 19:13:24 +0000 (11:13 -0800)]
ovsdb: Fix commit to disk of rows added to a table with all-default values.

14 years agoovs-vsctl: Clarify manpage.
Ben Pfaff [Fri, 12 Feb 2010 22:33:10 +0000 (14:33 -0800)]
ovs-vsctl: Clarify manpage.

If anyone ever reads the manpage, this should help.

14 years agoofproto: Use UINT16_MAX in place of -1, for clarity.
Ben Pfaff [Fri, 12 Feb 2010 21:58:17 +0000 (13:58 -0800)]
ofproto: Use UINT16_MAX in place of -1, for clarity.

Reported-by: Jesse Gross <jesse@nicira.com>
14 years agoMerge "master" into "next".
Ben Pfaff [Thu, 11 Feb 2010 19:11:23 +0000 (11:11 -0800)]
Merge "master" into "next".

The main change here is the need to update all of the uses of UNUSED in
the next branch to OVS_UNUSED as it is now spelled on "master".

14 years agoRename UNUSED macro to OVS_UNUSED to avoid naming conflict.
Ben Pfaff [Thu, 11 Feb 2010 18:59:47 +0000 (10:59 -0800)]
Rename UNUSED macro to OVS_UNUSED to avoid naming conflict.

Requested by Jean Tourrilhes <jt@hpl.hp.com>.

14 years agoovs-ofctl: Drop assignment whose value is never used.
Ben Pfaff [Wed, 10 Feb 2010 19:23:28 +0000 (11:23 -0800)]
ovs-ofctl: Drop assignment whose value is never used.

Found by Clang (http://clang-analyzer.llvm.org).

14 years agoovs-vsctl: Avoid redundant initializations in "add-br" command.
Ben Pfaff [Wed, 10 Feb 2010 19:21:56 +0000 (11:21 -0800)]
ovs-vsctl: Avoid redundant initializations in "add-br" command.

Found by Clang (http://clang-analyzer.llvm.org).

14 years agoofproto: Avoid passing indeterminate value to rule_insert().
Ben Pfaff [Wed, 10 Feb 2010 19:18:48 +0000 (11:18 -0800)]
ofproto: Avoid passing indeterminate value to rule_insert().

The 'in_port' argument to rule_insert() is only used if its 'packet'
argument is nonnull, so this is not, strictly speaking, a bug, but it
seems much cleaner.

The default -1 value of in_port matches what pktbuf_retrieve() stores
there on failure.

Found by Clang (http://clang-analyzer.llvm.org).

14 years agoovsdb: Drop write-only variable.
Ben Pfaff [Wed, 10 Feb 2010 19:08:27 +0000 (11:08 -0800)]
ovsdb: Drop write-only variable.

Found by Clang (http://clang-analyzer.llvm.org).

14 years agoovs-brcompatd: Use error instead of pointer in handle_fdb_query_cmd().
Ben Pfaff [Wed, 10 Feb 2010 19:07:28 +0000 (11:07 -0800)]
ovs-brcompatd: Use error instead of pointer in handle_fdb_query_cmd().

It is safe to use either value here but as long as we are saving the
error value we might as well use it.

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agosflow: Don't assign value that is never used.
Ben Pfaff [Wed, 10 Feb 2010 19:04:30 +0000 (11:04 -0800)]
sflow: Don't assign value that is never used.

The "error" return from collectors_create() is actually not that
interesting, because there could still be some collectors configured
properly anyhow, so we might as well discard the error return here,
without even assigning it to a variable.

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agovswitchd: Drop assignment whose value is never used in port_reconfigure().
Ben Pfaff [Wed, 10 Feb 2010 19:02:09 +0000 (11:02 -0800)]
vswitchd: Drop assignment whose value is never used in port_reconfigure().

Seems cleaner this way.

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agoprocess: Remove pointless, redundant assignments from stream_read().
Ben Pfaff [Wed, 10 Feb 2010 18:57:14 +0000 (10:57 -0800)]
process: Remove pointless, redundant assignments from stream_read().

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agotests: Remove write-only variables.
Ben Pfaff [Wed, 10 Feb 2010 18:55:45 +0000 (10:55 -0800)]
tests: Remove write-only variables.

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agoovsdb: Remove write-only variable from parse_body() in log.c.
Ben Pfaff [Wed, 10 Feb 2010 18:52:28 +0000 (10:52 -0800)]
ovsdb: Remove write-only variable from parse_body() in log.c.

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agoovsdb: Add default case to ovsdb_mutation_set_execute().
Ben Pfaff [Wed, 10 Feb 2010 18:51:11 +0000 (10:51 -0800)]
ovsdb: Add default case to ovsdb_mutation_set_execute().

The value of 'error' is indeterminate if m->mutator is not set to a valid
value here, so we should add a default case to handle the exception.  It
shouldn't happen, of course.

Found by Clang (http://clang-analyzer.llvm.org/).

14 years agonetdev-linux: Avoid fiddling with indeterminate data.
Ben Pfaff [Thu, 11 Feb 2010 18:34:45 +0000 (10:34 -0800)]
netdev-linux: Avoid fiddling with indeterminate data.

If we are using netlink to get stats and get_ifindex() fails, then for
an internal network device we will then swap around a bunch of
indeterminate (uninitialized) data values.  That won't hurt anything--the
caller will still set them to all-1-bits due to the error--but it still
seems wrong.  So this commit avoid it.

Found using Clang (http://clang-analyzer.llvm.org/).

14 years agodhcp: Don't pass NULL to memcmp() even with size 0.
Ben Pfaff [Wed, 10 Feb 2010 19:29:58 +0000 (11:29 -0800)]
dhcp: Don't pass NULL to memcmp() even with size 0.

ISO C says that the arguments to memcmp() must be nonnull even if the
size argument is 0, so don't do that.

Found by Clang (http://clang-analyzer.llvm.org).

14 years agovswitch: Fix uninitialized variable.
Ben Pfaff [Wed, 10 Feb 2010 19:13:09 +0000 (11:13 -0800)]
vswitch: Fix uninitialized variable.

The 'ip' variable in this inner "if" statement shadows a variable with
the same name in the enclosing block.  The variable in the inner block
is never initialized.

Found by Clang (http://clang-analyzer.llvm.org).

14 years agoflow: Fix null pointer dereference in flow_from_match().
Ben Pfaff [Wed, 10 Feb 2010 19:09:40 +0000 (11:09 -0800)]
flow: Fix null pointer dereference in flow_from_match().

Found by Clang (http://clang-analyzer.llvm.org).

14 years agoxenserver: Fix bond configuration.
Ben Pfaff [Thu, 11 Feb 2010 00:57:48 +0000 (16:57 -0800)]
xenserver: Fix bond configuration.

This bug was introduced as part of the merge from "master" and does not
therefore exist in Citrix upstream code.

14 years agoovs-wdt: Mark variable static and use NULL for a null pointer.
Ben Pfaff [Thu, 11 Feb 2010 00:54:30 +0000 (16:54 -0800)]
ovs-wdt: Mark variable static and use NULL for a null pointer.

Neither is really a bug but it's cleaner this way.

Found by sparse (http://sparse.wiki.kernel.org/).

14 years agodatapath: Mark functions "static".
Ben Pfaff [Thu, 11 Feb 2010 00:50:51 +0000 (16:50 -0800)]
datapath: Mark functions "static".

Found by sparse (http://sparse.wiki.kernel.org/).

14 years agodatapath: When adding a port, return the new port number to userspace.
Ben Pfaff [Thu, 11 Feb 2010 00:53:40 +0000 (16:53 -0800)]
datapath: When adding a port, return the new port number to userspace.

'port' is a kernel-space copy of the odp_port and modifying it is useless.
'portp' is the userspace copy; modifying it is useful.

None of our current userspace users care about the port number and so we
never noticed.

Found by sparse (http://sparse.wiki.kernel.org/).

14 years agoovs-brcompatd: Handle transaction errors slightly more gracefully.
Ben Pfaff [Wed, 10 Feb 2010 18:41:44 +0000 (10:41 -0800)]
ovs-brcompatd: Handle transaction errors slightly more gracefully.

It is not a good idea to just exit on an OVSDB transaction error.
TXN_TRY_AGAIN will definitely happen in practice; TXN_ERROR should not but
we should not just fail if it does.

This should allow us to better debug bug #2418.

14 years agoovsdb: Add support for multiple databases to the protocol.
Ben Pfaff [Tue, 9 Feb 2010 18:17:58 +0000 (10:17 -0800)]
ovsdb: Add support for multiple databases to the protocol.

This also adds protocol compatibility to the database itself and to
ovsdb-client.  It doesn't actually add multiple database support to
ovsdb-server, since we don't really need that yet.

14 years agoxenserver: Fix failure to bring up secondary management interfaces.
Ben Pfaff [Tue, 9 Feb 2010 19:17:16 +0000 (11:17 -0800)]
xenserver: Fix failure to bring up secondary management interfaces.

When a secondary management interface is configured on a XenServer,
interface-reconfigure would fail to bring it up because it would attempt
to add a bridge that already exists.  This commit makes it tolerate that
situation.

14 years agoovs-vsctl: Add --may-exist option for add-port, add-bond commands.
Ben Pfaff [Tue, 9 Feb 2010 20:13:46 +0000 (12:13 -0800)]
ovs-vsctl: Add --may-exist option for add-port, add-bond commands.

This is useful in interface-reconfigure, in an upcoming commit.

14 years agoovs-vsctl: Add --may-exist option for add-br command.
Ben Pfaff [Tue, 9 Feb 2010 19:03:14 +0000 (11:03 -0800)]
ovs-vsctl: Add --may-exist option for add-br command.

This will be used in the XenServer interface-reconfigure script.

14 years agoovs-vsctl: Improve error message when options follow command names.
Ben Pfaff [Tue, 9 Feb 2010 19:02:44 +0000 (11:02 -0800)]
ovs-vsctl: Improve error message when options follow command names.

14 years agovswitchd: Add missing * to use of sizeof.
Ben Pfaff [Tue, 9 Feb 2010 18:20:13 +0000 (10:20 -0800)]
vswitchd: Add missing * to use of sizeof.

Found using coccinelle and coccicheck (http://coccinelle.lip6.fr/).

14 years agodhcp: Add missing * to use of sizeof.
Ben Pfaff [Tue, 9 Feb 2010 18:19:14 +0000 (10:19 -0800)]
dhcp: Add missing * to use of sizeof.

Found with coccinelle and coccicheck (http://coccinelle.lip6.fr/).

14 years agoovsdb: Make scalars and 1-element sets interchangeable.
Ben Pfaff [Tue, 9 Feb 2010 00:37:49 +0000 (16:37 -0800)]
ovsdb: Make scalars and 1-element sets interchangeable.

It is natural to write "abc" in place of ["set",["abc"]] and vice versa.
I cannot think of a reason not to support this, and it can make reading
and writing OVSDB files and transactions easier, so support it.

14 years agoovsdb: Get rid of "declare" operation.
Ben Pfaff [Tue, 9 Feb 2010 00:03:21 +0000 (16:03 -0800)]
ovsdb: Get rid of "declare" operation.

It's more elegant, and just as easy to implement, if we allow a
"named-uuid" to be a forward reference to a "uuid-name" in a later
"insert" operation.

14 years agoovsdb: Fix support for systems where libpcre is not installed.
Ben Pfaff [Mon, 8 Feb 2010 23:37:49 +0000 (15:37 -0800)]
ovsdb: Fix support for systems where libpcre is not installed.

This is one of the loose ends that I intended to fix up and test before
pushing off my commits to add use of PCRE, but obviously I forgot.

14 years agoovsdb: Add support for referential integrity in the database itself.
Ben Pfaff [Mon, 8 Feb 2010 22:09:41 +0000 (14:09 -0800)]
ovsdb: Add support for referential integrity in the database itself.

14 years agoovsdb: Add simple constraints.
Ben Pfaff [Mon, 8 Feb 2010 22:09:36 +0000 (14:09 -0800)]
ovsdb: Add simple constraints.

14 years agoovsdb: Slightly simplify ovsdb_table_get_row(), ovsdb_table_put_row().
Ben Pfaff [Thu, 4 Feb 2010 20:20:11 +0000 (12:20 -0800)]
ovsdb: Slightly simplify ovsdb_table_get_row(), ovsdb_table_put_row().

There is no value in saving a call to uuid_hash() in ovsdb_table_put_row(),
because uuid_hash() is a trivial inline function, so integrate
ovsdb_table_get_row__() into ovsdb_table_get_row() and simplify
ovsdb_table_put_row().

14 years agoovsdb: Use direct pointer from table to txn_table to simplify code.
Ben Pfaff [Thu, 4 Feb 2010 19:47:32 +0000 (11:47 -0800)]
ovsdb: Use direct pointer from table to txn_table to simplify code.

Until now, when a transaction modified rows in a table, the metadata
associated with that table modification (in struct ovsdb_txn_table) had to
be looked up through a hash table.  This made the code unnecessarily
complicated and had no benefit in itself, so this commit changes
struct ovsdb_table to have a direct pointer to its ovsdb_txn_table.

14 years agolist: Fix indentation.
Ben Pfaff [Thu, 4 Feb 2010 19:23:23 +0000 (11:23 -0800)]
list: Fix indentation.

14 years agoovsdb-idl: On transaction hard failure make a reason available to client.
Ben Pfaff [Fri, 5 Feb 2010 22:11:12 +0000 (14:11 -0800)]
ovsdb-idl: On transaction hard failure make a reason available to client.

This make ovs-vsctl able to report problems that occur in better detail.

14 years agoovs-vsctl: When deleting a real bridge, delete ports of child fake bridges.
Ben Pfaff [Fri, 5 Feb 2010 22:10:02 +0000 (14:10 -0800)]
ovs-vsctl: When deleting a real bridge, delete ports of child fake bridges.

Otherwise these ports and their interfaces hang around unreferenced.

14 years agoovsdb: Fix result object for "declare" operation.
Ben Pfaff [Thu, 4 Feb 2010 22:34:01 +0000 (14:34 -0800)]
ovsdb: Fix result object for "declare" operation.

The "declare" operation is specified to return a <uuid>, e.g.:
["uuid", "7b703002-f7b6-45c6-bfd6-7619b21a1a5f"]
It was actually just returning the second part, e.g.
"7b703002-f7b6-45c6-bfd6-7619b21a1a5f"

This commit makes the result match the specification.

14 years agodatapath: Set Nicira random address in the datapath.
Jesse Gross [Mon, 8 Feb 2010 20:48:54 +0000 (15:48 -0500)]
datapath: Set Nicira random address in the datapath.

OVS now sets the Nicira OUI plus the top bit on packets that it
generates to indicate a random address.  This makes the datapath
do the same thing.

14 years agovswitch: Consistently set Nicira OUI.
Jesse Gross [Mon, 1 Feb 2010 23:20:22 +0000 (18:20 -0500)]
vswitch: Consistently set Nicira OUI.

In places where a random Ethernet address needs to be generated we
are inconsistent about setting an OUI.  This sets an OUI everywhere
to allow the source of packets to be easily identified.

14 years agogre: Fix use after free in netns compatibility layer.
Jesse Gross [Mon, 8 Feb 2010 19:52:20 +0000 (14:52 -0500)]
gre: Fix use after free in netns compatibility layer.

The newly updated network namespace compatibility layer contained
an issue in the pernet automatic storage allocation feature that
prematurely freed memory.  This caused an OOPS if the module was
unloaded.

14 years agoFix some regressions from the merge from master.
Jesse Gross [Mon, 8 Feb 2010 18:22:41 +0000 (13:22 -0500)]
Fix some regressions from the merge from master.

14 years agovswitch: Set control_ip in sFlow configuration
Justin Pettit [Sun, 7 Feb 2010 08:10:02 +0000 (00:10 -0800)]
vswitch: Set control_ip in sFlow configuration

14 years agoxenserver: Various cleanups to get OVS to work with XenServer 5.5
Justin Pettit [Sun, 7 Feb 2010 04:46:40 +0000 (20:46 -0800)]
xenserver: Various cleanups to get OVS to work with XenServer 5.5

14 years agoxenserver: Exclude compile Python byte code from packaging
Justin Pettit [Sat, 6 Feb 2010 02:15:08 +0000 (18:15 -0800)]
xenserver: Exclude compile Python byte code from packaging

14 years agoxenserver: Fix permissions on new interface-reconfigure files
Justin Pettit [Sat, 6 Feb 2010 01:43:57 +0000 (17:43 -0800)]
xenserver: Fix permissions on new interface-reconfigure files

14 years agoMerge branch 'next' of repo.nicira.com:/srv/git/openvswitch into next
Justin Pettit [Sat, 6 Feb 2010 01:15:29 +0000 (17:15 -0800)]
Merge branch 'next' of repo.nicira.com:/srv/git/openvswitch into next

14 years agoMerge branch 'master' into next
Justin Pettit [Fri, 5 Feb 2010 23:58:27 +0000 (15:58 -0800)]
Merge branch 'master' into next

Conflicts:
COPYING
datapath/datapath.h
lib/automake.mk
lib/dpif-provider.h
lib/dpif.c
lib/hmap.h
lib/netdev-provider.h
lib/netdev.c
lib/stream-ssl.h
ofproto/executer.c
ofproto/ofproto.c
ofproto/ofproto.h
tests/automake.mk
utilities/ovs-ofctl.c
utilities/ovs-vsctl.in
vswitchd/ovs-vswitchd.conf.5.in
xenserver/etc_init.d_vswitch
xenserver/etc_xensource_scripts_vif
xenserver/opt_xensource_libexec_interface-reconfigure

14 years agogre: Simplify net namespace operations.
Jesse Gross [Wed, 3 Feb 2010 22:39:29 +0000 (17:39 -0500)]
gre: Simplify net namespace operations.

Ports commit cfb8fb "net: Simplify ip_gre pernet operations." from
the mainline kernel.

14 years agogre: Net namespace identifiers are read_mostly.
Jesse Gross [Wed, 3 Feb 2010 00:01:49 +0000 (19:01 -0500)]
gre: Net namespace identifiers are read_mostly.

Ports commit f99189 "netns: net_identifiers should be read_mostly"
from the mainline kernel.

14 years agogre: Network namespace upon device creation.
Jesse Gross [Wed, 3 Feb 2010 00:01:00 +0000 (19:01 -0500)]
gre: Network namespace upon device creation.

gre: Optimize tx path.

Ports commit 81adee "net: Support specifying the network namespace
upon device creation." from the mainline kernel.

14 years agogre: Optimize multiple unregistration.
Jesse Gross [Tue, 2 Feb 2010 23:43:55 +0000 (18:43 -0500)]
gre: Optimize multiple unregistration.

Ports commit eef6dd "gre: Optimize multiple unregistration" from
the mainline kernel.

14 years agogre: Convert locking to RCU.
Jesse Gross [Tue, 2 Feb 2010 22:44:26 +0000 (17:44 -0500)]
gre: Convert locking to RCU.

Ports commit 8d5b2c "gre: convert hash tables locking to RCU"
from the mainline kernel.

14 years agogre: Optimize tx path.
Jesse Gross [Tue, 2 Feb 2010 22:13:47 +0000 (17:13 -0500)]
gre: Optimize tx path.

Ports commit 0bfbed "tunnels: Optimize tx path" from the mainline
kernel.

14 years agogre: Unify IPTUNNEL_XMIT across kernel versions.
Jesse Gross [Tue, 2 Feb 2010 21:44:44 +0000 (16:44 -0500)]
gre: Unify IPTUNNEL_XMIT across kernel versions.

The IPTUNNEL_XMIT macro was split into different versions based on
the kernel.  This adds the compatibility code to allow a single
copy to work on all kernel versions, making it easier to maintain.

14 years agoAdd extern "C" { ... } to some header files to support usage from C++.
Ben Pfaff [Thu, 4 Feb 2010 17:37:30 +0000 (09:37 -0800)]
Add extern "C" { ... } to some header files to support usage from C++.

From partner.

14 years agotests: Fix memory leaks in test programs.
Ben Pfaff [Mon, 1 Feb 2010 22:57:48 +0000 (14:57 -0800)]
tests: Fix memory leaks in test programs.

This makes it easier to see memory leaks in the code under test.

Found with valgrind.

14 years agoovs-vsctl: Free memory on successful exit.
Ben Pfaff [Tue, 2 Feb 2010 22:27:22 +0000 (14:27 -0800)]
ovs-vsctl: Free memory on successful exit.

This is not important in itself, but it helps to spot real memory leaks.

Found with valgrind.

14 years agoovs-vsctl: Fix memory leaks.
Ben Pfaff [Tue, 2 Feb 2010 22:26:53 +0000 (14:26 -0800)]
ovs-vsctl: Fix memory leaks.

Found with valgrind.

14 years agoovs-vsctl: Free memory on fatal error.
Ben Pfaff [Tue, 2 Feb 2010 22:26:17 +0000 (14:26 -0800)]
ovs-vsctl: Free memory on fatal error.

Freeing memory just before exiting is not important in itself, but it makes
it easier to see real memory leaks.

Found with valgrind.

14 years agoovs-vsctl: Use vsctl_fatal() consistently.
Ben Pfaff [Tue, 2 Feb 2010 22:25:11 +0000 (14:25 -0800)]
ovs-vsctl: Use vsctl_fatal() consistently.

vsctl_fatal() logs its argument as well as printing it on stderr, so it
is preferable within ovs-vsctl.  An upcoming commit will also make
vsctl_fatal() free memory, so using it consistently will also make that
memory freed consistently.

14 years agoovsdb-tool: Fix minor memory leak in "create".
Ben Pfaff [Mon, 1 Feb 2010 22:33:29 +0000 (14:33 -0800)]
ovsdb-tool: Fix minor memory leak in "create".

This leak is not important, since "ovsdb-tool create" is a short-running
command, but we might as well fix it.

Found with valgrind.

14 years agoovsdb-client: Fix memory leaks in "monitor" command.
Ben Pfaff [Tue, 2 Feb 2010 22:09:41 +0000 (14:09 -0800)]
ovsdb-client: Fix memory leaks in "monitor" command.

This is a long-running command so it makes sense to free received messages.
Freeing the schema at exit is not essential but cleans up valgrind
output.

Found with valgrind.

14 years agoovsdb-idl: Fix memory leaks and bad memory references.
Ben Pfaff [Tue, 2 Feb 2010 22:03:18 +0000 (14:03 -0800)]
ovsdb-idl: Fix memory leaks and bad memory references.

Found with valgrind.

14 years agoovsdb-server: Free memory on exit.
Ben Pfaff [Tue, 2 Feb 2010 22:41:00 +0000 (14:41 -0800)]
ovsdb-server: Free memory on exit.

It is not really important to free memory on program exit, but it makes it
easier to see real memory leaks.

Found with valgrind.

14 years agoovsdb-server: Fix various memory leaks.
Ben Pfaff [Tue, 2 Feb 2010 22:40:25 +0000 (14:40 -0800)]
ovsdb-server: Fix various memory leaks.

Some of these are serious leaks, in that they could leak some amount of
memory for every transaction processed by the database server.

Found with valgrind.

14 years agoovs-appctl: Free memory on exit.
Ben Pfaff [Tue, 2 Feb 2010 22:18:01 +0000 (14:18 -0800)]
ovs-appctl: Free memory on exit.

This makes it easier to see real memory leaks.

Found via valgrind.

14 years agotests: Always make ovsdb-server exit cleanly, to better find memory leaks.
Ben Pfaff [Tue, 2 Feb 2010 22:16:06 +0000 (14:16 -0800)]
tests: Always make ovsdb-server exit cleanly, to better find memory leaks.

"ovs-appctl exit" causes a cleaner shutdown than "kill" and in particular
lets ovsdb-server clean up better, which makes it easier to find real
memory leaks.

14 years agostp: Fix memory leak.
Ben Pfaff [Tue, 2 Feb 2010 22:03:36 +0000 (14:03 -0800)]
stp: Fix memory leak.

Found with valgrind.

14 years agodaemon: Fix memory leak in --monitor implementation.
Ben Pfaff [Tue, 2 Feb 2010 22:36:19 +0000 (14:36 -0800)]
daemon: Fix memory leak in --monitor implementation.

This leaked a small amount of memory each time a daemon process was
created.  It is only important if a daemon is otherwise very buggy.

Found with valgrind.

14 years agojson: Fix memory leak when nesting depth is exceeded.
Ben Pfaff [Mon, 1 Feb 2010 22:57:27 +0000 (14:57 -0800)]
json: Fix memory leak when nesting depth is exceeded.

This is probably not an important memory leak, since it is only on a rare
error path, but it is best to fix it anyway.

Found with valgrind.

14 years agostream-ssl: Fix unimportant memory leak.
Ben Pfaff [Mon, 1 Feb 2010 22:35:37 +0000 (14:35 -0800)]
stream-ssl: Fix unimportant memory leak.

This function is generally called only once per program execution, so
leaking a little bit of memory does not matter that much.

Found with valgrind.

14 years agoAdd support for running the testsuite under 'valgrind'.
Ben Pfaff [Mon, 1 Feb 2010 22:26:07 +0000 (14:26 -0800)]
Add support for running the testsuite under 'valgrind'.

14 years agotests: Fix timing dependency in ovsdb-log test.
Ben Pfaff [Tue, 2 Feb 2010 22:31:36 +0000 (14:31 -0800)]
tests: Fix timing dependency in ovsdb-log test.

The "lockfile" module logs a message if locking takes a measurable amount
of time.  Running the tests under valgrind tends to make this message
appear, so we need to disable it to make the output comparison come out
cleanly.

14 years agoRework and simplify the "lcov" support for the testsuite.
Ben Pfaff [Mon, 1 Feb 2010 22:04:25 +0000 (14:04 -0800)]
Rework and simplify the "lcov" support for the testsuite.

14 years agodatapath: Set datapath device MTU to minimum of MTU of ports.
Jesse Gross [Mon, 1 Feb 2010 21:43:44 +0000 (16:43 -0500)]
datapath: Set datapath device MTU to minimum of MTU of ports.

The MTU of the local port should be no larger than the minimum of
the MTUs of the ports attached to the bridge, overwise packets may be
dropped.  We already prevent changes to the MTU that would violate
this constraint but don't actuallly proactively set the MTU.  This
changes makes everything consistent and matches the behavior of
the bridge.

14 years agoxenserver: Add XenServer 5.5.0 updates 1 and 2 to supported versions.
Jesse Gross [Fri, 29 Jan 2010 20:54:47 +0000 (15:54 -0500)]
xenserver: Add XenServer 5.5.0 updates 1 and 2 to supported versions.

Add the file hashes for updates  1  and 2 (the scripts we care about
are the same) to the list of supported versions to prevent a warning
message on install.

14 years agoovs-pki: Avoid using local variables, which are non-POSIX.
Ben Pfaff [Mon, 1 Feb 2010 18:09:56 +0000 (10:09 -0800)]
ovs-pki: Avoid using local variables, which are non-POSIX.

Reported-by: Srini Seetharaman <seethara@stanford.edu>
14 years agoClean up nicira-ext.h header a bit.
Ben Pfaff [Tue, 26 Jan 2010 19:43:27 +0000 (11:43 -0800)]
Clean up nicira-ext.h header a bit.

14 years agoofproto: Mark NXT_ACT_SET_CONFIG and NXT_ACT_GET_CONFIG obsolete.
Ben Pfaff [Tue, 26 Jan 2010 19:42:56 +0000 (11:42 -0800)]
ofproto: Mark NXT_ACT_SET_CONFIG and NXT_ACT_GET_CONFIG obsolete.

These Nicira-specific requests have not been implemented for some time.
In case we need them later we can always reimplement them.

14 years agoofproto: Remove support for OpenFlow-based management protocol.
Ben Pfaff [Tue, 26 Jan 2010 19:35:38 +0000 (11:35 -0800)]
ofproto: Remove support for OpenFlow-based management protocol.

Older versions of Open vSwitch supported a management protocol based on
OpenFlow message framing.  The current Open vSwitch instead uses the
OVSDB protocol for the same purposes.  We don't plan to support this older
protocol any longer, so this commit deletes support.

This commit also deletes the management_id column from the vswitch's
database schema.  The management_id was used by the older management
protocol to match up OpenFlow switch connections to management connections,
but the current implementation instead matches up connections based on
the datapath IDs exported by the configuration database.  In fact, the
OpenFlow connections had no way to actually export the management ID, so
this just deletes code that was essentially without function anyhow.

14 years agoCA-37154: vswitch: Use MAC address of tagged PIF for VLAN fake-bridge
Ian Campbell [Mon, 1 Feb 2010 17:50:14 +0000 (09:50 -0800)]
CA-37154: vswitch: Use MAC address of tagged PIF for VLAN fake-bridge

This is because PIF.MAC for a VLAN is FE:FF:FF:FF:FF:FF. In bridge
mode the VLAN and the bridge naturally pick up the underlying MAC
address from the physical device but under vswitch we must explicitly
specify it and we are currently specifying
FE:FF:FF:FF:FF. interface-reconfigure needs to use the MAC address of
the tagged PIF not the untagged PIF.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1265020755 0
# Node ID d7fc59d6a274334377fdbb09dcaf80a76431bcdb
# Parent  a6f27b5a3096ce627b5003c7be19ca59f7dd9606

14 years agoofpbuf: Rename ofpbuf "private" member for C++ header compatibility.
Ben Pfaff [Mon, 1 Feb 2010 17:46:31 +0000 (09:46 -0800)]
ofpbuf: Rename ofpbuf "private" member for C++ header compatibility.

From partner.

14 years agodpif: Allow providers to be managed at runtime.
Jesse Gross [Mon, 1 Feb 2010 16:36:01 +0000 (11:36 -0500)]
dpif: Allow providers to be managed at runtime.

The list of datapath providers was previously staticly defined at
compile time.  This allows new providers to be added and removed
at runtime.

14 years agonetdev: Allow providers to be managed at runtime.
Jesse Gross [Mon, 1 Feb 2010 16:35:54 +0000 (11:35 -0500)]
netdev: Allow providers to be managed at runtime.

The list of netdev providers was previously staticly defined at
compile time.  This allows new providers to be added and removed
at runtime.

14 years agonetdev: Correctly maintain netdev refcounts even if errors occur.
Jesse Gross [Fri, 29 Jan 2010 00:56:05 +0000 (19:56 -0500)]
netdev: Correctly maintain netdev refcounts even if errors occur.

If an error occured while opening a netdev it would decrement the
refcount, even though it was never incremented.  Depending on
the timing this could result in either an error message or an
assertion failure.  This workaround simply always increments
the refcount before openning a device.  A more complete fix
already exists in the netdev overhaul in the 'next' branch.

NIC-59

14 years agoovs-vsctl: Add tests for database commands.
Ben Pfaff [Fri, 29 Jan 2010 00:18:43 +0000 (16:18 -0800)]
ovs-vsctl: Add tests for database commands.

Bug #2396.

14 years agoovs-vsctl: Add --if-exists option to "get" command, for map columns.
Ben Pfaff [Fri, 29 Jan 2010 00:03:52 +0000 (16:03 -0800)]
ovs-vsctl: Add --if-exists option to "get" command, for map columns.

14 years agoovs-vsctl: Improve error reporting.
Ben Pfaff [Fri, 29 Jan 2010 00:03:26 +0000 (16:03 -0800)]
ovs-vsctl: Improve error reporting.

14 years agoovs-vsctl: Alphabetize lists of database column names.
Ben Pfaff [Thu, 28 Jan 2010 23:59:11 +0000 (15:59 -0800)]
ovs-vsctl: Alphabetize lists of database column names.

This makes the "list" command print the database columns in alphabetical
order, which seems more sensible than the semi-random order we had before.

14 years agoovs-vsctl: Make "create" command print new row's UUID.
Ben Pfaff [Thu, 28 Jan 2010 22:00:22 +0000 (14:00 -0800)]
ovs-vsctl: Make "create" command print new row's UUID.

Also, document limitations of other commands regarding UUIDs of new rows.

14 years agoovs-vsctl: Add postprocess step.
Ben Pfaff [Thu, 28 Jan 2010 21:33:24 +0000 (13:33 -0800)]
ovs-vsctl: Add postprocess step.

Nothing uses this new feature yet, so this commit by itself has no visible
effect.

This is a step toward printing the UUIDs of newly inserted rows.