sliver-openvswitch.git
11 years agoofp-util: Simplify struct ofputil_role_request.
Ben Pfaff [Tue, 12 Feb 2013 07:55:31 +0000 (23:55 -0800)]
ofp-util: Simplify struct ofputil_role_request.

It makes more sense to use enum ofp12_controller_role here than
to use enum nx_role, because the former is a superset of the latter and
we can then get rid of a bool member too.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofp-msgs: New function ofpraw_decode_assert().
Ben Pfaff [Tue, 12 Feb 2013 07:37:41 +0000 (23:37 -0800)]
ofp-msgs: New function ofpraw_decode_assert().

This will acquire a caller in an upcoming patch.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofp-msgs: Fix typos in comment.
Ben Pfaff [Tue, 12 Feb 2013 07:37:19 +0000 (23:37 -0800)]
ofp-msgs: Fix typos in comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agovswitchd: Require "target" column to be unique in OVS database.
Ben Pfaff [Mon, 11 Feb 2013 21:46:42 +0000 (13:46 -0800)]
vswitchd: Require "target" column to be unique in OVS database.

Commit cc7ecee48 (vswitchd: Add unique indexes for some columns.) says,
in part:

    With this commit, the database server itself rejects attempts to add
    Port or Interface records with duplicate names or Controller or
    Manager records with duplicate targets.

but in fact didn't change the Controller table as described.  This commit
fixes that.

This commit updates the schema version number's major version, because this
is a potentially non-backward compatible change, if some user depended on
the ability to add Controller records with duplicate targets.  However, if
anyone thinks this is a bad idea, then I'm open to discussion.

Reported-by: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agotests: Add test for self-modifying learn action.
Ben Pfaff [Fri, 1 Feb 2013 00:27:14 +0000 (16:27 -0800)]
tests: Add test for self-modifying learn action.

CC: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev-dummy: Correctly maintain port statistics.
Ben Pfaff [Tue, 18 Sep 2012 18:06:08 +0000 (11:06 -0700)]
netdev-dummy: Correctly maintain port statistics.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-macros: Fail a test that logs a WARN or higher level message.
Ben Pfaff [Fri, 1 Feb 2013 18:25:25 +0000 (10:25 -0800)]
ofproto-macros: Fail a test that logs a WARN or higher level message.

It is necessary to whitelist a couple of tests that appear to legitimately
have WARN messages.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agotimeval: Don't issue poll interval warnings when we warp time.
Ben Pfaff [Fri, 1 Feb 2013 18:25:51 +0000 (10:25 -0800)]
timeval: Don't issue poll interval warnings when we warp time.

It's not meaningful in that case.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agotests: Set explicit bond mode in LACP test.
Ben Pfaff [Fri, 17 Aug 2012 23:08:17 +0000 (16:08 -0700)]
tests: Set explicit bond mode in LACP test.

This avoids a log warning:

    bridge|WARN|port bond: Using the default bond_mode active-backup.
    Note that in previous versions, the default bond_mode was balance-slb

This warning is harmless, but I'm trying to add checks for "warn" and
higher severity log messages to the tests, so it makes sense to get rid of
this one.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agobond: Reduce log level from WARN to INFO for interface status updates.
Ben Pfaff [Thu, 25 Oct 2012 20:46:57 +0000 (13:46 -0700)]
bond: Reduce log level from WARN to INFO for interface status updates.

An interface coming up or going down isn't a big deal.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agopoll-loop: Reduce high-CPU log messages from WARN to INFO.
Ben Pfaff [Mon, 20 Aug 2012 17:52:26 +0000 (10:52 -0700)]
poll-loop: Reduce high-CPU log messages from WARN to INFO.

These can happen occasionally in normal circumstances.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agotests: Fix error path in netflow test.
Ben Pfaff [Fri, 1 Feb 2013 18:26:35 +0000 (10:26 -0800)]
tests: Fix error path in netflow test.

Otherwise, if the test bails out before finishing, the test-netflow daemon
doesn't get killed and the test hangs.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoclassifier: Refactor table priority updates and tables_priority reordering.
Ben Pfaff [Mon, 11 Feb 2013 21:11:42 +0000 (13:11 -0800)]
classifier: Refactor table priority updates and tables_priority reordering.

I find this organization clearer.

CC: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agostream-unix: Use rundir as root for relative paths.
Pavithra Ramesh [Fri, 8 Feb 2013 20:37:18 +0000 (12:37 -0800)]
stream-unix: Use rundir as root for relative paths.

Until now, "unix:" and "punix:" paths that are not absolute have
been considered relative to the current working directory.  It
is more useful to consider them relative to the rundir, so this
commit makes that change to the C and Python implementations of
the stream code.

