sliver-openvswitch.git
11 years agoSetting tag sliver-openvswitch-1.8.90-4 sliver-openvswitch-1.8.90-4
Thierry Parmentelat [Fri, 28 Sep 2012 21:17:00 +0000 (23:17 +0200)]
Setting tag sliver-openvswitch-1.8.90-4
fix file descriptor leaks

11 years agoMerge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
Giuseppe Lettieri [Fri, 28 Sep 2012 16:07:37 +0000 (18:07 +0200)]
Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch

11 years agofix file descriptor leakages
Giuseppe Lettieri [Fri, 28 Sep 2012 16:07:10 +0000 (18:07 +0200)]
fix file descriptor leakages

11 years agoSetting tag sliver-openvswitch-1.8.90-3 sliver-openvswitch-1.8.90-3
Thierry Parmentelat [Fri, 28 Sep 2012 14:53:57 +0000 (16:53 +0200)]
Setting tag sliver-openvswitch-1.8.90-3
can specify OpenFlow controller ip/port for each ovs instance
through $(CONTROLLER_<id>), or $(CONTROLLER) by default

11 years agotarget that updates sliver-ovs on the slivers
Giuseppe Lettieri [Fri, 28 Sep 2012 12:24:48 +0000 (14:24 +0200)]
target that updates sliver-ovs on the slivers

To use:

make -j update SLIVER_OVS=<path/to/new/sliver/ovs>

11 years agoMerge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
Giuseppe Lettieri [Thu, 27 Sep 2012 14:47:27 +0000 (16:47 +0200)]
Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch

11 years agoaccept a default vale for CONTROLLER_x
Giuseppe Lettieri [Thu, 27 Sep 2012 14:46:14 +0000 (16:46 +0200)]
accept a default vale for CONTROLLER_x

If $(CONTROLLER_x) is empty the Makefile will default to $(CONTROLLER).

11 years agomove set-controller to sliver-ovs
Giuseppe Lettieri [Thu, 27 Sep 2012 14:27:47 +0000 (16:27 +0200)]
move set-controller to sliver-ovs

11 years agotargets for setting the of controllers
Giuseppe Lettieri [Thu, 27 Sep 2012 14:19:59 +0000 (16:19 +0200)]
targets for setting the of controllers

add CONTROLLER_x=... for each bridge x in conf.mk
(e.g., CONTROLLER_SENDER=tcp:127.0.0.1:6663).
The run:

make -j controllers

to set the controllers.
Note: use IP addresses and not DNS names.

11 years agoSetting tag sliver-openvswitch-1.8.90-2 sliver-openvswitch-1.8.90-2
Thierry Parmentelat [Thu, 27 Sep 2012 09:38:16 +0000 (11:38 +0200)]
Setting tag sliver-openvswitch-1.8.90-2
add/skip packet information on tap send/recv

11 years agoadd/skip packet information on tap send/recv
Giuseppe Lettieri [Wed, 26 Sep 2012 17:09:04 +0000 (19:09 +0200)]
add/skip packet information on tap send/recv

Unless the IFF_NO_PI flag is set when the tap is created,
the kernel assumes that each packet sent to or received from
a tap fd starts with 4 bytes of packet information.

We previously did not care about this 4 extra bytes, but external
controllers are confused by them (the internal ovs-switch logic was
confused as well, but it defaulted to hub behaviour and the bug
was thus hidden).

Unfortunately, fd_tuntap does not allow us to set IFF_NO_IP, so
we have to manually skip/add the 4 bytes on recv/send.

11 years agofix warnings
Giuseppe Lettieri [Wed, 26 Sep 2012 14:12:08 +0000 (16:12 +0200)]
fix warnings

11 years agobump version number and provide a simple changelog sliver-openvswitch-1.8.90-0 sliver-openvswitch-1.8.90-1
Thierry Parmentelat [Wed, 26 Sep 2012 08:55:37 +0000 (10:55 +0200)]
bump version number and provide a simple changelog

11 years agoMerge branch 'mainstream'
Giuseppe Lettieri [Mon, 24 Sep 2012 13:26:21 +0000 (15:26 +0200)]
Merge branch 'mainstream'

