2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 08:45:23 +00:00
Commit Graph

19894 Commits

Author SHA1 Message Date
Ben Pfaff
4a8535f39d tests: Improve error reporting for timeval test failures. 2010-01-15 11:33:18 -08:00
Jesse Gross
686cc0c00b netdev: Fix build for switchui. 2010-01-15 11:48:29 -05:00
Justin Pettit
2426f67a96 xenserver: Give ovs-vsctl a bit more time to do its work
Creating bonds sometimes fails due to ovs-vsctl timing out.  This commit
increases the time interface-reconfigure gives ovs-vsctl from five to
twenty seconds.  We should investigate why it's taking ovs-vsctl so
long, but this helps for now.
2010-01-15 08:36:05 -08:00
Jesse Gross
5b7448ed80 netdev-linux: Cleanup tap netdev.
TAP devices need to be treated slightly differently from other other
devices because they cannot be opened multiple times.  Instead we
open them once and share the file descriptor.  This means that if
the netdev is opened multiple times one reader can drain the buffers
of another.  While this is a deviation from the normal convention,
it does not impact current or planned users.

In addition, this cleans up some confusion between the file
descriptor for tap devices versus other FD's.
2010-01-15 11:34:34 -05:00
Jesse Gross
0b0544d706 gre: Add support for destroying GRE devices.
This allows GRE tunnel devices to be torn down on graceful exit
of vswitch and cleaned up on restart for non-graceful exits.
2010-01-15 11:34:34 -05:00
Jesse Gross
149f577a25 netdev: Fully handle netdev lifecycle through refcounting.
This builds on earlier work that implemented netdev object refcounting.
However, rather than requiring explicit create and destroy calls,
these operations are now performed automatically based on the referenece
count.  This is important because in certain situations it is not
possible to know whether a netdev has already been created.  A
workaround existed (which looked fairly similar to this paradigm) but
introduced it's own issues.  This simplifies and unifies the API.
2010-01-15 11:34:34 -05:00
Justin Pettit
b4182c7f2d ovs-vsctl: Add option to create fake iface when adding a bond
Some systems, such as XenServer, expect that bonds have their own interface.
This commit adds the ability to do that with the "--fake-iface" option
in ovs-vsctl's add-bond command.  It also has XenServer's
interface-reconfigure use it.

Part of solution to Bug #2376
2010-01-15 08:28:59 -08:00
Jesse Gross
5462843f51 gre: Workarounds for large packets over GRE
The first change is to not propagate the IP DF bit from the inner
packet to the outer packet.  Large TCP packets can get segmented
first which will set the DF bit.  However these segmented packets
might still be too large after the GRE header is added, requiring
fragmentation.

The second change is to raise the MTU of the GRE tunnel device.
This prevents packets from being dropped in the datapath before
they can be fragmented.  Since the datapath is layer 2 it does not
do any fragmentation and drops any packets that are too large.

Both of these are temporary workarounds that need to be addressed
more carefully in the future.

Bug #2379
2010-01-15 09:02:07 -05:00
Justin Pettit
b7f22a6aeb Release Open vSwitch 0.99.0.
This is an "unstable" release.
v0.99.0
2010-01-14 23:24:09 -08:00
Justin Pettit
1626118f26 ovs-vsctl: Don't mask timeout argument
ovs-vsctl supports the "--timeout" option, which specifies the amount
of time that the operation is allowed to take before a SIGALRM is
raised.  The code that parsed options had a local "timeout" that masked
the global one that was supposed to be set.
2010-01-14 18:08:52 -08:00
Jesse Gross
1723e50ed2 bonding: Use device names instead of Xen OpaqueRefs
When configuring the slaves of a bond, interface-reconfigure was
directly writing the Xen OpaqueRef as the name instead of first
converting it into a standard device name.

Bug #2377
2010-01-14 16:57:11 -05:00
Justin Pettit
f3d645212a ovsdb: Provide helper function to determine if IDL has ever connected 2010-01-14 13:10:35 -08:00
Justin Pettit
5ff22a0642 ovs-brcompatd: Don't consume CPU if can't connect to config db
When ovs-brcompatd can't connect to the database, the "ovs" variable
is never set.  The function "brc_recv_update" takes care of draining
brcompat kernel module's netlink messages.  When the netlink message
comes in to modify the bridge, that function never gets called, so a
netlink message always appears to be ready and we consume 100% CPU
looping.

With this commit, we log a warning and drop the request on the floor.

Bug #2373
2010-01-14 13:01:31 -08:00
Ben Pfaff
81eec36e02 datapath: Disable preemption updating per-CPU data in dp_dev_recv().
dp_dev_recv() is called from do_output(), which can be called from
execute_actions(), which can be called from process context with
preemption enabled, so it needs to disabled preemption before it can
access per-CPU data.