This commit also relaxes the whitelist check in the bridge code
so that any name that does not contain a "/" is considered OK.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoclassifier: Maintain tables in descending priority order.
Jarno Rajahalme [Thu, 7 Feb 2013 22:06:23 +0000 (00:06 +0200)]
classifier: Maintain tables in descending priority order.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
[blp@nicira.com: this along with Jarno's previous patch to the
 classifier give me a combined 15% boost in "ovs-benchmark rate"
 with a complicated flow table involving multiple resubmits]
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoovs-pki: Increase the validity period for all certificates.
Gurucharan Shetty [Fri, 8 Feb 2013 18:13:09 +0000 (10:13 -0800)]
ovs-pki: Increase the validity period for all certificates.

This patch increases the certificate validity to 100 years
for certificate authorities, the certificates that they certify
and for self signed certificates.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agotunnel: Treat in_key=0 the same as a missing in_key.
Ethan Jackson [Fri, 8 Feb 2013 02:39:24 +0000 (18:39 -0800)]
tunnel: Treat in_key=0 the same as a missing in_key.

The documented behavior of ovs is that a missing key is the
same as a zero key.  However, the tunneling code actually treated
them differently.  This could cause problems with tunneling modes
such as vxlan which always have a key.  Specifically, a tunnel with
no key configured, would send have to send traffic with a key of
zero.  However, the same tunnel would drop incoming traffic with a
zero key because it was expecting there to be none at all.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agotunnel: Log tunneling changes at INFO level.
Ethan Jackson [Thu, 7 Feb 2013 00:45:38 +0000 (16:45 -0800)]
tunnel: Log tunneling changes at INFO level.

These log messages occur infrequently, and are quite useful when
debugging problems after the fact.  So they should be logged at
info level which makes them more readily available.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agodatapath: Fix ovs_vport_cmd_new return value on success
Rich Lane [Fri, 8 Feb 2013 20:09:31 +0000 (12:09 -0800)]
datapath: Fix ovs_vport_cmd_new return value on success

This bug was introduced in 1fc7083d (datapath: Remove vport MAC address
configuration.)

Signed-off-by: Rich Lane <rlane@bigswitch.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoOptimize classifier by maintaining the priority of the highest priority rule in each...
Jarno Rajahalme [Thu, 7 Feb 2013 22:06:22 +0000 (00:06 +0200)]
Optimize classifier by maintaining the priority of the highest priority rule in each table.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoAUTHORS: Add Rich Lane.
Jesse Gross [Fri, 8 Feb 2013 17:20:35 +0000 (09:20 -0800)]
AUTHORS: Add Rich Lane.

Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: Fix ovs_vport_cmd_del return value on success
Rich Lane [Fri, 8 Feb 2013 17:11:28 +0000 (09:11 -0800)]
datapath: Fix ovs_vport_cmd_del return value on success

If the pointer does not represent an error then the PTR_ERR macro may still
return a nonzero value. The fix is the same as in ovs_vport_cmd_set.

Signed-off-by: Rich Lane <rlane@bigswitch.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agodatapath: adjust skb_gso_segment() for calling in rx path
Cong Wang [Wed, 6 Feb 2013 22:40:36 +0000 (14:40 -0800)]
datapath: adjust skb_gso_segment() for calling in rx path

skb_gso_segment() is almost always called in tx path,
except for openvswitch. It calls this function when
it receives the packet and tries to queue it to user-space.
In this special case, the ->ip_summed check inside
skb_gso_segment() is no longer true, as ->ip_summed value
has different meanings on rx path.

This patch adjusts skb_gso_segment() so that we can at least
avoid such warnings on checksum.

Cc: Jesse Gross <jesse@nicira.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[jesse: backport to kernels before 3.9 and add to tunnel.c]
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agopacket: packet_get_tcp_flags: use flow's innermost dl_type
Simon Horman [Wed, 6 Feb 2013 13:53:54 +0000 (22:53 +0900)]
packet: packet_get_tcp_flags: use flow's innermost dl_type

Use the innermost dl_type when decoding L3 and L4 data from a packet.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoodp-util: commit_set_nw_action: use flow's innermost dl_type
Simon Horman [Wed, 6 Feb 2013 13:53:53 +0000 (22:53 +0900)]
odp-util: commit_set_nw_action: use flow's innermost dl_type

Use the innermost dl_type when decoding L3 and L4 data from a packet.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agopacket: Correctly set ethertype in pop_mpls()
Simon Horman [Wed, 6 Feb 2013 13:53:52 +0000 (22:53 +0900)]
packet: Correctly set ethertype in pop_mpls()

The ethertype should be set before resetting l2_5 in order
for the packet to be updated correctly.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoFAQ: Fix typo (doubled "later").
Ben Pfaff [Wed, 6 Feb 2013 17:15:05 +0000 (09:15 -0800)]
FAQ: Fix typo (doubled "later").

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoFAQ: Expand on how one would implement VLAN handling via flows.
Ben Pfaff [Wed, 6 Feb 2013 17:12:59 +0000 (09:12 -0800)]
FAQ: Expand on how one would implement VLAN handling via flows.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agonicira-ext: Remove the autopath action.
Ethan Jackson [Tue, 5 Feb 2013 02:45:54 +0000 (18:45 -0800)]
nicira-ext: Remove the autopath action.