11 years agomake the sign of return values match the specs
Giuseppe Lettieri [Mon, 24 Sep 2012 11:33:06 +0000 (13:33 +0200)]
make the sign of return values match the specs

11 years agoFix mac addresses of tunnels/pltaps
Giuseppe Lettieri [Mon, 24 Sep 2012 11:00:58 +0000 (13:00 +0200)]
Fix mac addresses of tunnels/pltaps

11 years agoovsdb-client: Make "list-dbs" print the list of databases in sorted order.
Ben Pfaff [Thu, 6 Sep 2012 18:11:45 +0000 (11:11 -0700)]
ovsdb-client: Make "list-dbs" print the list of databases in sorted order.

This makes the command's behavior more predictable when there is more than
one database.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb-client: Use svec instead of sset for list of database.
Ben Pfaff [Thu, 6 Sep 2012 18:11:12 +0000 (11:11 -0700)]
ovsdb-client: Use svec instead of sset for list of database.

This will make it easier to print a list of databases in sorted order,
which will happen in a followup commit.

This commit should have no effect on visible OVS behavior.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovs-lib: Move DAEMON_CWD initialization to top of file.
Ben Pfaff [Thu, 6 Sep 2012 23:20:17 +0000 (16:20 -0700)]
ovs-lib: Move DAEMON_CWD initialization to top of file.

All the other variables are initialized at the top and I don't see a reason
that this variable is special.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb-tool: Fix indentation in manpage.
Ben Pfaff [Thu, 6 Sep 2012 23:15:18 +0000 (16:15 -0700)]
ovsdb-tool: Fix indentation in manpage.

This paragraph is about show-log so it should be indented the same as the
other paragraph about show-log.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agounixctl: Fix comment on unixctl_command_register().
Ben Pfaff [Thu, 6 Sep 2012 22:41:11 +0000 (15:41 -0700)]
unixctl: Fix comment on unixctl_command_register().

The arguments to the callback were changed some time ago but the comment
still described the older form.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoflow: Only show IPv4 flow information for IPv4 flows
Simon Horman [Fri, 21 Sep 2012 00:26:43 +0000 (09:26 +0900)]
flow: Only show IPv4 flow information for IPv4 flows

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoexperimental remote-snapshot feature
Giuseppe Lettieri [Thu, 20 Sep 2012 22:02:09 +0000 (00:02 +0200)]
experimental remote-snapshot feature

With this new target you can (re)build the local cache if you now
the node names. Start with a conf.mk containig SLICE
and HOST_x = y for each host. Then do

rm -rf cache; rm -rf L
make -j remote-snapshot >> conf.mk
make

11 years agodo not rely on cache for deletes
Giuseppe Lettieri [Thu, 20 Sep 2012 20:54:12 +0000 (22:54 +0200)]
do not rely on cache for deletes

11 years agoWe do not actually need a U directory
Giuseppe Lettieri [Thu, 20 Sep 2012 20:47:38 +0000 (22:47 +0200)]
We do not actually need a U directory

11 years agomove logs to a separate directory
Giuseppe Lettieri [Thu, 20 Sep 2012 20:40:32 +0000 (22:40 +0200)]
move logs to a separate directory

11 years agoofproto: Fix uninitialized field in ofputil_flow_update.
Anupam Chanda [Thu, 20 Sep 2012 17:35:52 +0000 (10:35 -0700)]
ofproto: Fix uninitialized field in ofputil_flow_update.

Two instances of ofputil_flow_update had the priority field uninitialized.
This would cause flow updates to contain undefined priority values.

This bug was introduced by commit 81a76618 (classifier: Break cls_rule
'flow' and 'wc' members into new "struct match".)

Signed-off-by: Anupam Chanda <achanda@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agobridge: Omit alerts on the cfm_remote_opstate column.
Ethan Jackson [Thu, 20 Sep 2012 02:21:06 +0000 (19:21 -0700)]
bridge: Omit alerts on the cfm_remote_opstate column.

This column should be write only, otherwise every call to update it
has to make a trip to the database.  Since this column is updated
every time through the run loop as part of refresh_instant_stats(),
this patch fixes a significant performance degradation.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoovs-ofctl: Accept port keywords, OF1.1 port numbers, reject port number 0.
Ben Pfaff [Thu, 20 Sep 2012 15:40:29 +0000 (08:40 -0700)]
ovs-ofctl: Accept port keywords, OF1.1 port numbers, reject port number 0.