Build tested on a few different kernels.

Bug #2316.

Reported-by: John Galgay <john@galgay.net>
CC: Dan Wendlandt <dan@nicira.com>
2010-01-13 10:43:31 -08:00
Ben Pfaff
eb8d3ed67c ovsdb-client: Fix regression introduced with changes to daemonize().
daemonize() now closes the standard file descriptors, but ovsdb-client's
"monitor" command uses stdout even after daemonizing.  This caused
tests that used "ovsdb-client --detach monitor" to fail without printing
their complete output.  This commit fixes the problem.
2010-01-13 09:57:31 -08:00
Ben Pfaff
55368fb836 daemon: Close standard file descriptors when daemonizing.
Before SSH terminates, it waits for the PTYs that it creates for use as
stdin, stdout, and stderr to be closed.  When any of the Open vSwitch
daemons were started in the background over an SSH session, they held
those file descriptors open and thus the SSH session hung.  This commit
fixes the problem by closing those file descriptors, allowing SSH to
terminate.
2010-01-12 16:03:35 -08:00
Ben Pfaff
9a2e195328 xenserver: Make BRCOMPATD_MEMLEAK_LOGFILE setting work.
Sometimes it's too bad that shell variables don't need declarations.
2010-01-12 14:28:01 -08:00
Ben Pfaff
2f3ca7ea71 ovsdb-idl: Fix memory leak committing a no-op transaction.
Partial fix for bug #2373.
2010-01-12 14:28:01 -08:00
Ben Pfaff
7b8dbc8d8f jsonrpc: Fix memory leak in jsonrpc_session_send() when not connected.
Partial fix for bug #2373.
2010-01-12 14:28:00 -08:00
Justin Pettit
9c8149dca0 vswitchd: Fix issue of networking not working when Tools not installed
During the transition to the configuration database, not all code from
the bridge compatibility layer was updated.  In particular, the code
which removes port configuration based on RTNL notifications of port
removal was not updated.  This commit brings that code back.

Note that the code that removes ports based on actively checking whether
ports exist is still commented out pending a review of its impact on GRE
support.

Bug #2370
2010-01-12 11:02:25 -08:00
Justin Pettit
d35a4ea82f ovs-vsctl: Print correct fail-mode
When printing the fail-mode, ovs-vsctl would always attempt to print the
top-level one--even if it didn't exist.  So, in addition to sometimes
being wrong, it could cause segfaults.

Thanks to Peter Balland for reporting the error.

Bug #2374
2010-01-11 17:07:19 -08:00
Ben Pfaff
3603f8da20 reconnect: Fix repeated RECONNECT_CONNECT that was confusing JSON-RPC.
reconnect_run() returns RECONNECT_CONNECT to tell the client that it should
start a new connection.  The client is then supposed to call
reconnect_connecting() to tell the FSM that it has begun a connection
attempt.  However, even after reconnect_connecting() was called,
reconnect_run() continued to return RECONNECT_CONNECT on each call until
the connection succeeded or failed.  This confused the jsonrpc_session
client, which expected that it would get a 0 return value from
reconnect_run() while the connection attempt was in progress.  Connections
that required multiple trips through the main poll loop, e.g. for SSL
negotiation, would often get cut off to start a second connection attempt.

This commit change reconnect_run() to return RECONNECT_CONNECT only until
the client tells it that a connection is in progress, which fixes the
problem.  This change entails a change to the internal details of the
reconnect FSM, so this commit also updates the reconnect tests to match.

Reported by Jeremy Stribling.
2010-01-11 17:02:43 -08:00
Justin Pettit
f20bbd7ad2 debian: Fix tab/space issues 2010-01-11 16:11:09 -08:00
Justin Pettit
6b739e5403 debian: Create the config database if it doesn't exist on startup
On startup, create an empty config database if it doesn't already exist.  This
is the behavior of the XenServer init scripts.
2010-01-11 16:11:08 -08:00
Ben Pfaff
2c30e5d117 vswitch: Fix null pointer dereference in iface_is_internal().
Reported by Henrik Amren.
2010-01-11 15:22:11 -08:00
Ben Pfaff
c6782bb0f7 ovsdb-tool: Make show-log command offer more verbose output.
This may be useful for debugging.

With fixes suggested by Justin Pettit.
2010-01-11 13:47:35 -08:00
Ben Pfaff
c7239c2f29 ovsdb: Improve comments.
Suggested by Justin Pettit.
2010-01-11 13:30:15 -08:00
Ben Pfaff
c532bf9dd4 ovsdb: Save some space in the log for newly inserted records.
When a new record is inserted into a database, ovsdb logs the values of all
of the fields in the record.  However, often new records have many columns
that contain default values.  There is no need to log those values, so this
commit causes them to be omitted.