The autopath action was attempting to achieve functionality similar
to the bundle action, but was significantly clunkier, more
difficult to understand, more difficult to use, and less reliable.
This patch removes it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agobond: Remove stable bond mode.
Ethan Jackson [Tue, 5 Feb 2013 02:28:57 +0000 (18:28 -0800)]
bond: Remove stable bond mode.

Stable bond mode, along with autopath, were trying to implement
functionality close to what we get from the bundle action.
Unfortunately, they are quite clunky, and generally less useful
than bundle, so they're being removed.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoUser-Space MPLS actions and matches
Simon Horman [Fri, 25 Jan 2013 07:22:07 +0000 (16:22 +0900)]
User-Space MPLS actions and matches

This patch implements use-space datapath and non-datapath code
to match and use the datapath API set out in Leo Alterman's patch
"user-space datapath: Add basic MPLS support to kernel".

The resulting MPLS implementation supports:
* Pushing a single MPLS label
* Poping a single MPLS label
* Modifying an MPLS lable using set-field or load actions
  that act on the label value, tc and bos bit.
* There is no support for manipulating the TTL
  this is considered future work.

The single-level push pop limitation is implemented by processing
push, pop and set-field/load actions in order and discarding information
that would require multiple levels of push/pop to be supported.

e.g.
   push,push -> the first push is discarded
   pop,pop -> the first pop is discarded

This patch is based heavily on work by Ravi K.

Cc: Ravi K <rkerur@gmail.com>
Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoPrepare for post-1.10.0 (1.10.90).
Justin Pettit [Tue, 5 Feb 2013 05:55:32 +0000 (21:55 -0800)]
Prepare for post-1.10.0 (1.10.90).

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoPrepare for 1.10.0.
Justin Pettit [Mon, 4 Feb 2013 23:56:36 +0000 (15:56 -0800)]
Prepare for 1.10.0.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoNEWS: Rearrange announcements related to 1.10 and 1.9.
Justin Pettit [Tue, 5 Feb 2013 05:45:29 +0000 (21:45 -0800)]
NEWS: Rearrange announcements related to 1.10 and 1.9.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoNEWS: Mention experimental support for newer versions of OpenFlow.
Justin Pettit [Mon, 4 Feb 2013 22:28:05 +0000 (14:28 -0800)]
NEWS: Mention experimental support for newer versions of OpenFlow.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoNEWS: Correct some items incorrectly stating they arrived in 1.9.0.
Justin Pettit [Mon, 4 Feb 2013 22:13:25 +0000 (14:13 -0800)]
NEWS: Correct some items incorrectly stating they arrived in 1.9.0.

A few items were listed as arriving in 1.9.0, but they actually were new
to 1.10.0.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agoFAQ: Add an entry describing the different ways to dump flows.
Justin Pettit [Thu, 1 Nov 2012 17:05:25 +0000 (10:05 -0700)]
FAQ: Add an entry describing the different ways to dump flows.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agopython/ovs/db/types: Fix English grammar for enums with one member.
Ben Pfaff [Fri, 1 Feb 2013 22:52:49 +0000 (14:52 -0800)]
python/ovs/db/types: Fix English grammar for enums with one member.

Before this change, enums that have one member were formatted as, e.g.:
    "one of xyzzy, , or "
This changes them to be formatted as:
    "must be xyzzy"
which makes much more sense.