OpenFlow 1.0 has special reserved ports in the range 0xfff8 to 0xffff.
OpenFlow 1.1 and later has the same ports in the range 0xfffffff8 to
0xffffffff and allows the OF1.0 range to be used for ordinary ("physical")
switch ports.  This means that, naively, the meaning of a port number in
the range 0xfff8 to 0xffff given on the ovs-ofctl command line depends on
the protocol in use.  This commit implements something a little smarter:

    - Accept keyword names (e.g. LOCAL) for special reserved ports
      everywhere that such a port can plausibly be used (previously they
      were only accepted in some places).

    - Translate 0xfff8...0xffff to 0xfffffff8...0xffffffff for now, since
      OF1.1+ isn't in widespread use and those particular ports aren't
      likely to be in use in OF1.1+ anyway.

    - Log warnings about those ports when they are specified by number, to
      allow users to fix their invocations.

Also:

    - Accept the OF1.1+ port numbers for these ports, without warning, for
      compatibility with the upcoming OF1.1+ support.

    - Stop accepting port number 0, which has never been a valid port
      number in OpenFlow 1.0 and later.  (This required fixing some tests
      that inadvertently used this port number).

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
11 years agoofp-actions: Improve explanation of 'compat' member in struct ofpact.
Ben Pfaff [Wed, 19 Sep 2012 22:38:29 +0000 (15:38 -0700)]
ofp-actions: Improve explanation of 'compat' member in struct ofpact.

Suggested-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agodatapath: Remove unecessary semicolon
Peter Senna Tschudin [Wed, 19 Sep 2012 00:09:46 +0000 (17:09 -0700)]
datapath: Remove unecessary semicolon

Found by http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoself-contained tap creation in the switchd
Giuseppe Lettieri [Tue, 18 Sep 2012 20:09:06 +0000 (22:09 +0200)]
self-contained tap creation in the switchd

This patch incorporates the functionality of pltap-ovs,
vsysc and create_bridge into the vswitch server itself.
Now the server is able to re-recreate any bridge contained
in the database after a restart.
The database must also contain the IP/NETMASK of the
tap device. These are stored as options of the bridge
internal interface.

Now the bridge name is no longer required to be the same
as the tap name. Instead, the tap interface remembers
the "real name" internally. The real name can be retrieved
with

ovs-appctl netdev-pltap/get-tapname

The sliver-ovs utility and the exp-tool/Makefile have
been updated accordingly.

TODO:
check wether we are allwed to:
- read the mac address of the tap;
- read the stats.
Otherwise see if we can do that via Vsys.

11 years agojsonrpc: Fix Python implementation of inactivity logic.
Ben Pfaff [Fri, 14 Sep 2012 20:09:33 +0000 (13:09 -0700)]
jsonrpc: Fix Python implementation of inactivity logic.

When a JSON-RPC session receives bytes, or when it successfully sends
queued bytes, then it should count that as activity.  However, the code
here was reversed, in that it used the wrong check in each place.  That is,
when it tried to receive data, it would check whether data had just been
sent, and when it tried to send data, it would check whether data had just
been received.  Neither one makes sense and doesn't work.

Bug #13214.
Reported-by: Luca Giraudo <lgiraudo@nicira.com>
CC: James Schmidt <jschmidt@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoFAQ: Describe difference between ovs-dpctl and ovs-ofctl "dump-flows".
Ben Pfaff [Tue, 18 Sep 2012 17:08:56 +0000 (10:08 -0700)]
FAQ: Describe difference between ovs-dpctl and ovs-ofctl "dump-flows".

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agodatapath: Add version info for out-of-tree modules.
Jesse Gross [Tue, 18 Sep 2012 01:32:57 +0000 (18:32 -0700)]
datapath: Add version info for out-of-tree modules.

The upstream version of the module always has the version of the running kernel
but for out-of-tree modules it can be difficult to tell the current version.
This adds the information to the module where it can be read using modinfo for
the on-disk version or from /sys/module/openvswitch/version for the currently
loaded module.

