2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00
Commit Graph

19894 Commits

Author SHA1 Message Date
Ben Pfaff
115f1e4dc5 ovsdb-idl: Optimize lookup of struct idl_table from struct idl_table_class.
Before, the idl_table could only be obtained through a hash lookup of a
string.  This way is faster and more straightforward.
2009-12-04 15:08:07 -08:00
Justin Pettit
a47f084024 ovs-vsctl: Fix traceback when telling target to reload
The code to tell the target to reload was referencing a non-existent
global variable to determine the target.  This change uses the correct
one.
2009-12-04 14:11:53 -08:00
Ben Pfaff
195b5c3563 Distribute ovsdb-idlc built sources, so Python is not required for build.
The Xen DDK VM does not include Python, so it's best if we don't have to
require it for the build.

The built sources are still regenerated if necessary.
2009-12-03 17:06:46 -08:00
Ben Pfaff
99331c0a33 vswitchd: Add "id" column to Interface table for use by NOX.
This might end up being absorbed into a more general-purpose
"foreign-keys" column.
2009-12-03 16:20:30 -08:00
Ben Pfaff
0bdf342a8c json: Improve error reporting. 2009-12-03 16:08:34 -08:00
Ben Pfaff
fa33d64a57 vswitchd: Avoid segfault when creating a bridge fails.
bridge_create() can return a null pointer if creating the bridge fails, so
check for that and don't dereference it in that case.

Thank to Jeremy Stribling for reporting the problem.
2009-12-03 15:14:56 -08:00
Ben Pfaff
f016b27e28 xenserver: Mention additional ovsdb files that are included. 2009-12-03 15:03:38 -08:00
Ben Pfaff
b12e3c41af ovsdb: Fix race conditions in test suite. 2009-12-03 14:47:00 -08:00
Ben Pfaff
3f262d7de1 ovsdb-client: Add support for --detach to "monitor" command. 2009-12-03 14:47:00 -08:00
Ben Pfaff
6dea5eaf5c ovsdb-server: Open --listen sockets before detaching.
This prevents a race condition in a command sequence that starts
ovsdb-server and then immediately connects to it with ovsdb-client.
2009-12-03 14:47:00 -08:00
Ben Pfaff
ae25e4b6ad xenserver: Remove now-missing files from RPM spec file.
Making XenServer work with ovsdb will take additional changes, but this
should at least make it possible to build the RPM again.
2009-12-03 14:46:57 -08:00
Ben Pfaff
7634353824 vswitchd: Initial conversion to database-based configuration.
This has seen very little testing, so some features are almost certainly
busted.  Port mirroring is not yet converted, so it will definitely not
work.
2009-12-03 11:28:40 -08:00
Ben Pfaff
ba54bf4f65 vswitchd: Remove vestigial spanning tree protocol (STP) support.
ovs-vswitchd has never supported spanning tree protocol, but there was
nevertheless a considerable amount of code that provided a framework for
supporting it.

This commit deletes this code, since we have no plans to introduce STP
support soon.
2009-12-03 10:59:09 -08:00
Ben Pfaff
e9011ac832 ovsdb-idl: Fix resolution of references from one table to another.
Our tests only checked references from a table to itself, so of course
there were bugs in references from one table to another.  This fixes the
obvious one and adds a test.
2009-12-03 10:55:00 -08:00
Ben Pfaff
75c7fd6c82 ovsdb-idl: Make IDL-generated files depend on ovsdb-idlc.
This ensures that IDL-generated files get rebuilt whenever the IDL
compiler itself is updated.
2009-12-03 10:55:00 -08:00
Ben Pfaff
66095e1586 ovsdb-idlc: C code generation improvements.
This eliminates many casts from the IDL's generated C code and reduces the
number of levels of indirection for simple cases of optional string or
pointer columns.
2009-12-03 10:43:59 -08:00
Ben Pfaff
58fda1dab1 Merge "master" branch into "db". 2009-12-02 11:49:53 -08:00
Ben Pfaff
c3bb4bd7f1 ovsdb: Implement C bindings for IDL. 2009-12-02 11:26:15 -08:00
Ben Pfaff
20bed8be25 jsonrpc: Make it easy to get a new JSON-RPC request's id. 2009-12-02 11:19:08 -08:00
Ben Pfaff
dcbb691b00 jsonrpc: New type "jsonrpc_session", which automatically reconnects. 2009-12-02 11:19:03 -08:00
Ben Pfaff
6e30ca6372 ovsdb: Allow a named-uuid to be used within the operation that creates it.
This allows a transaction like this:

[{"op": "insert",
  "table": "mytable",
  "row": {"i": 0, "k": ["named-uuid", "self"]},
  "uuid-name": "self"}]

It was already possible to do this by following up on the "insert" with an
"update", but since this was easy to implement I did it.
2009-12-02 11:18:59 -08:00
Ben Pfaff
b36682d8dc vswitchd: Fix build when source and build directory differ. 2009-12-02 11:18:52 -08:00
Justin Pettit
6c88d577e8 netdev: Allow explicit creation of netdev objects
This change adds netdev_create() and netdev_destroy() functions to allow
the creation of network devices through the netdev library.  Previously,
network devices had to already exist or be created on demand through
netdev_open().  This caused problems such as not being able to specify
TAP devices as ports in ovs-vswitchd, which this patch fixes.

This also lays the groundwork for adding GRE and VDE support.
2009-12-01 19:01:01 -08:00
Ben Pfaff
86a06318bd ovs-vswitchd: Add --mlockall option and enable on XenServer.
On XenServer 5.5 we found that running 4 simultaneous vm-import operations
on iSCSI caused so much disk and cache activity that (we suspect) parts of
ovs-vswitchd were paged out to disk and were not paged back in for over
10 seconds, causing the XenServer to fall off the network and the XenCenter
connection to fail.

Locking ovs-vswitchd into memory appears to avoid this problem.  Henrik
reports that, with memory locking, importing 11 VMs simultaneously
completed successfully.

Bug #2344.
2009-12-01 09:24:59 -08:00
Ben Pfaff
651880308c Always distribute extras/ezio/ezio3.ti.
I had thought that Automake was smart enough to ignore conditionals around
EXTRA_DIST, so that all files always got distributed regardless of whether
Automake conditionals were set.  I was wrong.

This pushes the conditionals for building the ezio binaries down into
extras/ezio/automake.mk and thereby makes adding ezio3.ti to EXTRA_DIST
unconditional, so that it always gets distributed.  Otherwise, this file
will not be distributed on systems that don't have curses or don't have
PCRE, which is very surprising.
2009-12-01 09:22:06 -08:00
Ben Pfaff
88aa338eed Remove --disable-userspace "configure" option, since it breaks "make dist".
I had thought that Automake was smart enough to ignore conditionals around
EXTRA_DIST, so that all files always got distributed regardless of whether
Automake conditionals were set.  I was wrong.

This commit removes the --disable-userspace option to "configure", which
put a conditional around most of Makefile.am and thus unintentionally
caused most of the distribution to be left out if --disable-userspace was
specified.  The alternative (fixing --disable-userspace) seems like too
much work--it would require pushing "if ENABLE_USERSPACE" down into lots
of subdirectory--and would be difficult to maintain.
2009-12-01 09:21:59 -08:00
Justin Pettit
f20279afbd dpif: Minor provider comment cleanups. 2009-11-30 23:20:57 -08:00
Justin Pettit
6d7356763a Updates for 0.90.6 release. v0.90.7 2009-11-29 11:23:32 -08:00
Ben Pfaff
0809cca7f9 vswitch.ovsidl: Fix comments. 2009-11-24 12:55:21 -08:00
Ben Pfaff
318e2e6d60 classifier: Improve comments. 2009-11-24 09:59:54 -08:00
Justin Pettit
e68c3e486a ovsdb: Minor cleanups to the SPECS file 2009-11-23 19:00:27 -08:00
Justin Pettit
352cd3f4e0 vswitch.ovsidl: Various cleanups
Fix a few minor errors and provide some cleanups in the vswitch IDL
schema.
2009-11-23 17:28:00 -08:00
Justin Pettit
fffa8db5e8 ovsdb-idlc: Remove "sha" deprecation warning
The "sha" module was deprecated in Python 2.5 and calling ovsd-idlc prints
a warning in Python 2.6.  The module is not actually being used, so this
just removes the offending import.
2009-11-23 17:24:58 -08:00
Ben Pfaff
d879a707a3 ovsdb: Add ovsdb IDL compiler to build system.
This first stab at any interface definition language and compiler for OVSDB
will give other developers a chance to look at it and try to integrate it.
The IDL is not actually implemented yet; I am working on that.
2009-11-23 16:07:36 -08:00
Ben Pfaff
e3e9370bf9 ovs-openflowd: Add support for userspace-only switching. 2009-11-23 15:58:48 -08:00
Ben Pfaff
cfae8ec3e7 svec: New function svec_split().
This is useful in an upcoming commit.
2009-11-23 15:58:48 -08:00
Ben Pfaff
efacbce62f dpif: New function dpif_create_and_open().
This function combines what dpif_create() and dpif_open() do.  It allows
us to factor a tiny amount of code out of the vswitch, but more importantly
this function is also useful in the following commit.
2009-11-23 15:58:48 -08:00
Ben Pfaff
6bab37989b netflow: Break out code for sending packets into a new "collectors" module.
sFlow uses a similar UDP structure so this will allow use to reuse the
NetFlow code for it.
2009-11-23 13:59:20 -08:00
Ben Pfaff
af48f1dc8c netflow: Use inet_open_active() to factor out some code. 2009-11-23 12:25:14 -08:00
Ben Pfaff
4f2eb9a7e8 socket-util: Generalize tcp_open_*() to UDP, as inet_open_*().
The tcp_open_active() and tcp_open_passive() functions don't really have
any strong dependencies on TCP.  With a couple of simple changes they
can be used for UDP also.  Since this is useful for Netflow, this commit
does so.
2009-11-23 12:25:14 -08:00
Ben Pfaff
1901968e76 socket-util: Make TCP open function support no default port.
Until now, tcp_open_active() and tcp_open_passive() have only been used
in situations where there is a reasonable default port, e.g. OFP_TCP_PORT.
But for NetFlow there is no universal default, so enhance these functions
so that they can require the user to specify a port explicitly.

