sliver-openvswitch.git
11 years agoSetting tag sliver-openvswitch-1.10.90-1 sliver-openvswitch-1.10.90-1
Thierry Parmentelat [Mon, 22 Apr 2013 06:14:50 +0000 (08:14 +0200)]
Setting tag sliver-openvswitch-1.10.90-1
merged with upstream (develoment version 1.10.90)
integrated ALLEGRA contributions for the termination of virtual cables in external nodes.

11 years agoupdate mainstream version number
Thierry Parmentelat [Mon, 22 Apr 2013 06:08:45 +0000 (08:08 +0200)]
update mainstream version number

11 years agofix remote-snapshot with external nodes
Giuseppe Lettieri [Thu, 4 Apr 2013 14:39:44 +0000 (16:39 +0200)]
fix remote-snapshot with external nodes

11 years agofix showmacs target
Giuseppe Lettieri [Thu, 4 Apr 2013 14:35:28 +0000 (16:35 +0200)]
fix showmacs target

11 years agoMerge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
Giuseppe Lettieri [Thu, 4 Apr 2013 14:24:57 +0000 (16:24 +0200)]
Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch

11 years agobetter dependencies for external links
Giuseppe Lettieri [Thu, 4 Apr 2013 13:38:06 +0000 (15:38 +0200)]
better dependencies for external links

with the previous dependencies the sequence

make L/N-E; make clean; make L/N-E

(with E an external node) would have not rerun
the recipe for node E, even if the port of node
N would have changed after the clean.

11 years agorecognize external links passed via command line
Giuseppe Lettieri [Thu, 4 Apr 2013 13:27:11 +0000 (15:27 +0200)]
recognize external links passed via command line

11 years agofix some warnings in tunproxy.c
Giuseppe Lettieri [Thu, 4 Apr 2013 13:26:40 +0000 (15:26 +0200)]
fix some warnings in tunproxy.c

11 years agotunproxy
Giuseppe Lettieri [Wed, 3 Apr 2013 14:17:35 +0000 (16:17 +0200)]
tunproxy

From Philippe Biondi and Felician Nemeth.

11 years agosupport for external hosts
Giuseppe Lettieri [Wed, 3 Apr 2013 14:14:15 +0000 (16:14 +0200)]
support for external hosts

From Felician Nemeth.

11 years agoMerge branch 'master' of git://openvswitch.org/openvswitch
Giuseppe Lettieri [Wed, 3 Apr 2013 11:52:41 +0000 (13:52 +0200)]
Merge branch 'master' of git://openvswitch.org/openvswitch

11 years agodatapath: Don't insert empty OVS_VPORT_ATTR_OPTIONS attribute
Thomas Graf [Tue, 2 Apr 2013 23:34:28 +0000 (16:34 -0700)]
datapath: Don't insert empty OVS_VPORT_ATTR_OPTIONS attribute

The port specific options are currently unused resulting in an
empty OVS_VPORT_ATTR_OPTIONS nested attribute being inserted
into every OVS_VPORT_CMD_GET message.

Don't insert OVS_VPORT_ATTR_OPTIONS if no options are present.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
[jesse: Options are used by tunnels but the concept still applies.]
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoofproto-dpif: Don't rate limit facet_learn() with fin_timeouts.
Ethan Jackson [Tue, 2 Apr 2013 19:32:22 +0000 (12:32 -0700)]
ofproto-dpif: Don't rate limit facet_learn() with fin_timeouts.

In the standard case, rate limiting facet_learn() to once ever
500ms, makes sense.  The worst that can happen is a learning entry
is expired half a second to early.  However, when using
fin_timeouts, we really need react quickly to delete the newly
stale flow.

Bug #15915.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto: Increase default flow-eviction-threshold.
Ethan Jackson [Fri, 29 Mar 2013 21:19:04 +0000 (14:19 -0700)]
ofproto: Increase default flow-eviction-threshold.

The flow-eviction-threshold presents a trade off between the
expense of maintaining large numbers of datapath flows, and the
benefit of avoid unnecessary flow misses.  In some large Open
vSwitch deployments, we've seen the previous default flow eviction
threshold negatively impact performance with reasonably typical
traffic patterns.  This patch increases the default to a level
which should represent a better trade off: still relatively safe,
but much more amenable to large numbers of long lived flows.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Push statistics less frequently.
Ethan Jackson [Fri, 22 Mar 2013 02:04:52 +0000 (19:04 -0700)]
ofproto-dpif: Push statistics less frequently.

The most natural place to push facet statistics is in
update_stats() where they're pulled from the datapath.  However,
under load, update_stats() can be called as many as 10 times per
second causing us to push statistics so frequently it hurts
performance.  By pushing statistics much less frequently, this
patch generates a roughly 8% improvement in TCP_CRR performance.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Run fast internally.
Ethan Jackson [Wed, 27 Mar 2013 18:33:22 +0000 (11:33 -0700)]
ofproto-dpif: Run fast internally.

ofproto-dpif is responsible for quite a few book keeping tasks in
addition to handling flow misses.  Many of these tasks (flow
expiration, flow revalidation, etc) can take many hundreds of
milliseconds, during which no misses can be handled.  The ideal
long term solution to this problem, is to isolate flow miss
handling into it's own thread.  However, for now this patch
provides a 5% increase in TCP_CRR performance, and smooths out
results during revalidations.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Systematically push stats upon request.
Ethan Jackson [Sat, 30 Mar 2013 22:13:00 +0000 (15:13 -0700)]
ofproto-dpif: Systematically push stats upon request.