Suggested-by: Duffie Cooley <dcooley@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agofix dependency
Giuseppe Lettieri [Tue, 18 Sep 2012 13:24:04 +0000 (15:24 +0200)]
fix dependency

11 years agouse builtin --if-exists/--may-exist
Giuseppe Lettieri [Mon, 17 Sep 2012 19:17:44 +0000 (21:17 +0200)]
use builtin --if-exists/--may-exist

We use the builtin functionality of ovs-vsctl to check
for already existing bridges and ports on creation,
or already non existing ones on deletion. In this way
we get a more significant return value from ovs-vsctl
in case of error.

11 years agostream-unix: Reduce connection failure log level from ERR to WARN.
Ben Pfaff [Mon, 17 Sep 2012 16:09:30 +0000 (09:09 -0700)]
stream-unix: Reduce connection failure log level from ERR to WARN.

Sometimes this just means that the daemon we're connecting to is
restarting.

Bug #13177.
Reported-by: Scott Hendricks <shendricks@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agotests: Fix sensitivity to record ordering in test-netflow output.
Ben Pfaff [Fri, 14 Sep 2012 20:04:15 +0000 (13:04 -0700)]
tests: Fix sensitivity to record ordering in test-netflow output.

The order of records in a NetFlow message is essentially random, but the
test case was picky about it.  I started getting failures when I modified
apparently unrelated code, so here's a fix.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovs-ofctl: Fix indentation in manpage.
Ben Pfaff [Fri, 14 Sep 2012 18:19:36 +0000 (11:19 -0700)]
ovs-ofctl: Fix indentation in manpage.

This .RE (to reduce the current indentation level) needs to go after all
the actions, but it was mistakenly put before the fin_timeout action.

Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agouse standard names for pid files
Giuseppe Lettieri [Mon, 17 Sep 2012 16:09:08 +0000 (18:09 +0200)]
use standard names for pid files

We use standard names for the pid files of
ovsdb-server and ovs-vswitchd, only the directory
is configurable.

In this way ovs-appctl is able to find the control
sockets by itself.

11 years agotell ovsdb-server where the db is
Giuseppe Lettieri [Mon, 17 Sep 2012 09:31:40 +0000 (11:31 +0200)]
tell ovsdb-server where the db is

11 years agomake sliver-ovs use the configure variables
Giuseppe Lettieri [Mon, 17 Sep 2012 08:23:32 +0000 (10:23 +0200)]
make sliver-ovs use the configure variables

11 years agofix memory leak
Giuseppe Lettieri [Sun, 16 Sep 2012 12:17:43 +0000 (14:17 +0200)]
fix memory leak

Signed-off-by: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
11 years agoofp-actions: helper functions for of12 set-field action
Simon Horman [Fri, 14 Sep 2012 03:05:44 +0000 (12:05 +0900)]
ofp-actions: helper functions for of12 set-field action

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofp-util: Allow decoding of Open Flow 1.1 & 1.2 Table Statistics Request Messages
Simon Horman [Wed, 12 Sep 2012 04:47:27 +0000 (21:47 -0700)]
ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Table Statistics Request Messages

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com then made substantial changes that were then:]
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoMerge branch 'master' of git://openvswitch.org/openvswitch
Giuseppe Lettieri [Thu, 13 Sep 2012 09:16:45 +0000 (11:16 +0200)]
Merge branch 'master' of git://openvswitch.org/openvswitch

11 years agopython/ovs/db/idl.py: Transaction._substitute doesn't handle list/tuple
Isaku Yamahata [Thu, 13 Sep 2012 04:41:04 +0000 (13:41 +0900)]
python/ovs/db/idl.py: Transaction._substitute doesn't handle list/tuple

Since Transaction._substitute doesn't substitute elements of list/tuple,
setting list references results in transaction error. Teach it such case.

Example:
{"op": "update",
 "row":{"bridges":["set",[["uuid",
                           "1f42bc19-307f-42e7-a9c0-c12178bd8b51"],
                          ["uuid",
                           "f97e0c76-7146-489d-9bed-29bc704f65fe"]]]},
 "table": "Open_vSwitch",
 "where":[["_uuid", "==", ["uuid",
                           "20c2a046-ae7e-4453-a576-11034db24985"]]]}