As a side effect, this also makes "ovsdb-tool show-log --more --more"
output easier to read, because record insertions print less noise.  (Adding
--more --more to this command makes it print changes to database records.
The --more option will be introduced in an upcoming commit.)
2010-01-11 13:14:54 -08:00
Ben Pfaff
80d326ad2a ovsdb: Add tests for OVSDB protocol over SSL. 2010-01-11 13:07:11 -08:00
Ben Pfaff
f3d00a23ad jsonrpc: Check RPC status after trying to send, not before.
This usually prevented JSON-RPC over SSL from working.

Reported-by: Jeremy Stribling <strib@nicira.com>
2010-01-11 13:06:42 -08:00
Ben Pfaff
03b1f24ebf ovsdb: Clarify spec for map mutation insert mutator.
Suggested by Jeremy Stribling.
2010-01-11 12:03:20 -08:00
Ben Pfaff
295ba862fc sflow: Improve documentation phrasing.
Suggested by Justin Pettit.
2010-01-11 11:13:49 -08:00
Ben Pfaff
1b5a4aa6b6 sflow: Document how the agent address is determined. 2010-01-11 11:11:40 -08:00
Ben Pfaff
40b3b2ff4e sflow: Fix byte order problem.
Reported by Justin Pettit.
2010-01-11 11:11:40 -08:00
Ben Pfaff
e53df2065c sflow: Improve user-visible string.
Suggested by Justin Pettit.
2010-01-11 11:11:40 -08:00
Ben Pfaff
46b47a4160 sflow: Improve comments.
Pointed out by Justin Pettit.
2010-01-11 11:11:35 -08:00
Ben Pfaff
a68813c3dc sflow: Avoid division by zero if sampling rate is 0.
Reported by Justin Pettit.
2010-01-11 11:09:14 -08:00
Ben Pfaff
b6dab09587 sflow: Fix ifDirection setting if duplex unknown.
Reported by Justin Pettit.
2010-01-11 11:08:29 -08:00
Ben Pfaff
fa49ca8008 sflow: Fix handling of struct ofproto_sflow_options members.
Reported by Justin Pettit.
2010-01-11 11:07:59 -08:00
Ben Pfaff
ed44ee7b68 datapath: Improve comments. 2010-01-11 11:06:56 -08:00
Ben Pfaff
39a501148a dpif: Remove stray new-line.
Suggested by Justin Pettit.
2010-01-11 11:06:36 -08:00
Ben Pfaff
50866f3f0d xenserver: Fix init script with multiple --remote options to ovsdb-server.
Reported-by: Peter Balland <peter@nicira.com>
2010-01-11 10:04:13 -08:00
Ben Pfaff
4e256b6bf0 datapath: Renumber ioctls to avoid gaps.
Suggested by Justin Pettit.
2010-01-08 16:46:03 -08:00
Ben Pfaff
b4a7a3f3de Improve comments on interpretation of sFlow sampling probabilities.
Suggested by Justin Pettit.
2010-01-08 16:45:16 -08:00
Ben Pfaff
67a78abeea datapath: Improve comments on struct dp_stats_percpu.
Suggested by Justin Pettit.
2010-01-08 16:45:14 -08:00
Ben Pfaff
d1ae82996d sflow: Write "sFlow" as "sFlow(R)" in documentation.
The sFlow license requires sFlow to be written as sFlow(R) for the first
reference in user documentation, so this commit implements that.

Suggested by Justin Pettit.
2010-01-08 16:45:02 -08:00
Ben Pfaff
216114e062 sflow: Set proper output port number for dropped packets.
Based on advice from Neil McKee.
2010-01-08 16:10:01 -08:00
Ben Pfaff
c1e98da15f sflow: Report port ifIndexes instead of datapath port numbers.
Reported-by: Neil McKee <neil.mckee@inmon.com>
2010-01-08 16:09:27 -08:00
Ben Pfaff
a1ae9a4316 jsonrpc: Properly implement connection timeout.
jsonrpc_session_connect() indirectly called reconnect_disconnected(), which
told the reconnect object that the connection had failed, before it told it
that the connection attempt had started.  When the connection didn't
complete immediately, this caused the connection to time out immediately,
without any backoff.

Reported by Jeremy Stribling.
2010-01-08 15:36:06 -08:00
Ben Pfaff
b57f675ce5 datapath: Add a find the kernel source directory for Debian 2.6.32+.
Debian's kernel-headers packages starting from 2.6.32 (or thereabouts) put
links to the kernel build and source directories at the same level, named
"build" and "source" respectively.  Add support for this structure.
2010-01-08 13:09:10 -08:00