Commit bf1e8ff (ofproto-dpif: Push statistics in rule_get_stats()),
started down the road towards pushing stats on demand, but it
didn't go quite far enough.  First, it neglected to push stats in
port_get_stats() and mirror_get_stats().  Second, it only pushes
stats for a single ofproto, making it incomplete when patch ports
are used.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev: Remove netdev_is_open(), which has no users.
Ben Pfaff [Wed, 13 Mar 2013 22:35:33 +0000 (15:35 -0700)]
netdev: Remove netdev_is_open(), which has no users.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev: Remove netdev_exists(), which has no users.
Ben Pfaff [Wed, 13 Mar 2013 22:23:07 +0000 (15:23 -0700)]
netdev: Remove netdev_exists(), which has no users.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agorhel: Add depmod.d conf file for rhel6 kmod package.
Gurucharan Shetty [Sun, 31 Mar 2013 01:32:25 +0000 (18:32 -0700)]
rhel: Add depmod.d conf file for rhel6 kmod package.

It looks like for Centos6.4, there is an upstream openvswitch
kernel module already installed. When we try to install kmod-openvswitch
package from this tree's pre-1.10 branches, we get the following warning:
"brcompat.ko needs unknown symbol ovs_dp_ioctl_hook".

Also, after installing the kmod-openvswitch package, if we run
"modprobe openvswitch", the upstream kernel module gets loaded.
We should instead load the kernel module compiled from this tree.

This patch fixes both the above issues.

Bug #15829.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agojsonrpc-server: Disconnect connections that queue too much data.
Ben Pfaff [Wed, 27 Mar 2013 21:38:11 +0000 (14:38 -0700)]
jsonrpc-server: Disconnect connections that queue too much data.

Consider this situation:

    * OVSDB client A executes transactions very quickly for a long time.

    * OVSDB client B monitors the tables that A modifies, but (either
      because B is connected over a slow network, or because B is slow to
      process updates) cannot keep up.

In this situation, the data that ovsdb-server has queued to send B grows
without bound and eventually ovsdb-server runs out of memory.  This commit
avoids the problem by noticing that more data is queued to B than necessary
to express the whole contents of the database and dropping the connection
to B.  When B reconnects later, it can then fetch the contents of the
database using less data than was previously queued to it.

(This is not entirely hypothetical.  We have seen this behavior in
intentional stress tests.)

Bug #15637.
Reported-by: Jeff Merrick <jmerrick@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovsdb-data: New functions for predicting serialized length of data.
Ben Pfaff [Wed, 27 Mar 2013 16:32:56 +0000 (09:32 -0700)]
ovsdb-data: New functions for predicting serialized length of data.

These will be used for the first time in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agojson: New function json_serialized_length().
Ben Pfaff [Mon, 1 Apr 2013 20:16:59 +0000 (13:16 -0700)]
json: New function json_serialized_length().

This will be used for the first time in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agotests: Add sFlow test.
Neil Mckee [Thu, 28 Mar 2013 06:02:21 +0000 (23:02 -0700)]
tests: Add sFlow test.

This patch adds an sFlow test to the test suite.

I have only tested this on a Fedora 17 OS.

Signed-off-by: Neil Mckee <neil.mckee@inmon.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agodatapath: Use ETH_ALEN to define ethernet addresses
Thomas Graf [Sat, 30 Mar 2013 01:30:34 +0000 (18:30 -0700)]
datapath: Use ETH_ALEN to define ethernet addresses

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Provide simple version of if_ether.h on non-Linux systems.
Jesse Gross [Sat, 30 Mar 2013 01:41:13 +0000 (18:41 -0700)]
datapath: Provide simple version of if_ether.h on non-Linux systems.

Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Move common genl notify code into ovs_notify()
Thomas Graf [Sat, 30 Mar 2013 01:24:06 +0000 (18:24 -0700)]
datapath: Move common genl notify code into ovs_notify()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Refine Netlink message size calculation and kill FLOW_BUFSIZE
Thomas Graf [Sat, 30 Mar 2013 01:18:58 +0000 (18:18 -0700)]
datapath: Refine Netlink message size calculation and kill FLOW_BUFSIZE

Kills the FLOW_BUFSIZE constant which needs to be calculated manually
and replaces it with key_attr_size() based on nla_total_size().
Calculates the size of datapath messages instead of relying on
NLMSG_DEFAULT_SIZE and moves the existing message size calculations
into own functions for clarity.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Use nla_memcpy() to memcpy() data from attributes
Thomas Graf [Sat, 30 Mar 2013 01:10:31 +0000 (18:10 -0700)]
datapath: Use nla_memcpy() to memcpy() data from attributes

Less error prone as it takes into account the length of both the
destination buffer and the source attribute and documents when
data is copied from an attribute.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Specify the minimal length of OVS_PACKET_ATTR_PACKET in the policy
Thomas Graf [Sat, 30 Mar 2013 01:03:05 +0000 (18:03 -0700)]
datapath: Specify the minimal length of OVS_PACKET_ATTR_PACKET in the policy

Specifying the minimal length in the policy makes it reuseable
and documents the interface.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agolacp: Stop time to avoid dependency on real time in negotiation test.
Ben Pfaff [Thu, 28 Mar 2013 18:45:47 +0000 (11:45 -0700)]
lacp: Stop time to avoid dependency on real time in negotiation test.

