2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00

1150 Commits

Author SHA1 Message Date
Justin Pettit
b123cc3ce4 ofproto: Use 64-bit datapath id and management id (OpenFlow 0.9)
The length of a datapath was changed from 48 bits to 64 bits in OpenFlow
0.9.  For parity, we increased the management id size to match.

NOTE: This is the final commit in the OpenFlow 0.9 set.  Starting with
this commit, OVS is OpenFlow 0.9-compliant.
2010-02-20 02:22:27 -08:00
Justin Pettit
ca06922988 ofproto: Add selective Flow Removed messages and flow deletes (OpenFlow 0.9)
In OpenFlow 0.9, flow "expiration" messages are sent when flows are
explicitly removed by a delete action.  As such, the message is renamed
from Flow Expired to Flow Removed.  This commit adds that support as well
as supporting the ability to choose sending these messages on a per flow
basis.

NOTE: OVS at this point is not wire-compatible with OpenFlow 0.9 until the
final commit in this OpenFlow 0.9 set.
2010-02-20 02:22:27 -08:00
Justin Pettit
959a2ecdc8 ofproto: Match VLAN PCP and rewrite ToS bits (OpenFlow 0.9)
Starting in OpenFlow 0.9, it is possible to match on the VLAN PCP
(priority) field and rewrite the IP ToS/DSCP bits.  This check-in
provides that support and bumps the wire protocol number to 0x98.