In the above case, uuid in "row" aren't replaced by "named-uuid" because
the function doesn't look into elements of lists.
When list/tuple is found, look into elements recursively.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofp-actions: Right-justify the value in ofpact_reg_load 'subvalue' member.
Ben Pfaff [Wed, 12 Sep 2012 18:37:53 +0000 (11:37 -0700)]
ofp-actions: Right-justify the value in ofpact_reg_load 'subvalue' member.

This is what I intended when I suggested using mf_subvalue, but I didn't
notice the difference until after applying the patch.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
11 years agopython/ovs/db/idl: make SchemaHelper accept schema in json form
Isaku Yamahata [Thu, 13 Sep 2012 02:27:30 +0000 (11:27 +0900)]
python/ovs/db/idl: make SchemaHelper accept schema in json form

This is needed when using schema that was retrieved from ovsdb by get_schema
method.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agopython/ovs/db/idl: add counterpart of ovsdb_idl_add_table()
Isaku Yamahata [Thu, 13 Sep 2012 02:22:53 +0000 (11:22 +0900)]
python/ovs/db/idl: add counterpart of ovsdb_idl_add_table()

Add register_table method to SchemaHelper as Python counterpart of
ovsdb_idl_add_table() in the C version of the IDL.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agopython/ovs: socket_util uses select.poll
Isaku Yamahata [Wed, 12 Sep 2012 06:17:21 +0000 (15:17 +0900)]
python/ovs: socket_util uses select.poll

The changeset of ed815d9bd28422a490fe370d7804d24bcd676806 eliminated
the use of select.poll for eventlet/gevent.
It forgot to select.poll in socket_util.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agolib/ofp-actions: use mf_subvalue in struct ofpact_reg_load.
Isaku Yamahata [Wed, 12 Sep 2012 08:44:28 +0000 (17:44 +0900)]
lib/ofp-actions: use mf_subvalue in struct ofpact_reg_load.

Use a uninion mf_subvalue instead of a uint64_t for
the value member of struct ofpact_reg_load.

set_field action needs to hold values wider than 64 bits.
This is preparation for set_field action.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoMerge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
Giuseppe Lettieri [Tue, 11 Sep 2012 13:36:45 +0000 (15:36 +0200)]
Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch

Conflicts:
planetlab/exp-tool/Makefile
planetlab/scripts/sliver-ovs

11 years agouse sliver-ovs to stop stuff as well
Thierry Parmentelat [Tue, 11 Sep 2012 13:01:33 +0000 (15:01 +0200)]
use sliver-ovs to stop stuff as well

11 years agosingle config file - LINKS get defined in conf.mk
Thierry Parmentelat [Tue, 11 Sep 2012 12:32:26 +0000 (14:32 +0200)]
single config file - LINKS get defined in conf.mk
this breaks the feature that lets save current topology but makes
user's - esp. firtst-time user's - life much easier
also an attempt to make the Makefile less cryptic :)

11 years agobugfix - create-port was broken
Thierry Parmentelat [Tue, 11 Sep 2012 12:30:34 +0000 (14:30 +0200)]
bugfix - create-port was broken

11 years agokill pltap-ovs on create-bridge timeout
Giuseppe Lettieri [Tue, 11 Sep 2012 12:27:56 +0000 (14:27 +0200)]
kill pltap-ovs on create-bridge timeout

11 years agoshow subcommand to inspect bridge configuration
Giuseppe Lettieri [Tue, 11 Sep 2012 11:38:29 +0000 (13:38 +0200)]
show subcommand to inspect bridge configuration

11 years agogeneric function for checking subcommand params
Giuseppe Lettieri [Tue, 11 Sep 2012 11:30:43 +0000 (13:30 +0200)]
generic function for checking subcommand params

11 years agofixed parameters for del-port
Giuseppe Lettieri [Tue, 11 Sep 2012 08:36:46 +0000 (10:36 +0200)]
fixed parameters for del-port

11 years agoadd set-remote-endpoint action to sliver-ovs
Giuseppe Lettieri [Tue, 11 Sep 2012 07:56:29 +0000 (09:56 +0200)]
add set-remote-endpoint action to sliver-ovs