Commit f3103dfa00d (lacp.at: Change timing of lacp - negotiation test)
fixed test failures for the lacp negotiation test on some systems, but
made it crop up on others where it hadn't appeared before.

My guess is that this commit is the real fix.  If it isn't, then we
will probably just have to remove the test or disable it, much as I
hate doing that.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agodatapath: net: add ETH_P_802_3_MIN
Simon Horman [Thu, 28 Mar 2013 19:01:17 +0000 (12:01 -0700)]
datapath: net: add ETH_P_802_3_MIN

Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for
an 802.3 frame. Frames with a lower value in the ethernet type field
are Ethernet II.

Also update all the users of this value that David Miller and
I could find to use the new constant.

Also correct a bug in util.c. The comparison with ETH_P_802_3_MIN
should be >= not >.

As suggested by Jesse Gross.

Compile tested only.

Cc: David Miller <davem@davemloft.net>
Cc: Jesse Gross <jesse@nicira.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Bart De Schuymer <bart.de.schuymer@pandora.be>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org
Cc: bridge@lists.linux-foundation.org
Cc: linux-wireless@vger.kernel.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-media@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: dev@openvswitch.org
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agolacp.at: Change timing of lacp - negotiation test
Jarno Rajahalme [Thu, 28 Mar 2013 13:47:46 +0000 (15:47 +0200)]
lacp.at: Change timing of lacp - negotiation test