(An enum with one member may make some sense if you are trying to leave
the possibility for future expansion.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoFAQ: Add question and answer about PPP.
Ben Pfaff [Sat, 2 Feb 2013 16:53:51 +0000 (08:53 -0800)]
FAQ: Add question and answer about PPP.

We've had this question a few times lately.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agotunneling: Don't send ICMP messages if no tunnel port is found.
Jesse Gross [Fri, 1 Feb 2013 23:34:10 +0000 (15:34 -0800)]
tunneling: Don't send ICMP messages if no tunnel port is found.

Some tunnel code in OVS (for example, CAPWAP) uses the skb->cb to
store information while processing packets.  However, if we don't
find an appropriate tunnel port on receive, then we send an ICMP
port unreachable message, which calls back into the IP stack.  The
stack assumes that skb->cb will still contain valid information
about from the IP layer, including any IP options.  As a result,
icmp_echo_options() can read the garbage values from OVS and
overwrite data on the stack, panicing the machine.

This simply stops sending ICMP messages when ports are not found.
Many people find them confusing and flow based tunneling will
never send them (since it always finds a port) so it solves both
problems at once.

Bug #14880

Reported-by: Deepesh Govindan <dgovindan@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agoUse is_pow2() function, where possible, instead of IS_POW2 macro.
Ben Pfaff [Fri, 1 Feb 2013 22:55:14 +0000 (14:55 -0800)]
Use is_pow2() function, where possible, instead of IS_POW2 macro.

The IS_POW2 macro is meant for use in contexts where a function call is not
allowed.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agosocket-util: Use set_nonblocking() helper function.
Ben Pfaff [Fri, 1 Feb 2013 22:54:15 +0000 (14:54 -0800)]
socket-util: Use set_nonblocking() helper function.

There's no reason to inline this when we have a helper for it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agotimeval: Avoid unnecessary integer overflow in time_alarm().
Ben Pfaff [Thu, 24 Jan 2013 21:50:39 +0000 (13:50 -0800)]
timeval: Avoid unnecessary integer overflow in time_alarm().

Durations longer than 4294967 seconds would unnecessarily overflow in the
multiplication here.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoworker: Use ovs_retval_to_string() where EOF is a possible return value.
Ben Pfaff [Thu, 24 Jan 2013 21:47:46 +0000 (13:47 -0800)]
worker: Use ovs_retval_to_string() where EOF is a possible return value.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agounixctl: Use ovs_retval_to_string() where EOF is a possible value.
Ben Pfaff [Thu, 24 Jan 2013 21:46:23 +0000 (13:46 -0800)]
unixctl: Use ovs_retval_to_string() where EOF is a possible value.

jsonrpc_transact_block() might return EOF so passing its return value to
strerror() isn't general enough.

It might be better to change jsonrpc_transact{_block}() to never return
EOF, since a closed connection seems like it is always an error in that
context.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev-linux: Check return value of set_nonblocking().
Ben Pfaff [Thu, 24 Jan 2013 21:22:30 +0000 (13:22 -0800)]
netdev-linux: Check return value of set_nonblocking().

It's unlikely to fail but checking it can't hurt.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoprocess: Check return value of set_nonblocking().
Ben Pfaff [Thu, 24 Jan 2013 21:19:52 +0000 (13:19 -0800)]
process: Check return value of set_nonblocking().

It's unlikely to fail but checking it can't hurt.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agobridge: Rename iface_create() variable to avoid hiding parameter.
Ben Pfaff [Thu, 24 Jan 2013 21:57:37 +0000 (13:57 -0800)]
bridge: Rename iface_create() variable to avoid hiding parameter.

This function has a parameter 'ofp_port' and a local variable 'ofp_port',
so rename the local variable to reduce confusion.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoofp-util: Rename ofputil_port_from_string() variable to avoid hiding param.
Ben Pfaff [Thu, 24 Jan 2013 21:56:10 +0000 (13:56 -0800)]
ofp-util: Rename ofputil_port_from_string() variable to avoid hiding param.

This function has a parameter 's' and a local variable 's', so rename the
local variable to reduce confusion.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agovlog: New function vlog_set_levels_from_string_assert().
Ben Pfaff [Thu, 24 Jan 2013 22:17:21 +0000 (14:17 -0800)]
vlog: New function vlog_set_levels_from_string_assert().

Two of the users of vlog_set_levels_from_string() in the tests could have
silently failed, if their arguments were invalid.  This avoids that problem
(and a memory leak).

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoofp-parse: Ignore "idle_age" and "hard_age" when parsing a flow string.
Justin Pettit [Fri, 1 Feb 2013 08:11:32 +0000 (00:11 -0800)]
ofp-parse: Ignore "idle_age" and "hard_age" when parsing a flow string.

It should be possible to feed to output of "ovs-ofctl dump-flows" to
"ovs-ofctl add-flows".  However, some of the metadata needs to be
ignored.  "idle_age" and "hard_age" was recently added to the output of
"ovs-ofctl dump-flows", but they were not ignored like the other
metadata.  This commit ignores them.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agonetlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.
Ben Pfaff [Fri, 17 Aug 2012 22:40:03 +0000 (15:40 -0700)]
netlink-socket: Don't bother logging SO_RCVBUFFORCE failure as non-root.

Some Open vSwitch utilities can do useful work when they are not run as
root.  Without this commit, these utilities will log a warning on failure
to use the SO_RCVBUFFORCE socket option if they open any Netlink sockets.
This will always happen, it does not report anything unexpected or
fixable as non-root, and sometimes it makes users wonder if something is
wrong, so there is no benefit to logging it.  This commit drops it in that
case.

Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agorename myslice => example_slice
Giuseppe Lettieri [Fri, 1 Feb 2013 13:42:32 +0000 (14:42 +0100)]
rename myslice => example_slice

This is to avoid confusion with the MySlice project, as
suggested by Ciro Sconamiglio.

11 years agoupdated info in the exp-tool/README
Giuseppe Lettieri [Fri, 1 Feb 2013 11:09:55 +0000 (12:09 +0100)]
updated info in the exp-tool/README

11 years agoofproto-dpif: Fix memory leak in port_dump_next().
Ben Pfaff [Thu, 31 Jan 2013 23:53:23 +0000 (15:53 -0800)]
ofproto-dpif: Fix memory leak in port_dump_next().

The caller of port_query_by_name() is responsible for freeing the
ofproto_port that it returns on success, but ofproto-dpif did not do this.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovs-ctl: Update comment.
Ben Pfaff [Thu, 31 Jan 2013 23:48:35 +0000 (15:48 -0800)]
ovs-ctl: Update comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agoofproto-dpif: Clear revalidation flags only once, not per-ofproto.
Ben Pfaff [Thu, 31 Jan 2013 23:47:24 +0000 (15:47 -0800)]
ofproto-dpif: Clear revalidation flags only once, not per-ofproto.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb-tool: Fix memory leak on error path in "show-log" implementation.
Ben Pfaff [Thu, 24 Jan 2013 22:23:45 +0000 (14:23 -0800)]
ovsdb-tool: Fix memory leak on error path in "show-log" implementation.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb-idl: Fix memory leak on error path.
Ben Pfaff [Thu, 24 Jan 2013 22:19:20 +0000 (14:19 -0800)]
ovsdb-idl: Fix memory leak on error path.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agometa-flow: Add missing "break" to mf_set_wild().
Ben Pfaff [Thu, 24 Jan 2013 21:41:10 +0000 (13:41 -0800)]
meta-flow: Add missing "break" to mf_set_wild().

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agometa-flow: Avoid null pointer dereference in mf_format_frag_string().
Ben Pfaff [Thu, 24 Jan 2013 21:39:23 +0000 (13:39 -0800)]
meta-flow: Avoid null pointer dereference in mf_format_frag_string().

The 'maskp' parameter to this function can be NULL, but the function
always dereferenced it.  This commit fixes the problem.

This commit also fixes the order in which the value and mask were adjusted
to correctly discard 1-bits outside of FLOW_NW_FRAG_MASK.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoMerge branch 'mainstream'
Giuseppe Lettieri [Thu, 31 Jan 2013 14:09:26 +0000 (15:09 +0100)]
Merge branch 'mainstream'

Conflicts:
lib/dpif-netdev.c

11 years agoovs-ctl: Fix a couple of typos.
Gurucharan Shetty [Wed, 30 Jan 2013 16:19:35 +0000 (08:19 -0800)]
ovs-ctl: Fix a couple of typos.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
11 years agonetdev-vport: Build on all platforms.
Ethan Jackson [Fri, 25 Jan 2013 21:30:40 +0000 (13:30 -0800)]
netdev-vport: Build on all platforms.

This patch removes the final bit of linux specific code which
prevents building netdev-vport everywhere.  With this, other
platforms automatically get access to patch ports, and (if their
datapath supports it), flow based tunneling.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agotests: Add tunnel unit tests.
Ethan Jackson [Wed, 9 Jan 2013 01:33:04 +0000 (17:33 -0800)]
tests: Add tunnel unit tests.

This commit adds unit tests which exercise the flow based
tunneling code added in previous patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agolib: Switch to flow based tunneling.
Ethan Jackson [Sat, 15 Dec 2012 03:14:54 +0000 (19:14 -0800)]
lib: Switch to flow based tunneling.

With this patch, ovs-vswitchd uses flow based tunneling
exclusively.  I.E. each kind of tunnel shares a single tunnel
backer in the datapath.  Tunnel headers are set by userspace using
the ipv4_tunnel datapath action.  And, the configuration of
individual tunnels is now a userspace responsibility, so
netdev-vport no longer marshals and unmarshals Netlink attributes
for tunnel configuration, instead only storing the configuration
internally.  There are still some significant pieces of work to do,
but the basic building blocks are there to begin testing.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Co-authored-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agotunnel: Userspace implementation of tunnel manipulation.
Jesse Gross [Thu, 20 Sep 2012 01:37:07 +0000 (18:37 -0700)]
tunnel: Userspace implementation of tunnel manipulation.

The kernel tunneling code currently needs to handle a large number
of operations when tunnel packets are encapsulated and
decapsulated.  Some examples of this are: finding the correct
tunnel port on receive, TTL and ToS inheritance, ECN handling, etc.
All of these can be done on a per-flow basis in userspace now that
we have both the inner and outer header information, which allows
us to both simplify the kernel and take advantage of userspace's
information.  Once tunnel packets are redirected into this code,
the redundant pieces can be removed from other places.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev: New function netdev_get_dpif_port().
Ethan Jackson [Mon, 17 Dec 2012 01:08:50 +0000 (17:08 -0800)]
netdev: New function netdev_get_dpif_port().

In future patches, a netdev's datapath port name may not
necessarily be the same as its device name. This patch prepares for
this by making the distinction in the netdev and dpif layers.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agopackets: Create global helper is_ip_any().
Ethan Jackson [Wed, 23 Jan 2013 03:38:32 +0000 (19:38 -0800)]
packets: Create global helper is_ip_any().

Used outside of meta-flow in future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agodpif-netdev: Allow stub interfaces on the dummy datapath.
Ethan Jackson [Tue, 8 Jan 2013 22:37:23 +0000 (14:37 -0800)]
dpif-netdev: Allow stub interfaces on the dummy datapath.

Future patches will need to add netdevs to the dummy datapath which
can't actually send or receive packets.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Install drops for flows from invalid in_ports.
Ethan Jackson [Wed, 23 Jan 2013 23:38:10 +0000 (15:38 -0800)]
ofproto-dpif: Install drops for flows from invalid in_ports.

Before this patch, if a packet came in on a port which userspace
doesn't know about, it would be silently dropped without installing
a drop flow.  Historically, this has been fine because this
situation could only occur during transient reconfiguration
periods.  However, in future, this could occur when the tunneling
code decides to reject a packet due to invalid headers.  In this
case, it's preferable to drop the packet in the kernel to avoid a
high bandwidth stream of invalid packets DoSing the switch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Require an in_port when tracing datapath flows.
Ethan Jackson [Thu, 24 Jan 2013 01:05:54 +0000 (17:05 -0800)]
ofproto-dpif: Require an in_port when tracing datapath flows.

All datapath flows should have an in_port, so it doesn't make a lot
of sense to allow omitting it when tracing.  If a user wants to
trace a flow which has no in_port, they can use the OpenFlow syntax
which doesn't go through ofproto_receive().

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Use ofproto_receive() in update_stats().
Ethan Jackson [Fri, 25 Jan 2013 04:07:51 +0000 (20:07 -0800)]
ofproto-dpif: Use ofproto_receive() in update_stats().

This removes a bit of duplicate code, and will be necessary to
support future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoroute-table: Add route_table_wait() to the stub implementation.
Ethan Jackson [Fri, 25 Jan 2013 22:54:31 +0000 (14:54 -0800)]
route-table: Add route_table_wait() to the stub implementation.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agodatapath: Remove kernel patch ports.
Jesse Gross [Fri, 25 Jan 2013 22:17:49 +0000 (14:17 -0800)]
datapath: Remove kernel patch ports.

Now that userspace implements patch ports completely internally,
it's possible to remove the kernel implementation of them.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agodatapath: Remove compatibility GRE identifier.
Jesse Gross [Fri, 25 Jan 2013 22:12:44 +0000 (14:12 -0800)]
datapath: Remove compatibility GRE identifier.

We want to move the GRE vport ID into the upstream range but in
order to ease the transition kept the old ID around for one release.
This removes the old value.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agodatapath: Remove tunnel configuration sequence number.
Jesse Gross [Fri, 25 Jan 2013 21:53:57 +0000 (13:53 -0800)]
datapath: Remove tunnel configuration sequence number.

When tunnel header caching was in use, it was necessary to detect
configuration changes that would invalidate the cache.  This was
done using a sequence number on the configuration.  However, now
that header caching has been removed the sequence number is no
longer necessary.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agodatapath: Remove vport MAC address configuration.
Jesse Gross [Fri, 25 Jan 2013 21:42:01 +0000 (13:42 -0800)]
datapath: Remove vport MAC address configuration.

The ability to retrieve and set MAC addresses on vports is only
necessary for tunnel ports (the addresses for actual devices can be
retrieved through direct Linux mechanisms).  Tunnel ports only used
the information for the purpose of generating path MTU discovery
packets, which has now been removed.  Current userspace code already
reflects these changes, so this drops the functionality from the
kernel.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agodatapath: Remove tunnel path MTU discovery support.
Jesse Gross [Fri, 25 Jan 2013 20:44:00 +0000 (12:44 -0800)]
datapath: Remove tunnel path MTU discovery support.

Path MTU discovery can improve tunnel performance in some cases
but is non-standard and can introduce problems in others.  As a
result it has already been deprecated and removed from userspace.
This removes the corresponding kernel support to simplify the
code.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agodatapath: Remove support for Don't Fragment inheritance.
Jesse Gross [Fri, 25 Jan 2013 20:38:45 +0000 (12:38 -0800)]
datapath: Remove support for Don't Fragment inheritance.

Inheritance of the Don't Fragment bit in tunnels will not be
supported with flow based tunneling and has already been removed
from userspace.  This removes the corresponding kernel support.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
11 years agoFAQ: Add entry describing upgrade order between userspace and kernel.
Jesse Gross [Mon, 28 Jan 2013 18:23:42 +0000 (10:23 -0800)]
FAQ: Add entry describing upgrade order between userspace and kernel.

There will be significant changes for tunneling between 1.9 and 1.10
so this describes how to smoothly upgrade.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
11 years agoworker: Don't have worker abort when parent dies.
Justin Pettit [Sat, 26 Jan 2013 02:12:01 +0000 (18:12 -0800)]
worker: Don't have worker abort when parent dies.

Depending on how forcefully the parent process is killed, the worker
could abort when trying to read or write on their shared socket.  This
changes those errors from VLOG_ABORT to VLOG_FATAL so that a core isn't
generated.

Bug #14821

Reported-by: Amey Bhide <abhide@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agodatapath: Clear struct ovs_key_ipv4_tunnel padding.
Pravin B Shelar [Sat, 26 Jan 2013 02:09:07 +0000 (18:09 -0800)]
datapath: Clear struct ovs_key_ipv4_tunnel padding.

Following patch memset ovs_key_ipv4_tunnel padding area so that
packets from a flow would be mapped to same flow in kernel datapath
flow table.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #14843

11 years agoofproto: Maintain "expirable" list for "add" flow_mod with replaced rule.
Ben Pfaff [Sat, 26 Jan 2013 01:26:42 +0000 (17:26 -0800)]
ofproto: Maintain "expirable" list for "add" flow_mod with replaced rule.

Commit e503cc199 (ofproto: Optimise OpenFlow flow expiry) optimized
OpenFlow flow expiration by putting expirable flows on a list, but it
failed to remove flows from the list when they were replaced by a new
flow with an OpenFlow flow_mod "add" operation.  This commit fixes the
problem.

Found by valgrind.

CC: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofproto: Properly refresh rule modified time when nothing else changes.
Ben Pfaff [Fri, 25 Jan 2013 23:07:36 +0000 (15:07 -0800)]
ofproto: Properly refresh rule modified time when nothing else changes.

In Open vSwitch, a "modify" or "modify_strict" flow_mod is supposed to
refresh the flow's last-modified time even if nothing else changes, because
this interpretation makes the "learn" action more useful.  As commit
308881afb (ofproto: Reinterpret meaning of OpenFlow hard timeouts with
OFPFC_MODIFY.) notes:

    I finally found a good use for hard timeouts in OpenFlow, but they
    require a slight reinterpretation of the meaning of hard timeouts.
    Until now, a hard timeout meant that a flow would be removed the
    specified number of seconds after a flow was created.  Intervening
    modifications with OFPFC_MODIFY(_STRICT) had no effect on the hard
    timeout; the flow would still be deleted the specified number of
    seconds after its original creation.

    This commit changes the effect of OFPFC_MODIFY(_STRICT).  Now,
    modifying a flow resets its hard timeout counter.  A flow will time out
    the specified number of seconds after creation or after the last time
    it is modified, whichever comes later.

However, commit 080437614b (ofproto: Represent flow cookie changes as
operations too.) broke this behavior because it incorrectly optimized out
"modify" operations that didn't change the flow's actions or flow cookie.
This commit fixes the problem, and adds a test to prevent future
regression.

Thanks to Amar Padmanabhan <amar@nicira.com> for helping to track this
down.

Bug #14841.
Reported-by: Hiroshi Tanaka <htanaka@vmware.com>
CC: Amar Padmanabhan <amar@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agovconn: Initialize 'recv_any_version' member of struct vconn in vconn_init().
Ben Pfaff [Fri, 25 Jan 2013 23:18:48 +0000 (15:18 -0800)]
vconn: Initialize 'recv_any_version' member of struct vconn in vconn_init().

This uninitialized data caused failures in the test "ofproto -
eviction upon table overflow (OpenFlow 1.2)" for some developers and in
some circumstances.

Found by valgrind.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agolinux: Increase accuracy of ingress_policing_rate at low rates
Thomas Graf [Fri, 25 Jan 2013 19:13:55 +0000 (20:13 +0100)]
linux: Increase accuracy of ingress_policing_rate at low rates

The current method of calculating the ingress policer rate
can lead to inaccuracy if ingress_policing_rate is set to
a smallish values because the rate is divided by 8 first
which causes rounding errors.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agodpif-linux: Report dropped lost messages at WARN level.
Justin Pettit [Fri, 25 Jan 2013 22:29:41 +0000 (14:29 -0800)]
dpif-linux: Report dropped lost messages at WARN level.

Messages about packets being lost are logged at level WARN, but when
they were generated at a high rate, those consolidated messages were
logged at ERR.  This changes to consolidated messages to be logged at
WARN, too.

Thanks to Ben Pfaff for quickly suggesting the culprit.

Bug #14783

Reported-by: James Schmidt <jschmidt@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
11 years agorhel: Add OVSREQUIRES to automatically bring up OpenFlow interface dependencies
Thomas Graf [Fri, 25 Jan 2013 16:31:56 +0000 (17:31 +0100)]
rhel: Add OVSREQUIRES to automatically bring up OpenFlow interface dependencies

The use of OpenFlow controllers may require for a subset of
the network (typically the management network intrerface) to be
brought up before the openvswitch service is started.

The newly introduced key "OVSREQUIRES" allows to specify a
list of interfaces that need the be brought up before the
openvswitch service is autostarted. It is also possible to
build a chain of bridge dependencies.

TYPE=OVSBridge
OVSREQURIES="em1"
[...]

A special UPPEDSTACK var that is passed along avoids getting
lost in dependency loops.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agorhel: Automatically start openvswitch service before bringing an ovs interface up...
Thomas Graf [Fri, 25 Jan 2013 14:06:57 +0000 (15:06 +0100)]
rhel: Automatically start openvswitch service before bringing an ovs interface up or down

This patch modifies the ifup/ifdown scripts to automatically
start the openvswitch service before ovs-vsctl is invoked thus
not making it mandatory to auto-start openvswitch on boot.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agoofproto: Optimise OpenFlow flow expiry
Simon Horman [Tue, 15 Jan 2013 04:20:57 +0000 (13:20 +0900)]
ofproto: Optimise OpenFlow flow expiry

Optimise OpenFlow flow expiry by placing expirable flows on a list.
This optimises scanning of flows for expiry in two ways:

* Flows that will never expire are not traversed.

  This addresses a case seen in the field.  With 1,000,000 flows that
  are not expirable, this dramatically reduces CPU utilization to
  approximately zero.

* Empirically list traversal appears faster than the code it replaces.

  With 1,000,000 expirable flows present an otherwise idle system I
  observed CPU utilisation of around 20% with the existing code but
  around 10% with this new code.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
11 years agorconn: Fix null pointer dereference in rconn_add_monitor().
Ben Pfaff [Fri, 4 Jan 2013 20:41:01 +0000 (12:41 -0800)]
rconn: Fix null pointer dereference in rconn_add_monitor().

rconn_add_monitor() tries to check the version of the controller
connection being monitored, so that it can decide what OpenFlow version to
tell the monitor connection to negotiate.  But at any given time an rconn
may not have a controller connection (e.g. during backoff), so rc->vconn
may be null and thus vconn_get_version(rc->vconn) dereferences a null
pointer.

Fixing the problem in a local way would require the rconn to remember the
previous version negotiated, and that fails if the rconn hasn't yet
connected or if the next connection negotiates a new version.

This commit instead adds the ability to a vconn to accept any OpenFlow
message version and modifies "ovs-ofctl snoop" to use that feature, thus
removing the need to negotiate the "correct" version on snoops.

Bug #14265.
Reported-by: Pratap Reddy <preddy@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoovs-ofctl: Use vconn_open() instead of vconn_open_block() in open_vconn__().
Ben Pfaff [Fri, 4 Jan 2013 20:37:17 +0000 (12:37 -0800)]
ovs-ofctl: Use vconn_open() instead of vconn_open_block() in open_vconn__().

All of the paths in open_vconn__(), except the one path that calls
vconn_open() directly, just start the connection and do not block until
it completes.  This changes the remaining path to work the same way.

This will be important in an upcoming commit when in some cases we need to
take an action between opening and connecting.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agonetdev-dummy: Test LACP negotiation.
Ben Pfaff [Fri, 10 Aug 2012 22:18:36 +0000 (15:18 -0700)]
netdev-dummy: Test LACP negotiation.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Implement patch ports in userspace.
Ethan Jackson [Thu, 20 Dec 2012 23:32:03 +0000 (15:32 -0800)]
ofproto-dpif: Implement patch ports in userspace.

This commit moves responsibility for implementing patch ports from
the datapath to ofproto-dpif.  There are two main reasons to do
this.

The first is a matter of design:  ofproto-dpif both has more
information than the datapath, and is better suited to handle the
complexity required to implement patch ports.

The second is performance.  My setup is a virtual machine with two
basic learning bridges connected by patch ports.  I used
ovs-benchmark to ping the virtual router IP residing outside the
VM.  Over a 60 second run, "ovs-benchmark rate" improves from
14618.1 to 19311.9 transactions per second, or a 32% improvement.
Similarly, "ovs-benchmark latency" improves from 6ms to 4ms.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Refresh stats before ovs-appctl dpif/dump-flows.
Ethan Jackson [Tue, 15 Jan 2013 02:02:27 +0000 (18:02 -0800)]
ofproto-dpif: Refresh stats before ovs-appctl dpif/dump-flows.

As a matter of convenience, this patch refreshes the statistics
when ovs-appctl dpif/dump-flows is called.  Hopefully this will
prevent users from being confused because statistics they were
expecting to see haven't made it from the datapath into the switch
yet.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto-dpif: Scope revalidation state to dpif_backers.
Ethan Jackson [Sat, 22 Dec 2012 01:22:46 +0000 (17:22 -0800)]
ofproto-dpif: Scope revalidation state to dpif_backers.

Before this patch, the "need_revalidate" flag and the
"revalidate_set" tag_set where maintained separately for each
ofproto.  This won't work in future patches when a flow table
change in one ofproto can require revalidation in another entirely
separate ofproto.  For this reason, this patch scopes these flags
to the dpif_backers.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
11 years agoovsdb: Fix double-free in ovsdb_jsonrpc_session_close().
Ben Pfaff [Thu, 24 Jan 2013 20:27:53 +0000 (12:27 -0800)]
ovsdb: Fix double-free in ovsdb_jsonrpc_session_close().

ovsdb_session_destroy() was called twice but it should only be called once.

This double-free is unlikely to cause problems in practice because it only
triggers if there were ever more than two outstanding requests in the
session at a time (because the only data being freed is an hmap, which
does not allocate any heap memory unless the hmap has more than two
elements).

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoofproto: Avoid wild write removing OFPP_LOCAL port in dealloc_ofp_port().
Ben Pfaff [Thu, 24 Jan 2013 19:51:54 +0000 (11:51 -0800)]
ofproto: Avoid wild write removing OFPP_LOCAL port in dealloc_ofp_port().

Found by valgrind.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
11 years agoremove nonfinalized pltaps from sync list
Giuseppe Lettieri [Thu, 24 Jan 2013 14:42:00 +0000 (15:42 +0100)]
remove nonfinalized pltaps from sync list

This was causing 100% cpu usage due to immediate
wake-ups of the main loop.