Crossported from the 'db' branch, where this is useful for JSON-RPC, which
also has no widely known port.
2009-11-23 12:25:13 -08:00
Ben Pfaff
9ab3d9a3c2 netdev: New function netdev_get_ifindex().
sFlow needs the ifindex of an interface, so this commit adds a function
to retrieve it.
2009-11-23 12:25:08 -08:00
Ben Pfaff
d161c09927 Move C compiler warning (-W) flags from CFLAGS to AM_CFLAGS.
C compiler warning options added by the "configure" script have until
now been put into CFLAGS.  However that option is supposed to be reserved
for the user under Automake rules, so move them to AM_CFLAGS.

Besides increased adherence to Automake rules, this is useful because
AM_CFLAGS can be overridden on a per-target (e.g. program or library)
basis, whereas CFLAGS cannot.  In turn, building the sFlow library (which
will be added in an upcoming commit) requires overriding the compiler
flags to avoid some warning messages.  (By modifying the warning flags, we
avoid the need to modify the sFlow library in any way.)
2009-11-23 11:34:54 -08:00
Ben Pfaff
83f6c0502c acinclude.m4: Fix inconsistency.
Both ; and : are valid shell commands here, but one branch of the "if"
uses one and the other branch uses the other.  Use the same one, for
consistency's sake.
2009-11-23 11:34:54 -08:00
Ben Pfaff
6bf4c631ae ovsdb: Rename variable to better describe its purpose.
Apparently a cut-and-paste error gave this variable a deceptive name.
2009-11-20 15:40:11 -08:00
Ben Pfaff
55213fd581 shash: Make it more convenient to store "const" objects in an shash. 2009-11-20 15:39:07 -08:00
Ben Pfaff
b966380b45 ovsdb: Require database, table, column names to be valid identifiers.
Database, table, and column names have always been required by the OVSDB
specification to be identifiers (e.g. valid C identifiers), but this has
never been enforced.

This commit adds enforcement and fixes one instance of an invalid column
name in the vswitch schema.
2009-11-19 16:48:12 -08:00
Justin Pettit
7ddda086a5 Correct dameon options in INSTALL.bridge
A while back, we retired the short options for daemons.  The
INSTALL.bridge file was never updated to reflect this.

CC: Jeongkeun Lee <jklee@hp.com>
2009-11-19 15:45:20 -08:00
Ben Pfaff
7671589afb netdev: Really set output values to 0 on failure in netdev_get_features().
The comment on netdev_get_features() claimed that all of the passed-in
values were set to 0 on failure, but the implementation didn't live up
to the promise.

CC: Paul Ingram <paul@nicira.com>
2009-11-19 13:32:59 -08:00
Jean Tourrilhes
9af9e2e8cf ovs-controller: Add --wildcard and --normal features.
This adds two command line switches to ovs-controller to:
	1) Use wildcards instead of exact matches.
	2) Use "normal" action instead of explicit port.
2009-11-19 12:48:36 -08:00