The "lacp - negotiation" test (# 3) used to always fail when running
multiple tests in parallel (-j2).  The reduced simulated wait time
(from 4 seconds to 2.5 seconds) seems to still give the expected result,
and works also when running multiple tests in parallel.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoopenflow-1.3.h: Fix spelling error
Jarno Rajahalme [Thu, 28 Mar 2013 13:53:41 +0000 (15:53 +0200)]
openflow-1.3.h: Fix spelling error

Fix spelling error in enum ofp13_action_type.

Reported-by: Markus Linnakangas <markus.linnakangas@tieto.com>
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoFAQ: Fix spelling of OpenFlow versions in example.
Jarno Rajahalme [Thu, 28 Mar 2013 13:53:40 +0000 (15:53 +0200)]
FAQ: Fix spelling of OpenFlow versions in example.

OpenFlow version strings in the database are case sensitive.

Reported-by: Markus Linnakangas <markus.linnakangas@tieto.com>
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofproto-dpif.at: Fix timing issue in show rates test.
Jarno Rajahalme [Thu, 28 Mar 2013 13:01:18 +0000 (15:01 +0200)]
ofproto-dpif.at: Fix timing issue in show rates test.

Fix a test failure due to timing differences in different test runs.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovs-lib: Wait for a longer time after SIGKILL.
Gurucharan Shetty [Wed, 27 Mar 2013 21:15:05 +0000 (14:15 -0700)]
ovs-lib: Wait for a longer time after SIGKILL.

Currently, when we stop a daemon, we first send it SIGTERM.
If SIGTERM did not work within ~5 seconds, we send a SIGKILL.
After sending SIGKILL, we wait only for 4 seconds, before giving
up.

If the system is extremely busy, there is a chance that a
process is not killed by the kernel within 4 seconds. In such
a case, when we try to start the daemon immediately, we see that
the pid inside the pid-file is valid and assume that the daemon
is still running. This leaves us in a state, where the daemon is
actually not running.

This patch increases the time waiting for the kernel to kill the
process to 60 seconds.

Bug #15404.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoofproto-dpif: Keep track of exact-match flow info
Andy Zhou [Tue, 26 Mar 2013 02:49:13 +0000 (19:49 -0700)]
ofproto-dpif: Keep track of exact-match flow info

This patch adds more flow related stats to the output of
"ovs-appctl dpif/show".  Specifically, the follow information
are added per ofproto:

- Max flow table size
- Average flow table size
- Average flow table add rate
- Average flow table delete rate
- Average flow entry life in milliseconds

Feature #15366

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovsdb: Remove prototypes for unimplemented functions.
Ben Pfaff [Wed, 27 Mar 2013 16:33:10 +0000 (09:33 -0700)]
ovsdb: Remove prototypes for unimplemented functions.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofproto-dpif: Rate limit calls to facet_learn().
Ethan Jackson [Fri, 22 Mar 2013 02:40:49 +0000 (19:40 -0700)]
ofproto-dpif: Rate limit calls to facet_learn().

In the TCP_CRR benchmark, ovs-vswitchd spends so much time in
update_stats() that it has a significant impact on flow setup
performance.  Further work is needed in this area, but for now,
simply rate limiting facet_learn() has a roughly 10% improvement
with complex flow tables.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Rate limit facet_check_consistency()
Ethan Jackson [Thu, 21 Mar 2013 20:31:14 +0000 (13:31 -0700)]
ofproto-dpif: Rate limit facet_check_consistency()

With complex flow tables, facet_check_consistency() can be
expensive enough to show up in flow setup performance benchmarks.
In my testing this patch gives us a roughly 10% improvement in
TCP_CRR and ovs-benchmark.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agodatapath: correct an invalid BUG_ON
Hong Zhiguo [Wed, 27 Mar 2013 15:14:43 +0000 (08:14 -0700)]
datapath: correct an invalid BUG_ON

table->count is uint32_t

Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Fix IP ID setting.
Jarno Rajahalme [Mon, 25 Mar 2013 19:03:38 +0000 (21:03 +0200)]
datapath: Fix IP ID setting.

Eliminate the extra call to ip_select_ident(), and place the
__ip_select_ident() call where the ip_select_ident() call was.
This fixes two problems: Before, the call to ip_select_ident() did
always zero out the value set earlier by __ip_select_ident().  Also,
when __ip_select_ident() was called before setting the iph->daddr,
ident calculation was possibly based on uninitialized data (but as
the result was masked by the later call to ip_select_ident() it was
not visible).

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Factor out common code from *_build_header() to ovs_tnl_send().
Jarno Rajahalme [Mon, 25 Mar 2013 19:03:37 +0000 (21:03 +0200)]
datapath: Factor out common code from *_build_header() to ovs_tnl_send().

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Preallocate reply skb in ovs_vport_cmd_set().
Jesse Gross [Wed, 20 Mar 2013 23:14:58 +0000 (16:14 -0700)]
datapath: Preallocate reply skb in ovs_vport_cmd_set().

Allocation of the Netlink notification skb can potentially fail
after changing vport configuration.  In general, we try to avoid
this by undoing any change we made but that is difficult for existing
objects.  This avoids the problem by preallocating the buffer (which
is fixed size).

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
11 years agovswitchd: Document coverage/show command.
Gurucharan Shetty [Mon, 25 Mar 2013 17:43:38 +0000 (10:43 -0700)]
vswitchd: Document coverage/show command.

coverage/show command documentation is currently missing
from ovs-vswitchd's man page.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoxenserver: Add information about some bugtool scripts.
Gurucharan Shetty [Mon, 25 Mar 2013 17:26:49 +0000 (10:26 -0700)]
xenserver: Add information about some bugtool scripts.

The README file in xenserver directory currently misses information
about a few bugtool scripts. Add them.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoovs-bugtool: Add ovs-appctl dpif commands to debug bundle.
Gurucharan Shetty [Mon, 25 Mar 2013 16:48:55 +0000 (09:48 -0700)]
ovs-bugtool: Add ovs-appctl dpif commands to debug bundle.

With single datapath, 'ovs-dpctl dump-flows ' dumps datapath flows for
all the userspace bridges in a system. It can get a little harder
to figure out the datapath flows belonging to a particular userspace
bridge.

This patch adds the 'ovs-appctl dpif/show' and 'ovs-appctl dpif/dump-flows'
output for each userspace bridge. This gives us a summary of configured
datapaths and all datapath flow entries for each bridge separately.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoovs-bugtool: Add iptables output for all tables.
Gurucharan Shetty [Mon, 25 Mar 2013 15:41:18 +0000 (08:41 -0700)]
ovs-bugtool: Add iptables output for all tables.

Currently we list all the rules only from the 'filter' table.
Include the rules from all the other tables too.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoodp-utils: Fix memory corruption while flow parsing.
Gurucharan Shetty [Fri, 22 Mar 2013 23:25:36 +0000 (16:25 -0700)]
odp-utils: Fix memory corruption while flow parsing.

Currently, when flow attribute type is greater than OVS_KEY_ATTR_MAX,
we can write into a random memory address causing corruption. Fix it.

Bug #15702.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoofproto-dpif: Push statistics in rule_get_stats().
Ethan Jackson [Sat, 23 Mar 2013 22:11:21 +0000 (15:11 -0700)]
ofproto-dpif: Push statistics in rule_get_stats().

As time goes on, and flow tables become more complicated, the
tradeoff between keeping up to date statistics, and the CPU
resources needed to maintain them, will become more important.
Commit 5c0243a (ofproto-dpif: xlate actions once with subfacets.)
delayed the reporting of some statistics in an effort to achieve
higher flow setup performance.  Future commits will continue in the
same direction.

This patch helps to alleviate the issue, by pushing statistics
rule_get_stats(), when users actually want them.  Presumably, this
happens rarely, and thus will not have a negative impact on
ovs-vswitchd performance.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoextract-ofp-errors: Make Python 3 compatible.
Damien Millescamps [Fri, 22 Mar 2013 18:48:15 +0000 (19:48 +0100)]
extract-ofp-errors: Make Python 3 compatible.

extract-ofp-errors doesn't work with python 3 for the
following reasons:

- several "SyntaxError: invalid syntax":
  print not a keyword anymore. As a function it requires '()'
- AttributeError: 'dict' object has no attribute 'itervalues'
  Use values() instead.

Test done:
Generate using ofp-errors.inc as a reference
Patch for python 3, then regenerate ofp-errors.inc
Diff between the two outputs.

Signed-off-by: Damien Millescamps <damien.millescamps@6wind.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoFAQ: Change stray triple-blank line to double-blank line for consistency.
Ben Pfaff [Thu, 21 Mar 2013 23:10:24 +0000 (16:10 -0700)]
FAQ: Change stray triple-blank line to double-blank line for consistency.

Reported-by: Reid Price <rprice@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovs-bugtool: Add ovs-ofctl commands to bugtool plugin scripts.
Gurucharan Shetty [Thu, 21 Mar 2013 20:46:15 +0000 (13:46 -0700)]
ovs-bugtool: Add ovs-ofctl commands to bugtool plugin scripts.

This patch adds two new scripts that run "ovs-ofctl show" and
"ovs-ofctl dump-flows" on each bridge.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoovs-bugtool: Remove calls of ovs-ofctl on ovs-system.
Gurucharan Shetty [Thu, 21 Mar 2013 20:22:56 +0000 (13:22 -0700)]
ovs-bugtool: Remove calls of ovs-ofctl on ovs-system.

With single datapath, making ovs-ofctl calls on ovs-system
does not give the necessary o/p. This patch removes those calls.

The next patch adds the correct commands to bugtool plugin scripts.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agonicira-ext: Fix comment on NXAST_STACK_PUSH and NXAST_STACK_POP.
Andy Zhou [Thu, 21 Mar 2013 18:37:32 +0000 (11:37 -0700)]
nicira-ext: Fix comment on NXAST_STACK_PUSH and NXAST_STACK_POP.

CC: Pankaj Thakkar <pthakkar@vmware.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofproto-dpif: xlate actions once with subfacets.
Ethan Jackson [Thu, 21 Mar 2013 18:17:00 +0000 (11:17 -0700)]
ofproto-dpif: xlate actions once with subfacets.

Before this patch, when ofproto-dpif decided that a particular flow
miss needed a facet, it would do action translation multiple times.
Once in subfacet_make_actions(), and once per packet in
subfacet_update_stats().  In the common case (once per miss), this
would double the amount of work required in xlate_actions().

The call to facet_push_stats() in subfacet_update_stats() is
unnecessary.  If the packets are simply accounted to the facet,
they will eventually be pushed to the relevant rules in
update_stats() or when the facet is removed.   Removing the
unnecessary step gives us a 20% improvement of the netperf TCP_CRR
benchmark with the complex flow tables installed by our controller.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agompls: Allow l3 and l4 actions to prior to a push_mpls action
Simon Horman [Wed, 20 Mar 2013 13:18:42 +0000 (22:18 +0900)]
mpls: Allow l3 and l4 actions to prior to a push_mpls action

* Update the order in which actions are committed and thus
  appear in the datapath such that MPLS actions appear after
  l3 and l4 (nw and port) actions.

  In the case where an mpls_push action is present it should ensure
  that l3 and l4 actions occur first, which seems logical as
  once a mpls_push has occur the frame will be MPLS rather
  than IPv4 or IPv6.

  In the case where there is an mpls_pop action is present this should
  not make any difference as the frame will have been MPLS to start with
  and thus not satisfy the pre-requisites for  l3 or l4 actions.

* Update commit_set_nw_action() to use the base ethertype when considering
  eligibility to commit l3 (nw) actions. This allows l3 actions to be
  applied so long as the frame was originally IPv4 or IPv6, even if
  an mpls_push action will be applied and thus flow indicates the
  frame will be MPLS.

* Make actions that may modify port or network information conditional on
  the flow's ethernet type being an IP ethernet type. This is to ensure
  that actions that modify network and port information do not occur
  on non IP packets, for example if an mpls_push action has changed a
  packet from IP to MPLS.

  Note that modification of network data is already prevented by
  virtue of commit_set_nw_action() only having cases for when the
  ethernet type of the flow is  IPV4 or IPV6. The conditionality
  of network actions on the ethernet type has been added to
  do_xlate_actions() to make it explicit.

* Add a check to commit_set_port_action() to ensure that the base
  flow is IP. This protects against the case where move_reg is used
  to change transport ports after an MPLS header is pushed.

Signed-off-by: Simon Horman <horms@verge.net.au>
[jesse: Add check for an IP protocol when committing L4 actions.]
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoconfigure: Only link against libpcap on FreeBSD.
Ben Pfaff [Thu, 14 Mar 2013 22:20:55 +0000 (15:20 -0700)]
configure: Only link against libpcap on FreeBSD.

On other platforms there is no benefit to linking against libpcap, because
it is not used.

Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Ed Maste <emaste@freebsd.org>
11 years agobridge: Rate-limit updates to "instant stats".
Ben Pfaff [Tue, 19 Mar 2013 21:02:48 +0000 (14:02 -0700)]
bridge: Rate-limit updates to "instant stats".

Some information in the database must be kept as up-to-date as
possible to allow controllers to respond rapidly to network outages.
We call these statistics "instant" stats.

Until now, the instant stats have been updated on every trip through
the main loop.  This work scales with the number of interfaces that
ovs-vswitchd manages.  With CFM enabled on 5000 interfaces, even with
a low transmission rate, we see ovs-vswitchd using 100% CPU just to
maintain statistics, even with no actual changes.

This commit rate-limits updates to instant stats to at most 10 times
per second.  Earlier tests I did with similar patches showed a major
reduction in CPU usage.  I have not rerun those tests with this patch,
but I expect that the CPU usage should similarly decline.

CC: Ram Jothikumar <rjothikumar@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agodatapath: Remove checks for preinitialized flow.
Jesse Gross [Mon, 18 Mar 2013 21:03:59 +0000 (14:03 -0700)]
datapath: Remove checks for preinitialized flow.

Header caching used to store a precomputed flow along with the skb
but no longer exists.  There were a few remaining checks for those
flows, which this removes.  It simplifies the code slightly and brings
us closer to upstream.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
11 years agodebian: Re-add --timeout option for ifupdown script.
Gurucharan Shetty [Mon, 18 Mar 2013 19:33:17 +0000 (12:33 -0700)]
debian: Re-add --timeout option for ifupdown script.

Commit fba6bd1d3f(ovs-vsctl: Try connecting only once for active connections..)
removed the timeout option from ifupdown.sh. Removing the "--timeout=" option
can cause ifupdown script to hang if ovs-vswitchd is not running and ifupdown
script changes the OVSDB. So, re-add it.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agorhel: Set STP of a bridge during bridge creation.
Gurucharan Shetty [Mon, 18 Mar 2013 17:18:15 +0000 (10:18 -0700)]
rhel: Set STP of a bridge during bridge creation.

This patch sets the value of STP (if provided) at the same
time of bridge creation. This eliminates an extra ovs-vsctl call
and does not let ovs-vswitchd run briefly with STP not enabled.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agorhel: Prevent duplicate ifup calls.
Gurucharan Shetty [Wed, 13 Mar 2013 19:24:54 +0000 (12:24 -0700)]
rhel: Prevent duplicate ifup calls.

When we configure OVS using rhel ifupdown scripts,
we call ifup on a bridge twice. Once while configuring the
bridge and once while configuring the ports of the bridge.
This looks harmless but unnecessary. This patch fixes the
behavior.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoNEWS: Update release for ovs-vsctl changes from post-1.10 to 1.10.
Ben Pfaff [Mon, 18 Mar 2013 16:58:47 +0000 (09:58 -0700)]
NEWS: Update release for ovs-vsctl changes from post-1.10 to 1.10.

This feature was backported.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoipsec: unset IPSEC_MARK flag from skb_mark after tunnel packet is decapsulated
Ansis Atteka [Thu, 14 Mar 2013 18:53:00 +0000 (11:53 -0700)]
ipsec: unset IPSEC_MARK flag from skb_mark after tunnel packet is decapsulated

After tunnel packet is unencapsulated we should unset IPsec flag from
skb_mark.

Otherwise, IPsec policies would be applied one more time on internal
interfaces, if there is one. This is especially necessary after we
will introduce global, low-priority IPsec drop policy that will make
sure that we never let through marked but unencrypted packets.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Issue: 15074

11 years agofiner list of files for f18
Thierry Parmentelat [Sun, 17 Mar 2013 16:20:42 +0000 (17:20 +0100)]
finer list of files for f18

11 years agoturn off auto-detection of requires in rpm
Thierry Parmentelat [Sun, 17 Mar 2013 07:54:29 +0000 (08:54 +0100)]
turn off auto-detection of requires in rpm

11 years agoovs-vsctl: Try connecting only once for active connections by default.
Ben Pfaff [Fri, 15 Mar 2013 23:14:28 +0000 (16:14 -0700)]
ovs-vsctl: Try connecting only once for active connections by default.

Until now, ovs-vsctl has kept trying to the database server until it
succeeded or the timeout expired (if one was specified with --timeout).
This meant that if ovsdb-server wasn't running, then ovs-vsctl would hang.
The result was that almost every ovs-vsctl invocation in scripts specified
a timeout on the off-chance that the database server might not be running.
But it's difficult to choose a good timeout.  A timeout that is too short
can cause spurious failures.  A timeout that is too long causes long delays
if the server really isn't running.

This commit should alleviate this problem.  It changes ovs-vsctl's behavior
so that, if it fails to connect to the server, it exits unsuccessfully.
This makes --timeout obsolete for the purpose of avoiding a hang if the
database server isn't running.  (--timeout is still useful to avoid a hang
if ovsdb-server is running but ovs-vswitchd is not, for ovs-vsctl commands
that modify the database.  --no-wait also avoids that issue.)