Now all makefile targets call a sliver-ovs action.
This is required to centralize checks (is_{switch,db}_running and
possibly more to come) and to make all
sliver-openvwitch configuration variables (DB_SOCK and the like)
available to all actions.

11 years agoadd set-remote-endpoint action to sliver-ovs
Giuseppe Lettieri [Tue, 11 Sep 2012 07:56:29 +0000 (09:56 +0200)]
add set-remote-endpoint action to sliver-ovs

Now all makefile targets call a sliver-ovs action.
This is required to centralize checks (is_{switch,db}_running and
possibly more to come) and to make all
sliver-openvwitch configuration variables (DB_SOCK and the like)
available to all actions.

11 years agoMerge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
Giuseppe Lettieri [Tue, 11 Sep 2012 07:49:04 +0000 (09:49 +0200)]
Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch

Conflicts:
planetlab/scripts/sliver-ovs

11 years agoINSTALL: Recommend installing kernel modules with "make modules_install".
Ben Pfaff [Mon, 10 Sep 2012 17:13:07 +0000 (10:13 -0700)]
INSTALL: Recommend installing kernel modules with "make modules_install".

Reported-by: Valentin Bud <valentin@hackaserver.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoache/bridge.% needs to contain the ifname
Thierry Parmentelat [Mon, 10 Sep 2012 12:30:10 +0000 (14:30 +0200)]
ache/bridge.% needs to contain the ifname

11 years agomore convenience targets, like
Thierry Parmentelat [Mon, 10 Sep 2012 08:52:16 +0000 (10:52 +0200)]
more convenience targets, like
make showips
and all the family of (assuming MUX is a host id) start.MUX stop.MUX
bridge.MUX and the like

11 years agospecifying the --db option to ovs-vsctl requires the unix: qualifier
Thierry Parmentelat [Mon, 10 Sep 2012 08:51:09 +0000 (10:51 +0200)]
specifying the --db option to ovs-vsctl requires the unix: qualifier

11 years agoadditional checks for running servers
Giuseppe Lettieri [Sat, 8 Sep 2012 16:51:40 +0000 (18:51 +0200)]
additional checks for running servers

- Added some more is_switch_running calls.
- Added new is_db_running. We need at least
  a running ovsdb-server to actually delete
  a port or a bridge.

11 years agojsonrpc: Treat receiving part of a message as activity.
Ben Pfaff [Wed, 5 Sep 2012 20:34:35 +0000 (13:34 -0700)]
jsonrpc: Treat receiving part of a message as activity.

Until now, the jsonrpc code has only counted receiving a full JSON-RPC
messages as activity.  This could theoretically time out, then, while a
very long message is in transit or if a slow link is involved.  This commit
changes this code to count receiving any part of a message as activity.

This isn't a problem for OpenFlow connections because OpenFlow messages are
at most 64 kB in size.

This problem hasn't actually been observed in practice.

Bug #12789.
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agojsonrpc: Treat draining data from send queue as activity.
Ben Pfaff [Fri, 7 Sep 2012 17:50:15 +0000 (10:50 -0700)]
jsonrpc: Treat draining data from send queue as activity.

Until now, the jsonrpc module has used messages received from the
remote peer as the sole means to determine that the JSON-RPC
connection is up.  This could in theory interact badly with a
remote peer that stops reading and processing messages from the
receive queue when there is a backlog in the send queue for a
given connection (ovsdb-server is an example of a program that
behaves this way).  This commit fixes the problem by expanding
the definition of "activity" to include successfully sending
JSON-RPC data that was previously queued.

The above change is exactly analogous to the similar change
made to the rconn library in commit 133f2dc95454 (rconn: Treat
draining a message from the send queue as activity.).

Bug #12789.
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoreconnect: Rename reconnect_received() to reconnect_activity().
Ben Pfaff [Wed, 8 Aug 2012 20:32:57 +0000 (13:32 -0700)]
reconnect: Rename reconnect_received() to reconnect_activity().

Receiving data is not the only reasonable way to verify that a connection
is up.  For example, on a TCP connection, receiving an acknowledgment that
the remote side has accepted data that we sent is also a reasonable means.
Therefore, this commit generalizes the naming.

Also, similarly for the Python implementation: Reconnect.received() becomes
Reconnect.activity().

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoadd timeouts to infinite loops
Thierry Parmentelat [Fri, 7 Sep 2012 07:33:50 +0000 (09:33 +0200)]
add timeouts to infinite loops

