Justin Pettit [Tue, 26 Jul 2011 21:43:06 +0000 (14:43 -0700)]
Update version to reflect this branch is for post-1.1.x development.
When development for a new long-term release is started, we haven't
typically updated the version string. This means that version numbers
used in binaries generated on this branch tend to lag behind "current"
stable releases. We considered using a "pre" string in the version
(eg, "1.2.0-pre1") but this causes some pain for RPMs. Instead, we
will now use "90" as the version's bug-fix number to indicate that this
will form a new release.
For example, the current stable series is "1.1.x" in the "branch-1.1"
branch, so the master branch will be labeled "1.1.90" in anticipation
that it will be the basis for the "1.2.x" series. Code in "branch-1.1"
will have the expected version numbers (ie, 1.1.0, 1.1.1, 1.1.2, etc)
and versions in-branch will lag slightly before an official release.
Suggested-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 26 Jul 2011 21:55:55 +0000 (14:55 -0700)]
debian: Fix bug from commit
211b05b5 "debian: Modernize use of dh_install."
Commit
211b05b5 "debian: Modernize use of dh_install" caused build failures
in clean environments because debian/ovsdbmonitor.install now installed
files that were never created in such an environment. It didn't cause a
build failure in my own testing because I still had old files around.
This fixes the problem.
It seems to be necessary to run "make install" once for each of binary-arch
and binary-indep, because dh_prep always deletes debian/tmp. It is
logically not necessary but I don't see a clean and robust way to avoid it.
Ben Pfaff [Mon, 18 Jul 2011 22:26:43 +0000 (15:26 -0700)]
nx-match: Make more fields writable with NXAST_REG_MOVE and other actions.
Until now, fields writable by actions defined in terms of NXM field
numbers were special cases, but commit
b3e9b2eda9a "ofproto: Optimize
datapath actions" had the side effect of making it easy to modify
additional fields. This commit takes advantage of that to make
modifiable all the fields that the kernel datapath supports modifying.
We could make other fields modifiable by adding more support to the kernel
datapath.
Ben Pfaff [Mon, 18 Jul 2011 20:51:12 +0000 (13:51 -0700)]
debian: Add support for bridge compatibility.
This adds support for bridge compatibility to the generic Open vSwitch
init scripts and to the Debian packaging.
See https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/808224.
Ben Pfaff [Fri, 8 Jul 2011 19:31:55 +0000 (12:31 -0700)]
ovs-vsctl: Log better warnings for duplicate ports and interfaces.
The database prevents multiple ports or interfaces with a single name, but
duplicates can still occur if, for example, two bridges' "ports" columns
both point to a single Port record. The existing warning just says in this
case that the database contains a duplicate port name. This prompts users
to dump the Port table to look for the duplicate. Of course there isn't
one, so then they ask me to point out the problem.
This commit improves the log message to point out the actual problem.
Ben Pfaff [Tue, 26 Jul 2011 16:22:45 +0000 (09:22 -0700)]
debian: Modernize use of dh_install.
Originally I intended this as just a cleanup, but as a side effect it also
installs some files from the install tree in debian/tmp instead of from
_debian. This should avoid a reported problem in which ovs-bugtool was
being created in the source directory instead of the build directory (I
still don't see why this happened).
Reported-by: Sébastien RICCIO <sr@swisscenter.com>
Tested-by: Sébastien RICCIO <sr@swisscenter.com>
Acked-by: Simon Horman <horms@verge.net.au>
CC: Simon Horman <horms@verge.net.au>
Ben Pfaff [Tue, 26 Jul 2011 16:23:31 +0000 (09:23 -0700)]
utilities: Install ovs-parse-leaks utility by default.
We install this in the Debian packaging and I don't see a reason not to
install it everywhere.
(Oddly, we were already installing the manpage everywhere.)
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 26 Jul 2011 16:13:17 +0000 (09:13 -0700)]
ovs-ctl: Drop back to an empty database if schema conversion fails.
If the "ovsdb-tool convert" call fails, it is likely because the database
has bad contents that this version of OVSDB does not understand. In that
case, we're better off using a fresh, empty database rather than failing
to come up at all.
Bug #6280.
Ben Pfaff [Thu, 7 Jul 2011 19:31:58 +0000 (12:31 -0700)]
ovs-ctl: Log messages about database upgrade process.
This should make problems easier to debug.
Bug #6280.
Ben Pfaff [Mon, 25 Jul 2011 23:15:18 +0000 (16:15 -0700)]
rhel: Fix use of $< in ordinary Make rules.
POSIX only allows $< in inference rules, so avoid it for these target
rules.
Also, add a header to the generated spec files to remind developers that
they are generated.
Ben Pfaff [Mon, 25 Jul 2011 16:30:41 +0000 (09:30 -0700)]
ovs-parse-leaks: Fix typos in manpage.
Ethan Jackson [Fri, 22 Jul 2011 19:00:46 +0000 (12:00 -0700)]
mac-learning: Simplify memory management.
The mac-learning implementation used a free list to keep track of
statically allocated table entries. This made the code slightly
more difficult to understand than the more straightforward heap
based strategy implemented by this patch.
Ethan Jackson [Fri, 22 Jul 2011 18:50:26 +0000 (11:50 -0700)]
mac-learning: Use random secret in hash function.
The mac-learning 'secret' parameter is intended to prevent an
attacker from turning the mac learning table into a linked list by
using a known hash function to choose perfectly bad mac entries.
However, this parameter was not taken into account in most cases.
Found by inspection.
Ethan Jackson [Wed, 20 Jul 2011 22:07:46 +0000 (15:07 -0700)]
bundle: New action "bundle_load".
The bundle_load action behaves the same as the bundle action,
except instead of outputting, it writes its result to a register.
Ethan Jackson [Mon, 18 Jul 2011 20:50:26 +0000 (13:50 -0700)]
bundle: Implement NX_BD_ALG_ACTIVE_BACKUP.
I don't expect this bundling algorithm to be particularly useful in
software switches. However, hardware switches will probably only
support this bundling algorithm, so it's implemented here as an
example and a reference.
Ethan Jackson [Tue, 19 Jul 2011 22:47:02 +0000 (15:47 -0700)]
nx-match: New helpers.
This patch creates two new helper functions, nxm_reg_load() and
nxm_dst_check(). The new nxm_dst_check() function may be used to
check the validity of destination fields used by actions. The new
nxm_reg_load() function may be used by actions which need to write
to NXM fields.
This patch also allows multipath and autopath to write their result
to non-register NXM fields.
Ben Pfaff [Fri, 22 Jul 2011 17:20:52 +0000 (10:20 -0700)]
util: New function log_2_floor().
Calculates the position of the most significant bit in a 32 bit
word.
Ethan Jackson [Thu, 21 Jul 2011 01:58:23 +0000 (18:58 -0700)]
bundle: Run bundle_check() in unit tests.
This has been helpful finding bugs in my development environment.
It's good to exercise this code.
Ethan Jackson [Wed, 20 Jul 2011 01:05:46 +0000 (18:05 -0700)]
utilities: Add ovs-bugtool to gitignore.
Ethan Jackson [Tue, 19 Jul 2011 21:33:29 +0000 (14:33 -0700)]
nx-match: Whitespace cleanup.
Ben Pfaff [Fri, 22 Jul 2011 22:05:35 +0000 (15:05 -0700)]
INTERNALS: Describe SLB bonding.
Ben Pfaff [Thu, 21 Jul 2011 22:39:08 +0000 (15:39 -0700)]
ofproto-dpif: Initialize 'may_enable' at port construction time.
Silences a valgrind warning:
==640== Conditional jump or move depends on uninitialised value(s)
==640== at 0x808E623: run (ofproto-dpif.c:1444)
==640== by 0x8086593: ofproto_run (ofproto.c:755)
==640== by 0x806EB80: bridge_run (bridge.c:1397)
==640== by 0x806F66C: main (ovs-vswitchd.c:90)
Ethan Jackson [Fri, 22 Jul 2011 00:41:58 +0000 (17:41 -0700)]
mac-learning: Convert to hmap.
The mac-learning code predates the hmap data structure in OVS. For
this reason, it rolled it's own hmap-like bucket concept. This
patch converts it to use an hmap which makes the code slightly
simpler and easier to understand.
Ethan Jackson [Fri, 22 Jul 2011 00:58:47 +0000 (17:58 -0700)]
mac-learning: Fix serious performance bug in the learning table.
Due to a typo, the mac-learning hash table had dissolved into a
linked list. This caused a significant reduction in performance.
Ben Pfaff [Thu, 21 Jul 2011 18:12:45 +0000 (11:12 -0700)]
ovs-ofctl: Use strchr() instead of strstr().
It's the right tool for the job. Potentially faster, too.
Ben Pfaff [Wed, 20 Jul 2011 21:31:54 +0000 (14:31 -0700)]
ovs-ofctl: Improve error message for "ovs-ofctl show nonexistent".
Suggested-by: Peter Balland <peter@nicira.com>
Ben Pfaff [Wed, 20 Jul 2011 17:41:16 +0000 (10:41 -0700)]
bridge: Log a warning when QoS misconfiguration is likely.
Queue 0 is documented as the "default queue" used when a packet is not
directed to any specific queue. Many qdiscs drop packets not directed to a
queue if the default queue is not configured. This is therefore likely to
be a misconfiguration, so warn about it.
Bug #5583.
Ben Pfaff [Wed, 20 Jul 2011 16:51:29 +0000 (09:51 -0700)]
bundle: Avoid GCC 4.5 warning about possibly uninitialized value.
This value is not actually uninitialized but GCC 4.5 cannot tell.
Ben Pfaff [Wed, 20 Jul 2011 16:50:37 +0000 (09:50 -0700)]
bundle: Treat slave_type properly as 32-bit value.
Found by sparse.
Ben Pfaff [Mon, 18 Jul 2011 22:13:01 +0000 (15:13 -0700)]
ofproto-dpif: Implement OFPAT_SET_NW_TOS.
This field was overlooked in commit
b3e9b2eda9a "ofproto: Optimize datapath
actions."
Found by inspection.
Ben Pfaff [Mon, 18 Jul 2011 22:17:57 +0000 (15:17 -0700)]
ofproto-dpif: Ignore ECN bits in OFPAT_SET_NW_TOS actions.
OpenFlow 1.0 doesn't say that the ECN bits in OFPAT_SET_NW_TOS actions must
be zero, but Open vSwitch ODP implementations do require that, so mask off
those bits before storing the nw_tos into the flow.
Ethan Jackson [Sat, 11 Jun 2011 00:45:45 +0000 (17:45 -0700)]
vswitch: Implement bundle action.
This patch creates a new action called "bundle". Bundles are a way
to implement a simple form of multipath in OpenFlow by grouping
several ports in a single output-like action.
Ethan Jackson [Thu, 14 Jul 2011 21:23:02 +0000 (14:23 -0700)]
ofputil: Export ofputil_check_output_port().
Future patches will use this function outside of the ofputil
module.
Ethan Jackson [Thu, 14 Jul 2011 01:17:36 +0000 (18:17 -0700)]
ofproto-dpif: Store bonding enabled flag on ofport.
This simplifies the implementation of future patches.
Ethan Jackson [Wed, 13 Jul 2011 23:20:24 +0000 (16:20 -0700)]
nicira-ext: Generalize nx_mp_fields into nx_hash_fields.
Future patches will use nx_hash_fields for non-multipath related
actions. This patch renames nx_mp_fields and creates a new
flow_hash_fields() function.
Ethan Jackson [Thu, 14 Jul 2011 20:53:34 +0000 (13:53 -0700)]
ofproto: Don't commit modifiers on OFPP_NONE outputs.
This provides a minor optimization.
Ben Pfaff [Mon, 18 Jul 2011 21:30:42 +0000 (14:30 -0700)]
ofproto-dpif: Do not mirror L2 multicast switch protocols to VLANs.
Mirroring certain protocols interpreted by switches to a VLAN can deceive
the switch that receives it. Drop such packets instead of mirroring them.
CC: David Tsai <dtsai@nicira.com>
NIC-401.
Ben Pfaff [Fri, 15 Jul 2011 21:55:29 +0000 (14:55 -0700)]
debian: Remove obsolete comment.
The comment is obsolete because the switch now starts by default, without
prior configuration.
Ben Pfaff [Fri, 15 Jul 2011 21:53:11 +0000 (14:53 -0700)]
ovs-lib: Allow "status" command to work as non-root.
Ben Pfaff [Fri, 15 Jul 2011 21:54:26 +0000 (14:54 -0700)]
ovs-ctl: Start ovs-vswitchd with correct niceness.
Ben Pfaff [Fri, 15 Jul 2011 18:25:14 +0000 (11:25 -0700)]
ovsdb: Log when remote connections are deconfigured.
Recently I helped debug a scenario where ovsdb-server connected to a remote
manager, then ovs-vsctl deleted the remote manager and soon after re-added
it. The log was difficult to interpret because it showed two successful
connection attempts to the same remote without showing a reason why the
connection was dropped in the first place. Adding this log message would
make it clear that the configuration changed to remove that remote
connection in the meantime.
Ben Pfaff [Fri, 15 Jul 2011 16:35:25 +0000 (09:35 -0700)]
PORTING: Document why OVS does not support hybrid ofproto+dpif providers.
CC: Sanjay Sane <ssane@nicira.com>
CC: Justin Pettit <jpettit@nicira.com>
CC: Hao Zheng <hzheng@nicira.com>
Ben Pfaff [Thu, 14 Jul 2011 17:14:28 +0000 (10:14 -0700)]
rhel: Add ovs-bugtool manpage to list of packaged files.
With this change, the RPM builds for me again on RHEL 6.
Bug #6413.
Ben Pfaff [Thu, 7 Jul 2011 20:19:31 +0000 (13:19 -0700)]
ovs-bugtool: Include conf.db backups in bugtool output.
When an upgrade or downgrade fails due to OVSDB issues, it is useful to
have the old versions of the database available.
Ben Pfaff [Wed, 6 Jul 2011 17:26:57 +0000 (10:26 -0700)]
ovs-bugtool: Add an OVSDB snapshot to ovs-bugtool output.
The ovs-bugtool output already includes a copy of the configuration
database file, but this file omits many instantaneous details. For
example, it does not include any information about controller connection
status or interface statistics. This commit adds a snapshot of the
database contents that does include these details.
Ben Pfaff [Wed, 6 Jul 2011 17:43:03 +0000 (10:43 -0700)]
ovs-bugtool: Add plugins previously used only under XenServer.
All of the xen-bugtool plugins that OVS has previously installed only under
XenServer are equally useful with Debian and other distributions, so
this commit installs and uses them everywhere.
Ben Pfaff [Wed, 13 Jul 2011 17:58:59 +0000 (10:58 -0700)]
configure: Improve error message when pkg-config is missing.
Until now, when pkg-config is missing, Autoconf emitted this error:
error: possibly undefined macro: PKG_CHECK_MODULES
This commit changes the message to:
error: Please install pkg-config.
This should be easier for users to interpret.
Suggested-by: Ethan Jackson <ethan@nicira.com>
Ethan Jackson [Tue, 12 Jul 2011 01:56:59 +0000 (18:56 -0700)]
tests: Fix deprecated use of qw.
This causes tests to fail on my system with the following error.
Use of qw(...) as parentheses is deprecated at
/home/root/ovs/tests/flowgen.pl line 35.
Ben Pfaff [Thu, 30 Jun 2011 21:55:28 +0000 (14:55 -0700)]
ovs-bugtool: Dump dpkg-related information as well as RPM-related info.
Ben Pfaff [Tue, 12 Jul 2011 16:38:12 +0000 (09:38 -0700)]
ovs-bugtool: Turn off "group" and "other" permissions for generated files.
ovs-bugtool's output is potentially sensitive, so it seems best not to
allow anyone but the owner to read it. This commit disables "group" and
"other" bits in the Unix ACL.
Ben Pfaff [Tue, 12 Jul 2011 16:37:08 +0000 (09:37 -0700)]
ovs-bugtool: Make available outside of Debian packages.
ovs-bugtool is no longer Debian-specific, so install it everywhere. (On
XenServer, specifically, we do not install it, because there xen-bugtool
already exists.)
Ben Pfaff [Thu, 30 Jun 2011 19:42:32 +0000 (12:42 -0700)]
ovs-bugtool: Restore RHEL support.
ovs-bugtool was originally xen-bugtool from Citrix XenServer. We modified
it for OVS by tailoring it to work better on Debian, updating file
locations and removing features that were specific to XenServer or that
work with packages not installed by default on Debian.
This commit reverts many of those changes. This commit:
- Adds back code that works with RHEL features not installed by default
on Debian (but not XenServer-specific features, since xen-bugtool works
nicely on XenServer).
- Switches from hard-coded paths for utilities to searching the
superuser's typical $PATH (because RHEL and Debian disagree on the
location for some utilities).
- In a few cases merges lists, e.g. now it looks for logs under the names
used in both Debian and RHEL.
- Fixes a few spurious differences between ovs-bugtool and xen-bugtool,
e.g. in white space.
Simon Horman [Tue, 12 Jul 2011 06:52:44 +0000 (15:52 +0900)]
datapath: An expanded table should be larger than its predecessor
This resolves what appears to be a think-o in tbl_expand()
* Old Logic: Always create tables with TBL_MIN_BUCKETS buckets
* New Logic: Create tables twice as big as their predecessor
When sending 10,000 flows through ovs-vswitchd:
* Old Logic: CPU bound in tbl_lookup(), significant packet loss
* New Logic: ~10% of one core used, negligible packet loss
Tested with an Intel E5520 @ 2.27GHz,
flows from an ethernet device to to a dummy interface with
no address configured.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Mon, 11 Jul 2011 20:57:58 +0000 (13:57 -0700)]
configure: Pass correct -target option to "cgcc" in the common case.
The "cgcc" script included with sparse guesses the target architecture
based on the host architecture instead of based on the GCC architecture.
This means that it often guesses wrong on biarch systems, e.g. my Linux
kernel is x86_64 but userspace is i686 and thus GCC targets i686 by
default.
This fixes the problem by passing an explicit "-target=i86" to cgcc if
GCC targets x86 or "-target=x86_64" if GCC targets x86_64.
Bug #6312.
Reported-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Fri, 8 Jul 2011 23:56:08 +0000 (16:56 -0700)]
INSTALL.bridge: Fix suggested ovs-brcompatd invocation.
ovs-brcompatd no longer accepts any non-option arguments. Also,
-vANY:console:EMER is unnecessary, because --detach now implies disabling
logging to the console.
Ben Pfaff [Sat, 9 Jul 2011 00:10:15 +0000 (17:10 -0700)]
ovsdb: Remove useless "return;" in ovsdb_jsonrpc_session_get_status().
Ben Pfaff [Fri, 8 Jul 2011 17:47:22 +0000 (10:47 -0700)]
packets: Remove unneeded !! from eth_addr_is_local().
There's no value in using !! on an operand of && or || as done here.
Ben Pfaff [Fri, 8 Jul 2011 16:11:55 +0000 (09:11 -0700)]
vconn-stream: Always call the stream's run function from vconn_stream_run().
The stream's run function ensures that data buffered in the stream itself
gets pushed to the network. Only the SSL stream class has such a run
function, which means that SSL stream data failed to be pushed to the
remote peer in a timely manner in some cases.
Many thanks to Alex Yip for narrowing this down.
Reported-by: Alex Yip <alex@nicira.com>
Tested-by: Alex Yip <alex@nicira.com>
Bug #6221.
Ben Pfaff [Thu, 7 Jul 2011 19:25:04 +0000 (12:25 -0700)]
ovsdb-tool: Put version number in comment when compacting or converting.
Adding the version number can make it clear what version of OVS screwed
something up as part of an upgrade or downgrade.
Ben Pfaff [Wed, 6 Jul 2011 21:22:42 +0000 (14:22 -0700)]
ovsdb: Fix segfault in ovsdb_file_txn_row_from_json().
If 'error' is nonnull then we destroy the row, so we must not try to reuse
the row immediately after that.
Support request #6155.
Repoted-by: Geoff White <gwhite@nicira.com>
Ben Pfaff [Wed, 6 Jul 2011 16:04:04 +0000 (09:04 -0700)]
ovs-ctl: Fix indentation of some headings.
Reported-by: Dan Wendlandt <dan@nicira.com>
Ben Pfaff [Fri, 1 Jul 2011 17:11:30 +0000 (10:11 -0700)]
python: Make invalid UTF-8 sequence messages consistent across Python versions.
Given the invalid input <C0 22>, some versions of Python report <C0> as the
invalid sequence and other versions report <C0 22> as the invalid sequence.
Similarly, given input <ED 80 7F>, some report <ED 80> and others report
<ED 80 7F> as the invalid sequence. This caused spurious test failures for
the test "no invalid UTF-8 sequences in strings - Python", so this commit
makes the messages consistent by dropping the extra trailing byte from the
message.
I first noticed the longer sequences <C0 22> and <ED 80 7F> on Ubuntu
10.04 with python version 2.6.5-0ubuntu1, but undoubtedly it exists
elsewhere also.
Ben Pfaff [Fri, 1 Jul 2011 21:50:01 +0000 (14:50 -0700)]
debian: Remove obsolete reference to var/log/core.
Commit
14c3b136 "debian: Remove corekeeper package" removed the
var/log/core directory from the Debian packaging, but I missed this part.
Justin Pettit [Fri, 1 Jul 2011 21:13:56 +0000 (14:13 -0700)]
ofproto: Rename "private.h" to "ofproto->provider.h".
To be more consistent with other providers, rename "private.h" to
"ofproto-provider.h".
Justin Pettit [Fri, 1 Jul 2011 21:07:16 +0000 (14:07 -0700)]
PORTING: Add some minor clarifications.
Justin Pettit [Fri, 1 Jul 2011 20:09:46 +0000 (13:09 -0700)]
ovs-ofctl: Document "in_port" action in man page.
Andrew Evans [Fri, 1 Jul 2011 01:08:59 +0000 (18:08 -0700)]
connmgr: Free controller info in the same module where it's allocated.
Make ofproto_free_ofproto_controller_info() just a passthrough to
connmgr_free_controller_info() so the allocation and freeing of memory in the
controller info structure is done in the same place.
Andrew Evans [Thu, 30 Jun 2011 22:15:46 +0000 (15:15 -0700)]
bridge: Update controller connection status correctly.
Updates to status-related columns in the Controller table can be lost if there
are multiple bridges with different sets of controllers. This commit fixes this
behavior by first accumulating status for all controllers on all bridges, then
making one pass over all rows in the Controller tables, updating the status of
each.
Bug #6185.
Reported-by: Michael Hu <mhu@nicira.com>
Ben Pfaff [Fri, 1 Jul 2011 17:13:35 +0000 (10:13 -0700)]
bridge: Fix null pointer dereference.
If the netdev_open() fails then iface->netdev will be NULL and
iface_refresh_stats() will cause a null pointer dereference in
netdev_get_stats().
Fixes a problem introduced by commit
1101a0b47 "bridge: Populate interface
status/statistics as soon as a port is added."
Reported-by: Aaron Rosen <arosen@clemson.edu>
Jesse Gross [Thu, 30 Jun 2011 19:49:11 +0000 (12:49 -0700)]
tunneling: Force selection of an IP ID with GRE.
By default we set the DF bit on tunneled packets because we want to
get path MTU discovery from the underlying network. In turn this
causes Linux to leave the IP ID as 0 because it believes that
fragmentation can never occur. However, with GRE fragmentation is
still possible because we may get a large packet to be encapsulated
and let the local IP stack do fragmentation. As long as packets are
kept in order fragments are not misassociated and everything works fine.
However, if there is reordering in the underlying network then packets
can become corrupted. This forces selection of an IP ID for GRE packets
to avoid misassociation.
Bug #6128
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 30 Jun 2011 17:05:52 +0000 (10:05 -0700)]
ofp-util: Centralize decoding of OpenFlow actions.
This significantly simplifies code in ofp-print and ofproto-dpif and is
likely to simplify any new ofproto implementations whose support for
actions differs from ofproto-dpif.
Ben Pfaff [Thu, 30 Jun 2011 17:04:09 +0000 (10:04 -0700)]
ofp-util: Simplify iteration through OpenFlow actions.
The existing actions_first() and actions_next() iterator functions are not
much like the other iteration constructs found throughout the Open vSwitch
tree. Also, they only work with actions that have already been validated,
so there are cases where they cannot be used.
This commit adds new macros for iterating through OpenFlow actions, one
for actions that have been validated and one for actions that have not, and
adapts the existing users. The following commit will further refine action
parsing and add more users.
Ben Pfaff [Fri, 24 Jun 2011 20:58:08 +0000 (13:58 -0700)]
ofp-util: Rename OFPUTIL_INVALID to OFPUTIL_MSG_INVALID.
An upcoming commit will introduce new OPFUTIL_* constants for actions. It
seems best to be able to visually distinguish the contants. Most of the
existing constants start with a good prefix, but OFPUTIL_INVALID does not,
so rename it.
Ben Pfaff [Fri, 24 Jun 2011 21:36:24 +0000 (14:36 -0700)]
classifier: Print ARP opcode as "arp_op" instead of "opcode".
"opcode" is not very specific. All the other ARP fields have an "arp_"
prefix, so this commit adds one for the opcode too.
Simon Horman [Thu, 30 Jun 2011 11:34:15 +0000 (20:34 +0900)]
ofproto: Simplify bucket finding in facet_max_idle()
The existing dual-loop setup is unnecessary
as the outer loop only skips to the first non-zero value
and then exits once the inner loop completes.
Zero values in the inner loop have no affect on its logic.
Signed-off-by: Simon Horman <horms@verge.net.au>
[pushed declaration of subtotal out to function scope]
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 30 Jun 2011 16:23:53 +0000 (09:23 -0700)]
ofproto: Fix typo in documentation.
Using .RS instead of .RE caused the rest of the manpage to be indented two
levels too deep.
Ben Pfaff [Wed, 29 Jun 2011 22:55:15 +0000 (15:55 -0700)]
xenserver: Restart HA daemon after force-reload-kmod.
Otherwise its heartbeats start failing after the reload and the XenServer
reboots after a minute or so.
Thanks to Justin Pettit for figuring out that this was HA-related.
Bug #5706.
Reported-by: Henrik Amren <henrik@nicira.com>
Ben Pfaff [Wed, 29 Jun 2011 22:53:45 +0000 (15:53 -0700)]
ovs-ctl: Fix ovs-dpctl invocation.
There's no $dpctl variable so this always failed.
Ethan Jackson [Wed, 29 Jun 2011 22:39:27 +0000 (15:39 -0700)]
bond: Drop packets on slaves disabled by LACP.
Theoretically, when LACP is configured, a bond shouldn't receive
any packets on disabled slaves. This patch enforces that
invariant.
Simon Horman [Wed, 29 Jun 2011 07:24:44 +0000 (16:24 +0900)]
datapath: Support Linux 3.0
This trivially supports linux 3.0 by incrementing the version check.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Ethan Jackson [Tue, 28 Jun 2011 21:57:00 +0000 (14:57 -0700)]
utilities: Update gitignore.
Ethan Jackson [Tue, 28 Jun 2011 20:22:18 +0000 (13:22 -0700)]
ofp-parse: Fix invalid memory use.
In some cases, parsing of the note action could cause a realloc
which would result in the use of memory which was no longer
allocated.
Andrew Evans [Tue, 28 Jun 2011 20:17:54 +0000 (13:17 -0700)]
bridge: Populate interface status/statistics as soon as a port is added.
Currently there's a lag of up to five seconds before the status and statistics
columns in the Interface table are populated when a port is first added to a
bridge. This may confuse systems that expect those columns to be populated
right away.
Bug #6145.
Ethan Jackson [Mon, 27 Jun 2011 20:18:19 +0000 (13:18 -0700)]
bond: Drop packets on backup slaves.
Currently, OVS accepts incoming traffic on all slaves participating
in a bond. In Linux active-backup bonding, all traffic which comes
in on backup slaves is dropped. This patch causes OVS to do the
same.
Bug #6125.
Jesse Gross [Fri, 24 Jun 2011 00:10:00 +0000 (17:10 -0700)]
datapath: Rename linux-2.6 and compat-2.6 directories.
The linux-2.6 and compat-2.6 directories apply equally to the upcoming
Linux 3.0 release, so this drops the 2.6 suffix and updates Makefiles.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 26 Jan 2011 00:50:44 +0000 (16:50 -0800)]
ovsdb: Synchronize comments and code in ovsdb_file_commit().
The comments and the code didn't match, so make them agree.
Simon Horman [Thu, 23 Jun 2011 19:50:09 +0000 (12:50 -0700)]
Debian: set source format to 3.0 (quilt)
This is my preferred package format as it allows changes
to be added as patches when the Debian package needs to
be updated between upstream releases.
I have been making this change in the Debian packages
so it seems as well to include it upstream.
[Update to debian/automake.mk by Ben Pfaff.]
Jesse Gross [Thu, 23 Jun 2011 19:54:48 +0000 (12:54 -0700)]
datapath: Add missing header.
The internal dev vport really needs hardirq.h but doesn't depend
directly on it and has relied on it being included from other sources.
Recent kernels broke this, so explicitly add the header.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 22 Jun 2011 17:37:18 +0000 (10:37 -0700)]
ovs-ofctl: Accept only valid flow_mod and flow_stats_request fields.
OpenFlow commands have several idiosyncratic fields that are used in some
cases and ignored in others. Until now, ovs-ofctl has been lax about
allowing some of them in places where they are ignored. This commit
tightens the checks to exactly what is allowed.
Bug #5979.
Reported-by: Reid Price <reid@nicira.com>
Ben Pfaff [Thu, 23 Jun 2011 16:59:49 +0000 (09:59 -0700)]
ovs-ctl: Use iptables -n -L instead of -S for compatibility.
The -S command isn't present in old versions of iptables, including the
version installed on Citrix XenServer. We have to use -n -L instead.
Bug #6071.
Ben Pfaff [Thu, 23 Jun 2011 16:46:50 +0000 (09:46 -0700)]
ovs-ctl: Fix incorrect error message.
The sense of the test was wrong.
Bug #6071.
Ethan Jackson [Wed, 22 Jun 2011 20:42:52 +0000 (13:42 -0700)]
xenserver: Update all external_ids in tap interfaces.
Commit 400430 "xenserver: Give tap devices iface-ids." copies the
iface-id from vifs to their related tap device. It turns out this
is not sufficient, so this commit copies all relevant external_ids
over.
Requested-by: Pankaj Thakkar <thakkar@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Bug #5954.
Ben Pfaff [Wed, 22 Jun 2011 22:09:50 +0000 (15:09 -0700)]
configure: Fix typo in user message.
Ben Pfaff [Wed, 22 Jun 2011 22:09:35 +0000 (15:09 -0700)]
configure: Fix --with-linux when environment contains KSRC.
When "configure"'s environment contains KSRC, "configure" would use it in
preference to the value specified on --with-linux. This caused a problem
for module-assistant builds in particular.
Ben Pfaff [Wed, 22 Jun 2011 17:15:23 +0000 (10:15 -0700)]
configure: Do not reject Linux 3.0 at configure time.
Until now, the configure script has rejected any version of Linux other
than 2.6. In preparation for Linux 3.0, this allows newer versions also.
Ben Pfaff [Wed, 22 Jun 2011 18:07:33 +0000 (11:07 -0700)]
configure: Change --with-l26 to --with-linux.
Linux 3.0 will be out soon, so it seems like a good idea to reflect that
in our "configure" script options.
Ben Pfaff [Wed, 22 Jun 2011 16:26:31 +0000 (09:26 -0700)]
configure: Remove "26" from Linux variable names.
OVS used to support Linux 2.4 and Linux 2.6, but now it only supports
Linux 2.6. Linux 3.0 is coming up, and it's just an evolution of 2.6, so
OVS should stop referring to it as "2.6".
This takes a first step by removing "26" from internal variable names.
There should be no user-visible changes.
Ben Pfaff [Wed, 22 Jun 2011 17:16:15 +0000 (10:16 -0700)]
configure: Fix typo in variable name.
Ben Pfaff [Wed, 22 Jun 2011 16:57:31 +0000 (09:57 -0700)]
debian: Avoid implying that Linux 2.6.9 is supported.
Ben Pfaff [Wed, 22 Jun 2011 20:50:18 +0000 (13:50 -0700)]
ovsdb: Fix memory leak in transaction.