Bug #2393.
Bug #15594.
Reported-by: Jeff Merrick <jmerrick@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoRemove encal_dl_type from struct flow
Simon Horman [Fri, 15 Mar 2013 14:27:11 +0000 (15:27 +0100)]
Remove encal_dl_type from struct flow

There were plans to use this in conjunction with inner/outer flows,
however that plan has been changed in favour of using recirculation.
This leaves us with the current usage.

encal_dl_type is currently only used to allow decoding of packets used in
the test suite. However, this is a bit of a fudge and the packets may be
provided as hexadecimal instead.

Also remove comments from parse_l2_5_onward() relating to MPLS which are
not in keeping with the commenting throughout the rest of the function.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoRevert "flow: Split flow_extract"
Simon Horman [Fri, 15 Mar 2013 14:27:10 +0000 (15:27 +0100)]
Revert "flow: Split flow_extract"

It was planned to use this code to allow further processing of packets, a
second pass done when constructing a flow.  Instead it is now planned to
use recirculation to address the problems that secondary processing aimed
to resolve.  As a result there are no longer plans to use
flow_extract_l3_onwards() and it seems prudent to remove it.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoovs-dpctl: New add-flow, mod-flow, del-flow commands.
Ben Pfaff [Fri, 15 Mar 2013 20:47:53 +0000 (13:47 -0700)]
ovs-dpctl: New add-flow, mod-flow, del-flow commands.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agodatapath: Remove old patch interface definitions.
Jesse Gross [Fri, 15 Mar 2013 17:46:33 +0000 (10:46 -0700)]
datapath: Remove old patch interface definitions.