11 years agoadd global start stop status targets for handling db+switch
Thierry Parmentelat [Fri, 7 Sep 2012 06:46:09 +0000 (08:46 +0200)]
add global start stop status targets for handling db+switch

11 years agospecify DB_SOCKET to ovs-vsctl for consistency
Thierry Parmentelat [Fri, 7 Sep 2012 06:45:10 +0000 (08:45 +0200)]
specify DB_SOCKET to ovs-vsctl for consistency
use /etc/openvswitch instead of /usr/etc/openvswitch

11 years agotweak packaging to use fedora-compliant paths
Thierry Parmentelat [Fri, 7 Sep 2012 06:42:44 +0000 (08:42 +0200)]
tweak packaging to use fedora-compliant paths
remove duplicate sliver-ovs script

11 years agoadd netmask in the example file
Thierry Parmentelat [Fri, 7 Sep 2012 06:11:35 +0000 (08:11 +0200)]
add netmask in the example file

11 years agostores command logs in separate file, not the make target itself
Thierry Parmentelat [Thu, 6 Sep 2012 16:04:19 +0000 (18:04 +0200)]
stores command logs in separate file, not the make target itself

11 years agonew subcommands start stop status
Thierry Parmentelat [Thu, 6 Sep 2012 16:03:47 +0000 (18:03 +0200)]
new subcommands start stop status

11 years agospecify where the switch daemon creates its control socket and pass
Thierry Parmentelat [Thu, 6 Sep 2012 15:38:55 +0000 (17:38 +0200)]
specify where the switch daemon creates its control socket and pass
this to ovs-appctl

11 years agorun sudo with -S is required for f14 (was not on f12)
Thierry Parmentelat [Thu, 6 Sep 2012 14:38:38 +0000 (16:38 +0200)]
run sudo with -S is required for f14 (was not on f12)
rename switchd into just switch, for consistency with sliver-ovs

11 years agoadd stop_* and status commands
Thierry Parmentelat [Thu, 6 Sep 2012 11:25:21 +0000 (13:25 +0200)]
add stop_* and status commands
fix communication between db and switch
all filenames are variables
specify logfiles

11 years agoautomake was whining
Thierry Parmentelat [Thu, 6 Sep 2012 06:32:33 +0000 (08:32 +0200)]
automake was whining

11 years agoMerge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
Thierry Parmentelat [Thu, 6 Sep 2012 06:25:57 +0000 (08:25 +0200)]
Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch

11 years agoadd solve_ip function
Thierry Parmentelat [Thu, 6 Sep 2012 06:25:48 +0000 (08:25 +0200)]
add solve_ip function

11 years agofix dependencies after scripts cleanup
Thierry Parmentelat [Thu, 6 Sep 2012 06:25:32 +0000 (08:25 +0200)]
fix dependencies after scripts cleanup

11 years agothird-party: Fix tcpdump patch
Joe Stringer [Wed, 5 Sep 2012 03:25:58 +0000 (15:25 +1200)]
third-party: Fix tcpdump patch

Other parts of OVS have moved on since the tcpdump patch was created. This
commit brings the patch up to date and will compile cleanly against
tcpdump-4.3.0.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agodpif-linux: Report packet loss as WARN instead of ERR.
Ben Pfaff [Wed, 5 Sep 2012 18:02:27 +0000 (11:02 -0700)]
dpif-linux: Report packet loss as WARN instead of ERR.

Packet loss is recoverable so it doesn't warrant an ERR.

Bug #12920.
Reported-by: Scott Hendricks <shendricks@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovsdb: Enforce immutability of immutable columns.
Ben Pfaff [Wed, 5 Sep 2012 17:35:20 +0000 (10:35 -0700)]
ovsdb: Enforce immutability of immutable columns.

OVSDB has always had the ability to mark a column as "immutable", so that
its value cannot be changed in a given row after that row is initially
inserted.  However, we discovered recently that ovsdb-server has never
enforced this constraint.  This commit implements enforcement.

Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agomake the separator configurable
Giuseppe Lettieri [Wed, 5 Sep 2012 17:33:01 +0000 (19:33 +0200)]
make the separator configurable