NOTE: The wire changes come together over the set of OpenFlow 0.9 commits,
so OVS will not be OpenFlow-compatible with any official release between
this commit and the one that completes the set.
2010-02-20 02:22:26 -08:00
Ben Pfaff
7c79588e00 xenserver: Delete ports by interface name.
ovs-vsctl command "--if-exists del-port eth0" does nothing if eth0 is on
a bridge as part of a bond, because the bond's port name is not eth0 but
something else.  But interface-reconfigure needs to do that, so this commit
adds that ability to ovs-vsctl and modifies interface-reconfigure to use it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2010-02-23 09:51:44 -08:00
Ben Pfaff
204bad2940 ovs-vsctl: Clarify manpage.
If anyone ever reads the manpage, this should help.
2010-02-12 14:33:10 -08:00
Ben Pfaff
c69ee87c10 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".
2010-02-11 11:11:23 -08:00
Ben Pfaff
67a4917b07 Rename UNUSED macro to OVS_UNUSED to avoid naming conflict.
Requested by Jean Tourrilhes <jt@hpl.hp.com>.
2010-02-11 10:59:47 -08:00
Ben Pfaff
62ee3464d9 ovs-ofctl: Drop assignment whose value is never used.
Found by Clang (http://clang-analyzer.llvm.org).
2010-02-11 10:35:28 -08:00
Ben Pfaff
b89d833925 ovs-vsctl: Avoid redundant initializations in "add-br" command.
Found by Clang (http://clang-analyzer.llvm.org).
2010-02-11 10:35:28 -08:00
Ben Pfaff
193ec5109d 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/).
2010-02-10 16:54:48 -08:00
Ben Pfaff
bb1c67c813 ovs-vsctl: Add --may-exist option for add-port, add-bond commands.
This is useful in interface-reconfigure, in an upcoming commit.
2010-02-09 12:13:52 -08:00
Ben Pfaff
aeee85aab0 ovs-vsctl: Add --may-exist option for add-br command.
This will be used in the XenServer interface-reconfigure script.
2010-02-09 11:05:19 -08:00
Ben Pfaff
e6e7ab8792 ovs-vsctl: Improve error message when options follow command names. 2010-02-09 11:05:19 -08:00
Ben Pfaff
0d0f05b909 ovsdb: Add support for referential integrity in the database itself. 2010-02-08 14:16:19 -08:00
Ben Pfaff
bd76d25d8b ovsdb: Add simple constraints. 2010-02-08 14:16:19 -08:00
Ben Pfaff
91e310a5c2 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.
2010-02-08 14:16:18 -08:00
Ben Pfaff
8cf8cc6606 ovs-vsctl: When deleting a real bridge, delete ports of child fake bridges.
Otherwise these ports and their interfaces hang around unreferenced.
2010-02-08 14:16:18 -08:00
Justin Pettit
a4af00400a 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
2010-02-05 17:14:55 -08:00
Ben Pfaff
b86b43aa48 ovs-vsctl: Free memory on successful exit.
This is not important in itself, but it helps to spot real memory leaks.

Found with valgrind.
2010-02-02 15:21:10 -08:00
Ben Pfaff
a3326252a1 ovs-vsctl: Fix memory leaks.
Found with valgrind.
2010-02-02 15:21:10 -08:00
Ben Pfaff
1d48b4bed0 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.
2010-02-02 15:21:10 -08:00
Ben Pfaff
def90f6204 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.
2010-02-02 15:21:10 -08:00
Ben Pfaff
65f92a5069 ovs-appctl: Free memory on exit.
This makes it easier to see real memory leaks.

Found via valgrind.
2010-02-02 15:21:09 -08:00
Ben Pfaff
bb60fa749d ovs-pki: Avoid using local variables, which are non-POSIX.
Reported-by: Srini Seetharaman <seethara@stanford.edu>
2010-02-01 10:09:56 -08:00
Ben Pfaff
6468b79c63 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.
2010-02-01 10:05:44 -08:00
Ben Pfaff
870aeb4aa0 ovs-vsctl: Add --if-exists option to "get" command, for map columns. 2010-01-28 16:10:12 -08:00
Ben Pfaff
c29a8ba886 ovs-vsctl: Improve error reporting. 2010-01-28 16:10:10 -08:00
Ben Pfaff
492eb7a8ec 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.
2010-01-28 16:10:06 -08:00
Ben Pfaff
3ef917b569 ovs-vsctl: Make "create" command print new row's UUID.
Also, document limitations of other commands regarding UUIDs of new rows.
2010-01-28 16:10:01 -08:00
Ben Pfaff
3da1c516ba 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.
2010-01-28 16:09:58 -08:00
Ben Pfaff
f8ff4bc4f3 ovs-vsctl: Refactor in preparation for adding "postprocess" step.
Until now, all the ovs-vsctl commands have had no need to look at the
results of the database transaction.  However, to print the UUID of newly
inserted database records, they do need to do this.

This commit refactors ovs-vsctl in preparation for adding this ability.
2010-01-28 16:09:26 -08:00
Jesse Gross
0e17074a1a openflowd: Update for changes to dpif and netdev.
Openflowd had been a bit neglected as changes were made to the dpif
and netdev interfaces over time.  This brings it up to date with all
the latest changes.
2010-01-27 20:03:38 -05:00
Jesse Gross
1a6f1e2a6d dpif: Update dpif interface to match netdev.
This brings over some features that were added to the netdev interface,
most notably the separation between the name and the type.  In addition
to being cleaner, this also avoids problems where it is expected that
the local port has the same name as the datapath.
2010-01-27 20:03:38 -05:00
Ben Pfaff
e328faadc4 ovs-vsctl: Drop redundant {port,iface}-{set,get}-external-ids commands.
These commands can be implemented just as well, and in a more
general-purpose way, using the "set", "remove", and "get" commands.

The br-{get,set}-external-ids commands have slightly more specialized
behavior and so we can't drop them (yet).
2010-01-27 14:28:30 -08:00
Ben Pfaff
8f7501e83f ovs-vsctl: Update --help message. 2010-01-27 13:51:52 -08:00
Ben Pfaff
b7f74b6f59 ovs-vsctl: Add "destroy" command. 2010-01-27 13:51:52 -08:00
Ben Pfaff
557e37183d ovs-vsctl: Add new "create" command. 2010-01-27 13:51:52 -08:00
Ben Pfaff
71bd6358a2 ovs-vsctl: Add --force option to database commands to override safety checks. 2010-01-27 13:51:52 -08:00
Ben Pfaff
63f08492f4 ovs-vsctl: Fix formatting in manpage.
The stray .TP was screwing up the right margin for the whole rest of the
manpage.  The .STs were just adding too much vertical space.
2010-01-27 13:51:52 -08:00
Ben Pfaff
90c4bd001a ovs-vsctl: Add "remove" and "clear" commands. 2010-01-27 13:51:52 -08:00
Ben Pfaff
1bc6ff2918 ovs-vsctl: Make parsing functions return error instead of aborting.
The upcoming "remove" command for ovs-vsctl wants to try parsing an
argument two different ways.  This doesn't work if a parse error always
aborts immediately.  This commit fixes the problem, by making a parsing
failure pass up an error for higher layers to deal with instead of aborting
immediately.

This commit should have no user-visible effect.
2010-01-27 13:51:52 -08:00
Ben Pfaff
c611c9d011 ovs-vsctl: Make the "list" format more uniform. 2010-01-27 13:51:52 -08:00
Ben Pfaff
5128bd9c3c ovs-vsctl: Score perfect matches higher than ones that differ in case.
Before, both "xY_z" and "xy-z" were considered equally good matches for
"xy-z", but obviously the latter is a much better match.  This commit fixes
the problem (which was found by inspection).
2010-01-27 13:51:52 -08:00
Jesse Gross
93255bc565 ovs-vsctl: Fix uninitialized variable.
When querying a row we could return an uninitialized variable in
some cases if we can't find what we are looking for.
2010-01-27 15:46:40 -05:00
Jesse Gross
7345004715 ovs-vsctl: Add missing columns.
bond_updelay and flood_vlans were missing from the list of
configurable columns.
2010-01-26 16:09:08 -05:00
Ben Pfaff
40f0707cd9 daemon: Make --monitor process change its process title.
When --monitor is used, administrators sometimes become confused about the
presence of two copies of each process.  This commit attempts to clarify
the situation by making the monitoring process change its process name, as
seen in /proc/$pid/cmdline and in "ps", to clearly indicate what is going
on.

CC: Dan Wendlandt <dan@nicira.com>
2010-01-26 10:52:46 -08:00
Ben Pfaff
ad83bfa658 ovs-vsctl: Add commands for low-level database manipulation.
The new "get", "list", "set", and "add" commands provide lower-level
access to the vswitch database than the other ovs-vsctl commands, but they
are more convenient than using ovsdb-client directly.

This commit deserves several enhancements, but users are clamoring for
some kind of interface, so this is a starting point.
2010-01-26 09:49:30 -08:00
Ben Pfaff
49c36903d6 Merge "sflow" into "master".
No conflicts, but lib/dpif.c needed a few changes since struct dpif's
member "class" was renamed to "dpif_class" in master since sflow was
branched off.
2010-01-25 10:52:28 -08:00
Jesse Gross
84a0ee89e2 ovs-vsctl: Prevent uninitialized variable warning.
The compiler warns about next_cfg being uninitialized but in the cases
where it is unset we will never reach the point where it is used.  This
just sets next_cfg to 0 to stop the whining.
2010-01-20 14:24:22 -05:00
Ben Pfaff
e3830e909d fatal-signal: After fork, clear hooks instead of disabling them.
Until now, fatal_signal_fork() has simply disabled all the fatal signal
callback hooks.  This worked fine, because a daemon process forked only
once and the parent didn't do much before it exited.

But upcoming commits will introduce a --monitor option, which requires
processes to fork multiple times.  Sometimes the parent process will fork,
then run for a while, then fork again.  It's not good to disable the
hooks in the child process in such a case, because that prevents e.g.
pidfiles from being removed at the child's exit.

So this commit changes the semantics of fatal_signal_fork() to just
clearing out hooks.  After hooks are cleared, new hooks can be added and
will be executed on process termination in the usual way.

This commit also introduces a cancellation callback function so that a
canceled hook can free resources.
2010-01-15 15:28:14 -08:00