Patch ports have been completely moved to userspace at this point
but one part of the interface remained.  It's no longer used by
either userspace or kernel so this deletes it.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
11 years agodatapath: Provide additional RCU backports.
Jesse Gross [Fri, 15 Mar 2013 19:20:12 +0000 (12:20 -0700)]
datapath: Provide additional RCU backports.

A recent commit started using rcu_dereference_raw, hlist_first_rcu,
and hlist_next_rcu so this provides backports for kernels where they
don't exist.

Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoovs-bugtool: Add ovs-ctl.log to debug bundle.
Gurucharan Shetty [Wed, 13 Mar 2013 22:34:39 +0000 (15:34 -0700)]
ovs-bugtool: Add ovs-ctl.log to debug bundle.

ovs-ctl.log will include the o/p of ovs-ctl when
run from rhel, debian and xenserver startup scripts.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agodebian, rhel, xenserver: Ability to collect ovs-ctl logs.
Gurucharan Shetty [Wed, 13 Mar 2013 22:07:06 +0000 (15:07 -0700)]
debian, rhel, xenserver: Ability to collect ovs-ctl logs.

We use ovs-ctl from startup scripts to start, stop, restart,
force-reload-kmod OVS daemons. ovs-ctl gives quite a descriptive
o/p while running the above commands. But the o/p goes to stdout.
Sometimes, this output is quite useful to debug issues.