11 years agoofp-errors: Use OFPERR_OFPBRC_BAD_TABLE_ID
Simon Horman [Wed, 5 Sep 2012 02:50:38 +0000 (11:50 +0900)]
ofp-errors: Use OFPERR_OFPBRC_BAD_TABLE_ID

* In the case of OpenFlow 1.1+ OFPERR_OFPBRC_BAD_TABLE_ID is defined
  in the specification and seems to be the most appropriate error
  to use when an unknown table id is encountered.

* In the case of OpenFlow 1.0 no appropriate error message
  seems to exist. Perhaps because an invalid port is not possible?
  I'm unsure.

  In any case, make use of a non-standard error code (1,512).
  This was formerly known as OFPERR_NXBRC_BAD_TABLE_ID but
  has been rolled into OFPERR_OFPBRC_BAD_TABLE_ID to allow the
  latter to be used without concern for the prevailing Open Flow version.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofp-errors: Use OFPERR_OFPBRC_BAD_PORT
Simon Horman [Wed, 5 Sep 2012 02:50:37 +0000 (11:50 +0900)]
ofp-errors: Use OFPERR_OFPBRC_BAD_PORT

* In the case of OpenFlow 1.2+ OFPERR_OFPBRC_BAD_PORT is defined
  in the specification and seems to be the most appropriate error
  to use when an invalid port is encountered in a Packet Out request.

* In the case of OpenFlow 1.0 and 1.1 no appropriate error message
  seems to exist. Perhaps because an invalid port is not possible?
  I'm unsure.

  In any case, make use of a non-standard error code (1,514).
  This was formerly known as OFPERR_NXBRC_BAD_IN_PORT but
  has been rolled into OFPERR_NXBRC_BAD_IN_PORT to allow the
  latter to be used without concern for the prevailing Open Flow version.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoextract-ofp-errors: Check that error codes are in the expected ranges.
Ben Pfaff [Wed, 5 Sep 2012 17:18:56 +0000 (10:18 -0700)]
extract-ofp-errors: Check that error codes are in the expected ranges.

All real OpenFlow error codes are small numbers, and for Nicira extensions
we've intentionally chosen large numbers.  This commit adds a check that
standard and extension codes are properly designated in the ofp-errors.h
header.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofp-errors: Ignore text enclosed in square brackets
Simon Horman [Wed, 5 Sep 2012 02:50:36 +0000 (11:50 +0900)]
ofp-errors: Ignore text enclosed in square brackets

Enhance to extract-ofp-errors to omit text enclosed in square brackets from
error description. This allows some commentary other than
the error description to be supplied in ofp-errors.h

As suggested by Ben Pfaff <blp@nicira.com>

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com added the large comment on enum ofperr.]
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agopython/ovs/poller: use select.select instead of select.poll.
Isaku Yamahata [Wed, 5 Sep 2012 10:38:26 +0000 (19:38 +0900)]
python/ovs/poller: use select.select instead of select.poll.

eventlet/gevent doesn't work well with select.poll because select.poll blocks
python interpreter as a whole instead of switching from the current thread
which is about to block to other runnable thread.
So ovsdb python binding can't be used with eventlet/gevent.
Emulate select.poll with select.select because using python means that
performance isn't so important.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agobugfixes
Thierry Parmentelat [Wed, 5 Sep 2012 14:35:43 +0000 (16:35 +0200)]
bugfixes

11 years agotrash old scripts
Thierry Parmentelat [Wed, 5 Sep 2012 14:10:36 +0000 (16:10 +0200)]
trash old scripts

11 years agocosmetic in usage message
Thierry Parmentelat [Wed, 5 Sep 2012 14:08:23 +0000 (16:08 +0200)]
cosmetic in usage message

11 years agouse sliver-ovs <subcommand> rather than the former scripts
Thierry Parmentelat [Wed, 5 Sep 2012 14:08:10 +0000 (16:08 +0200)]
use sliver-ovs <subcommand> rather than the former scripts

11 years agofirst attempt at a single merged script out of the previous 6
Thierry Parmentelat [Wed, 5 Sep 2012 14:03:16 +0000 (16:03 +0200)]
first attempt at a single merged script out of the previous 6