Jesse Gross [Fri, 25 May 2012 18:16:54 +0000 (11:16 -0700)]
datapath: Backport net_warn_ratelimited() and friends.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Eric Dumazet [Fri, 25 May 2012 18:07:35 +0000 (11:07 -0700)]
datapath: cleanup unsigned to unsigned int
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jesse Gross <jesse@nicira.com>
David Howells [Fri, 25 May 2012 18:05:32 +0000 (11:05 -0700)]
datapath: Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:
perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Tue, 15 May 2012 19:50:57 +0000 (12:50 -0700)]
odp-util: Update ODPUTIL_FLOW_KEY_BYTES for current kernel flow format.
Before we submitted the kernel module upstream, we updated the flow format
by adding two fields to the description of packets with VLAN headers, but
we forgot to update ODPUTIL_FLOW_KEY_BYTES to reflect these changes. The
result was that a maximum-length flow did not fit in the given space.
This fixes a crash processing IPv6 neighbor discovery packets with VLAN
headers received in a tunnel configured with key=flow or in_key=flow.
This updates some comments to better describe the implications of
ODPUTIL_FLOW_KEY_BYTES (suggested by Justin).
This also updates test-odp.c so that it would have caught this problem, and
updates odp.at to demonstrate that a full 156 bytes are necessary. (To see
that, revert the change to ODPUTIL_FLOW_KEY_BYTES and run the test.)
Reported-by: Dan Wendlandt <dan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 24 May 2012 21:17:55 +0000 (14:17 -0700)]
NEWS: Fix up version for "mod-port" item.
I originally posted this before the 1.7 branch but it didn't get committed
until afterward, so it needs to be in the "post-1.7.0" group.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 24 May 2012 21:01:02 +0000 (14:01 -0700)]
ovs-ofctl: Support all OFPPC_* flags in "mod-port" command.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Tue, 22 May 2012 23:43:52 +0000 (16:43 -0700)]
memory: Memory leak when generating reports.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Simon Horman [Thu, 24 May 2012 08:15:04 +0000 (17:15 +0900)]
ovs-dpctl: Don't include include/openvswitch/tunnel.h
The inclusion include/openvswitch/tunnel.h does not seem to be needed any
more.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Thu, 24 May 2012 00:25:41 +0000 (17:25 -0700)]
datapath: Avoid system freeze due to ovs-flow-rehash softlockup.
OVS datapath does periodic flow table rehash which takes genl_lock
in workq context.
In some cases, like ports add or delete, genl_lock can cause softlockup
as vswitchd would take and succeed with genl_lock and rehash workq
would block on the lock. Eventually rehash will proceed, flow rehash
is low priority task so this is not problem for rehashing.
But it is blocking workq thread; some other workq item from other
kernel subsystem would be blocked and can cause system freeze.
To avoid workq blocking and system freeze, we can use OVS compat workq.
It runs in separate kernel thread thus does not block any non-ovs
deferred workq work item.
We will fix it by making genetlink lockless and having fine granular
locking in OVS.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Tue, 22 May 2012 18:39:25 +0000 (11:39 -0700)]
ofproto-dpif-governor: Fix bug in log message.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 8 May 2012 22:44:21 +0000 (15:44 -0700)]
Add support for tracking and logging daemon memory usage.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 22 May 2012 17:32:02 +0000 (10:32 -0700)]
simap: New data structure for string-to-integer maps.
This commit adapts a couple of existing pieces of code to use the
new data structure. The following commit will add another user
(which is also the first use of the simap_increas() function).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 1 May 2012 21:27:06 +0000 (14:27 -0700)]
Properly reopen python daemon log files after rotation.
The OVS Python daemons weren't reopening their log files after rotation, so
all the log information after the second rotation was lost.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 1 May 2012 21:03:52 +0000 (14:03 -0700)]
vlog: Take advantage of relaxed "-v" syntax through the tree.
The vlog manpage implies that writing ANY explicitly is obsolete, but
examples elsewhere in the documentation and code still tend to add it.
This removes them.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 21:00:33 +0000 (14:00 -0700)]
python: Implement "vlog/set", "vlog/list" unixctl commands in Python vlog.
This doesn't implement control over log patterns, though.
The change to vlog.man in this commit doesn't have any practical effect
because OVS doesn't come with any Python daemons that have their own
manpages.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 1 May 2012 21:13:00 +0000 (14:13 -0700)]
python: Implement "vlog/reopen" unixctl command in Python vlog.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 18:26:36 +0000 (11:26 -0700)]
python: Break unixctl implementation into registry, client, and server.
I wish to add some unixctl commands to the Python vlog module. However,
importing ovs.unixctl in ovs.vlog creates a circular dependency, because
ovs.unixctl imports ovs.vlog already. The solution, in this commit, is to
break the unixctl module into three parts: a register (ovs.unixctl) that
does not depend on ovs.vlog, and client (ovs.unixctl.client) and server
(ovs.unixctl.server) modules that do. This breaks the circular dependency.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 23:49:59 +0000 (16:49 -0700)]
tests: Fix Emacs syntax highlighting in vlog.at.
[^"] confuses the Emacs syntax highlighter for Autotest mode. It thinks
that it terminates a quoted string and therefore everything following the
next " in the file is highlighted as if it was part of a quoted string.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 22 May 2012 17:17:00 +0000 (10:17 -0700)]
Use PYTHONDONTWRITEBYTECODE=yes for invoking Python for build or test.
An upcoming commit will break the ovs.vlog module into an ovs.vlog package
with submodules. This commit makes switching between trees with the old
structure and those with the new structure much easier.
This commit works by setting PYTHONDONTWRITEBYTECODE=yes in Python
invocations from the build system and testing. This keeps Python 2.6+ from
creating .pyc and .pyo files. Creating .py[co] works OK for any given
version of Open vSwitch, but it causes trouble if you switch from a version
with foo/__init__.py into an (older) version with plain foo.py, since
foo/__init__.pyc will cause Python to ignore foo.py.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 22 May 2012 17:12:49 +0000 (10:12 -0700)]
Fix typo in "PYTHONPATH".
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Mon, 21 May 2012 20:20:18 +0000 (13:20 -0700)]
bridge: Ignore "null" interfaces as required.
Commit
bae7208e91a0 (bridge: Refactor bridge_reconfigure().)
introduced a regression in which the switch would attempt to
instantiate "null" interfaces in the datapath. This would, of
course, fail and trigger a warning. Though harmless, these
warnings confused users.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Pravin B Shelar [Mon, 21 May 2012 19:18:50 +0000 (12:18 -0700)]
datapath: Fix Tunnel options TOS
Use DSCP bits from ToS set on tunnel.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #8822
Pravin B Shelar [Mon, 21 May 2012 19:18:19 +0000 (12:18 -0700)]
tunnel: Accept 'set options:tos' as hex value.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Bug #8822
Ethan Jackson [Wed, 16 May 2012 15:22:17 +0000 (08:22 -0700)]
ofp-util: Fix stale comment.
'flow_mod_table_id' is no longer an argument to
ofputil_encode_flow_mod(), its information is now encoded in the
'protocol' argument.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Ethan Jackson [Wed, 16 May 2012 15:24:26 +0000 (08:24 -0700)]
gitignore: Add ovs-check-dead-ifs.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Jesse Gross [Thu, 17 May 2012 18:43:15 +0000 (11:43 -0700)]
datapath: Reset upper layer protocol info on internal devices.
It's possible that packets that are sent on internal devices (from
the OVS perspective) have already traversed the local IP stack.
After they go through the internal device, they will again travel
through the IP stack which may get confused by the presence of
existing information in the skb. The problem can be observed
when switching between namespaces. This clears out that information
to avoid problems but deliberately leaves other metadata alone.
This is to provide maximum flexibility in chaining together OVS
and other Linux components.
Bug #10995
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 16 May 2012 19:43:21 +0000 (12:43 -0700)]
PORTING: Add hint to adjust the default fail-mode, for hardware ports.
Suggested-by: Rob Sherwood <rob.sherwood@bigswitch.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 10 May 2012 22:53:19 +0000 (15:53 -0700)]
vswitch.xml: Describe current default fail_mode.
We are thinking about changing the default, so this leaves that open
for the future.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Arun Sharma [Wed, 16 May 2012 18:39:55 +0000 (11:39 -0700)]
ovs-vsctl: Add "--all" option for "destroy" command in ovs-vsctl.
Adds the ability to delete all records from table. This will help
users to destroy all records from Qos or Queue table using single
command rather then current method.
Feature #11306
Suggested-by: Kevin Mancuso <kevin.mancuso@rackspace.com>
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Giuseppe Lettieri [Wed, 9 May 2012 10:17:15 +0000 (12:17 +0200)]
dpif-netdev: allow for proper destruction of netdev datapaths
Until now, bridges with datapath_type=netdev did not destroy the datapath
when deleted. In particular, the tap device implementing the internal
interface was not close()d, and therefore the tap persists until
ovs-vswitchd exit()s.
This behaviour was caused by the missing callback for 'enumerate' in the
dpif-netdev class. Without this callback 'bridge_reconfigure' failed to
realize that there are datapaths with no bridge, and thus cannot destroy
them. Providing an 'enumerate' callback fixes this.
Signed-off-by: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 21:21:18 +0000 (14:21 -0700)]
daemon: Add comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 10 May 2012 17:11:08 +0000 (10:11 -0700)]
vswitch.xml: Suggest secure fail-mode to avoid loops with multiple uplinks.
EXT-186.
Reported-by: Rob Sherwood <rob.sherwood@bigswitch.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 20:31:07 +0000 (13:31 -0700)]
Makefile.am: Remove -export-dynamic.
This got added as part of the "initial import" commit from March 2008. I
don't see any value in it.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 8 May 2012 23:54:21 +0000 (16:54 -0700)]
fatal-signal: Log when terminating due to a fatal signal.
This makes it easier to diagnose why and when a daemon exited.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 2 May 2012 21:51:51 +0000 (14:51 -0700)]
ofp-util: Match on NXAST_CONTROLLER as an output to OFPP_CONTROLLER.
Found by inspection.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 18:15:34 +0000 (11:15 -0700)]
docs: Fix bad troff markup.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 18:13:39 +0000 (11:13 -0700)]
ovs-vswitchd: Document some limits.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 14 May 2012 18:13:27 +0000 (11:13 -0700)]
ovs-dpctl: Remove obsolete documentation of limit on number of datapaths.
Reported-by: Vjekoslav Brajkovic <balkan@cs.washington.edu>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sun, 13 May 2012 23:33:01 +0000 (16:33 -0700)]
ofp-parse: Mark ofp_fatal() as never returning.
This makes clang less confused.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sun, 13 May 2012 23:41:05 +0000 (16:41 -0700)]
ovs-ofctl: Avoid impossible check for !osm in fetch_port_by_stats().
At the time of the call to ofpbuf_at(), we know that the ofp_stats_msg is
present because ofputil_decode_msg_type() reported that it was. Therefore,
we can use ofpbuf_at_assert() and don't have to check for a null pointer.
Found by clang.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sun, 13 May 2012 23:34:49 +0000 (16:34 -0700)]
Avoid writes to variables that are never read back.
Found by clang.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sun, 13 May 2012 23:33:49 +0000 (16:33 -0700)]
Avoid assigning the same value to a variable back-to-back.
Found by clang.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sun, 13 May 2012 23:56:01 +0000 (16:56 -0700)]
ofproto: Remove write-only variable.
Found by clang.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sun, 13 May 2012 23:31:15 +0000 (16:31 -0700)]
cfm: Avoid null pointer dereference in cfm_process_heartbeat().
Found by clang.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 14 May 2012 04:59:58 +0000 (13:59 +0900)]
Remove forward declaration of vsp_vlandev_to_realdev()
There is no need to for a forward declaration of vsp_vlandev_to_realdev()
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Fri, 11 May 2012 21:49:02 +0000 (14:49 -0700)]
ovs-bugtool: Close file descriptors after use.
In ovs-bugtool, we do a bunch of Popen calls to
get the results of some shell commands with stdout
set to PIPE. Once we are done, we need to
close the file descriptors.
Bug #11083.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Ben Pfaff [Wed, 9 May 2012 19:22:18 +0000 (12:22 -0700)]
odp-util: Add tests for parsing and formatting ODP actions.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 9 May 2012 19:15:11 +0000 (12:15 -0700)]
dynamic-string: New function ds_get_test_line().
This eliminates some code duplication. An upcoming commit will add
another user.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 9 May 2012 19:21:54 +0000 (12:21 -0700)]
odp-util: Fix parsing of actions encapsulated within "sample" actions.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Thu, 10 May 2012 18:24:36 +0000 (11:24 -0700)]
ofputil: Accept OFPP_NONE as a valid output port.
Ofproto-dpif treats an output to OFPP_NONE as a NOOP, but ofputil
treated it as an error. The former behavior seems more natural.
Reported-by: Teemu Koponen <koponen@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Simon Horman [Thu, 10 May 2012 00:12:02 +0000 (09:12 +0900)]
ofproto-dpif: Make parameters const.
The ofproto parameters to lookup_input_bundle(), get_ofp_port() and
get_odp_port() may be const.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 10 May 2012 16:37:11 +0000 (09:37 -0700)]
Fix "make distcheck" failure since we weren't cleaning up a generated file.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Arun Sharma [Wed, 9 May 2012 23:34:21 +0000 (16:34 -0700)]
bugtool: rename label names in plugins related to ovs-appctl
It improves to have proper out file name in bugtool archive with respect
to ovs-appctl commands. E.g. if command is 'ovs-appctl lacp/show' then
the related out file will be 'ovs-appctl-lacp-show.out'
Feature #11283.
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Arun Sharma [Wed, 9 May 2012 06:47:30 +0000 (23:47 -0700)]
bugtool: Collect bond state information from ovs.
This is an enhancement in bugtool archive output to determine the bond
state information. It is implemented as a plugin which internally calls
"ovs-appctl bond/show" command to get bond state.
Feature #11283.
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sat, 5 May 2012 18:07:42 +0000 (11:07 -0700)]
ofproto-dpif: Segregate CFM, LACP, and STP traffic into separate queues.
Until now, packets for these special protocols have been mixed with general
traffic in the kernel-to-userspace queues. This means that a big-enough
storm of new flows in these queues can cause packets for these special
protocols to be dropped at this interface, fooling userspace into believing
that, say, no CFM packets have been received even though they are arriving
at the expected rate.
This commit moves special protocols to a dedicated kernel-to-userspace
queue to avoid the problem.
Bug #7550.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 May 2012 21:52:36 +0000 (14:52 -0700)]
ofproto-dpif: Introduce "slow path" datapath flows.
Most exact-match flows can be handled directly in the datapath, but
for various reasons, some cannot: every packet in these flows must
be sent separately to userspace. Until now, flows that cannot be
handled entirely in the kernel have been allowed to miss each time
in the datapath. This is generally OK, but it has a few
disadvantages:
* It can make troubleshooting at the level where one must look
at datapath flows a bit confusing in some cases, because
datapath misses due to genuinely new flows are mixed in with
datapath misses for known flows that cannot be set up.
* It means that the kernel-to-userspace packets for a given
input port always go to a single kernel-to-userspace queue,
even if we'd like to segregate out some of the packets for
known flows. (An upcoming commit has examples.)
This commit therefore introduces the concept of a "slow path" flow,
one that is installed in the datapath with a single action that
sends the flow's packets to userspace. To make troubleshooting
easier, the action includes a reason code (displayed by "ovs-dpctl
dump-flows") that explains why the flow has been slow-pathed.
Bug #7550.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sat, 5 May 2012 17:55:30 +0000 (10:55 -0700)]
ofproto-dpif: Introduce "internal flows" for handling flow table misses.
The ofproto-dpif implementation of "facet"s requires a facet to be
associated with an OpenFlow rule. Until now, this meant that packets
that miss in the OpenFlow table (and thus didn't have OpenFlow rules)
couldn't be set up as facets and thus couldn't be installed in the
kernel. This commit changes that, by introducing "internal" OpenFlow
rules to associate with such packets.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Sat, 5 May 2012 00:05:08 +0000 (17:05 -0700)]
ofproto-dpif: Move code closer to left margin in facet_check_consistency().
This makes an upcoming commit break up fewer lines.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 May 2012 23:56:03 +0000 (16:56 -0700)]
ofproto-dpif: Factor parts of update_stats() out into separate functions.
This makes the code more readable in an upcoming commit.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 May 2012 21:56:40 +0000 (14:56 -0700)]
odp-util: Change user_action_cookie from struct to union.
An upcoming commit will introduce a new type and a new use for the
additional members. It seems cleanest to use a union, rather that using
the existing members multiple ways.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 9 May 2012 16:36:08 +0000 (09:36 -0700)]
ofproto-dpif: Clean up and centralize sFlow logic.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 2 May 2012 21:23:28 +0000 (14:23 -0700)]
odp-util: Use switch for checking values of an enum.
The compiler warns when we forget to handle some value of an enum, whereas
it won't for a sequence of 'if' statements.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 2 May 2012 21:22:17 +0000 (14:22 -0700)]
odp-util: Fix typo in comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 3 May 2012 22:32:52 +0000 (15:32 -0700)]
ofproto-dpif: Minor style fix.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 May 2012 21:52:17 +0000 (14:52 -0700)]
ofproto: Don't limit flows in OpenFlow tables by default.
This bug is ordinarily not exposed because bridge_configure_tables() in
bridge.c configures the max number of flows soon after an ofproto is
created. But an upcoming commit will make construct() in ofproto-dpif.c
try to create some built-in flows before bridge gets control, so we need
to allow creating flows immediately upon initialization.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Brian Kruger [Wed, 9 May 2012 16:13:42 +0000 (09:13 -0700)]
rhel: Add timeouts to network scripts.
If the daemon(s) aren't running for whatever reason, the RHEL ovs
ifup/ifdown scripts don't take that into account and an attempt to reboot a
system could take forever. (literally. endless loop!) Here are a couple of
patches (one of ifup, one for ifdown) to add timeouts (10 seconds), because
it runs per interface you have configured and that could take awhile to
reboot a system if needed.
Signed-off-by: Brian Kruger <bkruger+ovsdev@gmail.com>
[blp@nicira.com fixed up a conflict against master]
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Wed, 9 May 2012 16:55:53 +0000 (09:55 -0700)]
debian: Remove --no-wait option from the ifupdown script.
Using the --no-wait option in the ifupdown script creates a
race condition where-in the network devices may not yet be created
after ovs-vsctl returns successfully.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Justin Pettit [Tue, 8 May 2012 18:11:33 +0000 (11:11 -0700)]
Prepare for post-1.7.0 (1.7.90).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Mon, 7 May 2012 19:09:02 +0000 (12:09 -0700)]
Prepare for 1.7.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Mon, 7 May 2012 17:33:34 +0000 (10:33 -0700)]
ovs-ofctl: Use port description stat to look up ports when necessary.
Not all ports may fit in a Features Reply, so if that's the case, then
use the new port description stat message for looking up ports.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Sat, 5 May 2012 00:27:16 +0000 (17:27 -0700)]
ovs-ofctl: Support large number of ports with "show" command.
OpenFlow Features Reply messages prior to 1.3 can give users the wrong
impression about how many ports are on the system. With this commit,
the command will check if the number of ports may be truncated. If so,
it will send a Port Description stats request to get the complete list
and ignore the Features Reply port list.
Bug #11087
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Tue, 8 May 2012 07:01:11 +0000 (00:01 -0700)]
ofp-util: Factor out determining physical port size.
There are a few places where we determine the size of a physical port
structure based on the OpenFlow version. Use a helper function to do
that.
Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Sat, 5 May 2012 00:19:26 +0000 (17:19 -0700)]
ofp-util: Add ofputil_switch_features_ports_trunc function.
Add function to determine whether the max number of ports are contains
in a Features Reply. If so, it removes the port list, since it may be
incomplete. This function will be used in a later commit.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Fri, 4 May 2012 21:42:04 +0000 (14:42 -0700)]
ofproto: Add support for OF1.3 port description multipart message.
OpenFlow 1.0 is limited to displaying 1364 ports in the Features Reply
message, and there is no other way to get consolidated port information.
OpenFlow 1.3 adds a new port description multipart message
(OFPMP_PORT_DESC) that is not limited by size. This commit adds support
through the OpenFlow 1.0 stats mechanism, since they have complimentary
enum values.
Bug #11040
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Wed, 2 May 2012 23:35:49 +0000 (16:35 -0700)]
OpenFlow: Move stats message enums into "common".
We will be adding some OpenFlow 1.3 stats (aka multipart request)
messages to our OpenFlow 1.0 implementation. As such, move the
definition of those message numbers to the common location.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Pravin B Shelar [Tue, 8 May 2012 00:04:57 +0000 (17:04 -0700)]
datapath: Validation of IPv6 set port action uses IPv4 header
When the kernel validates set TCP/UDP port actions, it looks at
the ports in the existing flow to make sure that the L4 header exists.
However, these actions always use the IPv4 version of the struct.
Following patch fixes this by checking for flow ip protocol first.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #11205
Ben Pfaff [Mon, 7 May 2012 19:30:54 +0000 (12:30 -0700)]
ofp-util: Treat a packet-out in_port of OFPP_CONTROLLER as OFPP_NONE.
Some OpenFlow 1.0 controllers incorrectly use OPFP_CONTROLLER as the
in_port in packet-out messages, when OFPP_NONE is their intent. Until now,
Open vSwitch has rejected such requests with an error message. This commit
makes Open vSwitch instead treat OFPP_CONTROLLER the same as OFPP_NONE for
compatibility with those controllers.
(Also, as of this writing, OpenFlow 1.0.1 appears to be changing the port
to use from OFPP_NONE to OFPP_CONTROLLER.)
Suggested-by: Rob Sherwood <rob.sherwood@bigswitch.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 May 2012 17:05:44 +0000 (10:05 -0700)]
ofproto-dpif: Accept OpenFlow-like flows in "ofproto/trace".
Until now it has not been possible to directly trace flows that include
register values and other concepts that are not in datapath flows, because
"ofproto/trace" requires a flow in the format output by "ovs-dpctl
dump-flows", which doesn't know anything about registers. This commit
makes it possible to instead specify an OpenFlow-like flow.
Feature #10084.
Requested-by: Igor Ganichev <iganichev@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 May 2012 16:52:37 +0000 (09:52 -0700)]
ofp-parse: New function parse_ofp_exact_flow().
This function parses a flow rather than a cls_rule. It will be useful
for "ofproto/trace", which currently requires an odp_flow and thus can't
accept values for registers and other concepts that don't exist in the
kernel.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 27 Apr 2012 16:41:02 +0000 (09:41 -0700)]
ofp-util: Avoid ovs_fatal() in ofputil_parse_key_value().
ofputil_parse_key_value() is safe to use from a process that must not abort
except in one case: where the argument contains unbalanced parentheses.
This commit eliminates that call to ovs_fatal(), instead just treating the
end of the string as closing all nested parentheses.
It would be better to propagate the error condition upward, but I'm not
sure that it's worth it just for this one corner case.
The purpose of this commit is to make it possible to use this function
indirectly within the "ofproto/trace" implementation, which must never
abort ovs-vswitchd. (All the current callers are within ovs-ofctl and
other utilities.)
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 27 Apr 2012 15:47:59 +0000 (08:47 -0700)]
ofproto-dpif: Factor out VLAN splinter flow adjustment into new function.
An upcoming commit will add a new user.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 7 May 2012 16:34:12 +0000 (09:34 -0700)]
debian: Synchronize debian/changelog with downstream Debian changelog.
Reported-by: Greg Dahlman <gdahlman@hotmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Fri, 4 May 2012 02:23:16 +0000 (19:23 -0700)]
debian: Add network integration scripts.
Add scripts that will allow Open vSwitch bridges and ports to be
configured through /etc/network/interfaces. This patch follows a
very similar style as OVS network integration for rhel.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Ansis Atteka [Thu, 3 May 2012 20:48:40 +0000 (13:48 -0700)]
datapath: Release rtnl_lock if ovs_vport_cmd_build_info() failed
This patch fixes a possible lock-up bug where rtnl_lock might not
get released.
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Raju Subramanian [Wed, 2 May 2012 22:21:36 +0000 (15:21 -0700)]
Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.
Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Wed, 2 May 2012 17:20:07 +0000 (10:20 -0700)]
ofproto: Rate-limit STP status errors on non-existent ports.
As part of the bridge's main loop, it queries the STP status of all
ports. If the port doesn't exist, log files can become filled with
warning messages. This situation is very unusual, since system devices
do not normally disappear, but it's easy enough to rate-limit these
messages.
Bug #10936
Reported-by: Reid Price <reid@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Tue, 1 May 2012 23:24:09 +0000 (16:24 -0700)]
DESIGN: Document uses for flow cookies.
The paragraph near the end that starts out "However, unlike OpenFlow 1.1,
..." seems to correctly document OVS behavior, but it also seems like
pretty lousy behavior. Justin says that he's going to fix it before we
put out an OVS release version with this behavior.
CC: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 1 May 2012 22:36:44 +0000 (15:36 -0700)]
ovs-ctl: Make "force-reload-kmod" warn when DHCP clients must be restarted.
This should make it more obvious when the admin needs to restart a DHCP
client (or other daemon). Without this, unless the admin carefully reads
the documentation, the first notice he gets about a need to restart the
DHCP client can easily be when the lease expires and the machine drops off
the network.
Bug #5391.
Tested-by: Gurucharan Shetty <gshetty@nicira.com>
Suggested-by: Duffie Cooley <dcooley@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 27 Apr 2012 20:32:33 +0000 (13:32 -0700)]
tests: Fix typo in comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 1 May 2012 22:28:08 +0000 (15:28 -0700)]
ovs-ofctl: Document padding in "note" actions.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 26 Apr 2012 22:54:54 +0000 (15:54 -0700)]
ofp-print: Add some more white space to flow dumps.
Before idle_age and hard_age were added, in the absence of timeouts there
was a space between the statistics for a flow and the start of the flow
match. This restores that space.
Requested-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 18:32:13 +0000 (11:32 -0700)]
ovs-ofctl: Document importance of priorities.
Multiple users have asked me about this.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 18:24:59 +0000 (11:24 -0700)]
vswitch.xml: Document more details of CFM intervals.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 18:24:31 +0000 (11:24 -0700)]
ovs-appctl: Point to individual daemon manpages in docs.
Sometimes users seem surprised that appctl commands are documented.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 18:23:38 +0000 (11:23 -0700)]
netdev: Document use for get_etheraddr member of struct netdev_class.
This has confused developers adding hardware support, e.g.:
http://openvswitch.org/pipermail/dev/2012-April/016350.html
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 20:56:49 +0000 (13:56 -0700)]
connmgr: Log when controllers are added and removed.
Otherwise occasionally during debugging it can hard to figure out why a
controller connection seemed to drop for a while (when in fact it happened
because the configuration changed).
Suggested-by: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 19:59:11 +0000 (12:59 -0700)]
INSTALL.Linux: Document use of "sparse" with Open vSwitch.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 20:01:43 +0000 (13:01 -0700)]
cfm: Avoid constructing log message that will be dropped by rate-limiting.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 30 Apr 2012 17:47:51 +0000 (10:47 -0700)]
ovs-bugtool: Add "ovs-vsctl show" output to bugtool.
The information output by "ovs-vsctl show" is a subset of that available
elsewhere in bugtool output, but it is human-readable instead of needing
to be processed through ovsdb-server or ovsdb-tool, so it is much more
convenient for basic diagnosis.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 27 Apr 2012 21:07:51 +0000 (14:07 -0700)]
ovs-bugtool: Add "ovs-appctl coverage/show" output to bugtool.
This can be useful for diagnosis.
Signed-off-by: Ben Pfaff <blp@nicira.com>