With this patch, we store the o/p of ovs-ctl when called from
startup scripts in /var/log/openvswitch/ovs-ctl.log

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agodatapath: hlist: drop the node parameter from iterators
Sasha Levin [Fri, 15 Mar 2013 01:40:32 +0000 (18:40 -0700)]
datapath: hlist: drop the node parameter from iterators

I'm not sure why, but the hlist for each entry iterators were conceived

        list_for_each_entry(pos, head, member)

The hlist ones were greedy and wanted an extra parameter:

        hlist_for_each_entry(tpos, pos, head, member)

Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.

Besides the semantic patch, there was some manual work required:

 - Fix up the actual hlist iterators in linux/list.h
 - Fix up the declaration of other iterators based on the hlist ones.
 - A very small amount of places were using the 'node' parameter, this
 was modified to use 'obj->member' instead.
 - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
 properly, so those had to be fixed up manually.

The semantic patch which is mostly the work of Peter Senna Tschudin is here:

@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

type T;
expression a,c,d,e;
identifier b;
statement S;
@@

-T b;
    <+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
    ...+>

[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Backport simplified hlist iterators.
Jesse Gross [Fri, 15 Mar 2013 16:18:20 +0000 (09:18 -0700)]
datapath: Backport simplified hlist iterators.

The hlist iterator macros were simplified upstream to remove the
need for a scratch pointer.  This backports those versions, which
don't otherwise touch anything else about the data structures.

Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoovs-ofctl: Improve description of mod_nw_tos action.
Ben Pfaff [Fri, 15 Mar 2013 15:24:56 +0000 (08:24 -0700)]
ovs-ofctl: Improve description of mod_nw_tos action.

Reported-by: Murphy McCauley <murphy.mccauley@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agolib: Rename lib/pcap.h to avoid inclusion conflicts.
Stephane A. Sezer [Fri, 15 Mar 2013 09:19:31 +0000 (02:19 -0700)]
lib: Rename lib/pcap.h to avoid inclusion conflicts.

lib/pcap.h has a name that conflicts with /usr/include/pcap.h. When one
wants to include pcap.h from libpcap (i.e.: the one from /usr/include), one
may end up with pcap.h from openvswitch.

This change renames this header to pcap-file.h and updates all
references to this file.

This change was tested with `make distcheck`.

Signed-off-by: Stephane A. Sezer <sas@cd80.net>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agodatapath: fix drvinfo strings set in drivers
Jiri Pirko [Fri, 15 Mar 2013 00:36:37 +0000 (17:36 -0700)]
datapath: fix drvinfo strings set in drivers

Use strlcpy where possible to ensure the string is \0 terminated.
Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN
and custom defines.
Use snprintf instead of sprint.
Remove unnecessary inits of ->fw_version
Remove unnecessary inits of drvinfo struct.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agorhel: Return an exit value of 0 for ifup-ovs.
Gurucharan Shetty [Wed, 13 Mar 2013 18:17:21 +0000 (11:17 -0700)]
rhel: Return an exit value of 0 for ifup-ovs.

When the variable "STP" is not set, the last executed command is False
while running ifup-ovs for OVSBridge. This causes the ifup-ovs
script to return an error resulting in a failure.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoovs-appctl: dpif/show display per bridge stats
Andy Zhou [Tue, 12 Mar 2013 21:19:18 +0000 (14:19 -0700)]
ovs-appctl: dpif/show display per bridge stats

This is to fix the fallout of single datapath change.
ovs-appctl dpif/show displays per bridge miss, hit
and flow counts on the screen, but the backend is
obtaining those information from the datapath.
With a single datapath, all bridges of the same
datapath would all display the same  (global)
counters maintained by the datapath, obviously
not correct.

This patch fixes the bug by maintaining per ofproto_dpif
miss and hit counts, which are used for display output.
The number of flows count is obtained by counting the
number facets per ofproto.

ovs-dpctl show still displays the counters maintain by
the datapath, as before.

Bug #15369

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agotunnel: Remove references to multicast tunnels in schema documentation.
Jesse Gross [Wed, 13 Mar 2013 15:35:15 +0000 (08:35 -0700)]
tunnel: Remove references to multicast tunnels in schema documentation.

The vestigal multicast support in tunnels has been removed at this
point, so this deletes the remaining references in the documentation.

Reported-by: Guangvy <1965837689@qq.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Check for Centos 6.4 backports.
Jesse Gross [Tue, 12 Mar 2013 18:34:29 +0000 (11:34 -0700)]
datapath: Check for Centos 6.4 backports.

Centos 6.4 backported a number of additional functions so our existing
versions started causing conflicts.

Reported-by: Denis Iskandarov <d.iskandarov@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agobridge: Store the 'mac_in_use' for interfaces in OVSDB.
Justin Pettit [Tue, 12 Mar 2013 21:47:22 +0000 (14:47 -0700)]
bridge: Store the 'mac_in_use' for interfaces in OVSDB.

It can be useful to remotely determine the MAC addresses of attached
interfaces without going through OpenFlow.  This adds the MAC address to
a new 'mac_in_use' column on the Interface table.

Feature #15551

Requested-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agobridge: Minor style fix.
Justin Pettit [Tue, 12 Mar 2013 21:54:37 +0000 (14:54 -0700)]
bridge: Minor style fix.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agodatapath: Reduce loop limit by one to 4.
Jesse Gross [Tue, 12 Mar 2013 19:36:03 +0000 (12:36 -0700)]
datapath: Reduce loop limit by one to 4.

We currently allow five trips through the kernel datapath
before dropping the packet to protect the stack.  However, there
have been a few reports recently involving tunneling that this is
still too much.  Although it's not a complete solution, this reduces
the limit by one to balance safety in common situations with
flexibility.

Bug #15477

Reported-by: Paul Ingram <paul@nicira.com>
Reported-by: 謝秉融 <faithfulman@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
11 years agobridge: Minor style fix.
Ben Pfaff [Wed, 6 Mar 2013 00:25:32 +0000 (16:25 -0800)]
bridge: Minor style fix.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto: Remove unnecessary struct forward declaration.
Ben Pfaff [Wed, 6 Mar 2013 00:25:25 +0000 (16:25 -0800)]
ofproto: Remove unnecessary struct forward declaration.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb: Allow recovery from transient write errors in log implementation.
Ben Pfaff [Fri, 1 Mar 2013 19:16:24 +0000 (11:16 -0800)]
ovsdb: Allow recovery from transient write errors in log implementation.

Until now, the OVSDB data journaling implementation has made write errors
"sticky", so that a single write error persists as long as ovsdb-server is
alive.  However, some kinds of write errors (such as ENOSPC) can be
transient in practice.  I don't know of a good reason to make such errors
sticky, so this commit makes the journaling code retry writes even after
an error occurs, allowing ovsdb-server to recover from transient errors.

Reported-by: likunyun <kunyunli@hotmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agovswitch.xml: Document iface-status behavior for intra-hypervisor migration.
Ben Pfaff [Wed, 27 Feb 2013 18:29:43 +0000 (10:29 -0800)]
vswitch.xml: Document iface-status behavior for intra-hypervisor migration.

Based on a face-to-face discussion.

CC: Natasha Gude <natasha@nicira.com>
CC: Andrew Lambeth <wal@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb: Fix memory leak.
Ben Pfaff [Thu, 24 Jan 2013 19:33:35 +0000 (11:33 -0800)]
ovsdb: Fix memory leak.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoconnmgr: Fix memory leak in ofconn monitor table.
Ben Pfaff [Fri, 18 Jan 2013 23:17:15 +0000 (15:17 -0800)]
connmgr: Fix memory leak in ofconn monitor table.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoSet dates for 1.9.0 release.
Justin Pettit [Tue, 26 Feb 2013 19:24:20 +0000 (11:24 -0800)]
Set dates for 1.9.0 release.

This also sets the dates for 1.8.0, even though it was an internal-only
release.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoNEWS: Note tunneling feature removals in the correct release.
Jesse Gross [Mon, 11 Mar 2013 23:00:17 +0000 (16:00 -0700)]
NEWS: Note tunneling feature removals in the correct release.

Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoovs-ctl.in: Set hard limit for core files created.
Gurucharan Shetty [Mon, 11 Mar 2013 20:07:11 +0000 (13:07 -0700)]
ovs-ctl.in: Set hard limit for core files created.

Currently we set a soft limit while defining the maximum size of
core files. If there is already a hard limit set that is lesser
than the soft limit we are setting, it will fail.

Since our startup scripts start with root permissions, it looks
fine to set the hard limit directly instead.

Reported-by: Dan Wendlandt <dan@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agoofproto-dpif: Remove unnecessary ofp_port to odp_port mapping.
Jarno Rajahalme [Mon, 11 Mar 2013 13:27:41 +0000 (15:27 +0200)]
ofproto-dpif: Remove unnecessary ofp_port to odp_port mapping.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agonicira-ext: Document that nx_flow_mod_table_id applies to nx_flow_mod too.
Ben Pfaff [Fri, 8 Mar 2013 18:24:06 +0000 (10:24 -0800)]
nicira-ext: Document that nx_flow_mod_table_id applies to nx_flow_mod too.

It wasn't clear from the comments that nx_flow_mod_table_id applies to
nx_flow_mod as well as ofp10_flow_mod, but it does and always has.  This
commit makes it clear.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoNEWS: Fix release for table ID in NXM flow_removed feature.
Ben Pfaff [Fri, 8 Mar 2013 18:54:13 +0000 (10:54 -0800)]
NEWS: Fix release for table ID in NXM flow_removed feature.

I forgot that I was planning to backport this to branch-1.10.

Signed-off-by: Ben Pfaff <blp@nicira.com>