sliver-openvswitch.git
10 years agoovs-xapi-sync: Make bridge-id caching logic easier to understand.
Ben Pfaff [Wed, 19 Jun 2013 17:49:36 +0000 (10:49 -0700)]
ovs-xapi-sync: Make bridge-id caching logic easier to understand.

The previous code had many subtleties that were easy to miss.  This code
is intended to be more obviously correct.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Gurucharan Shetty <shettyg@nicira.com>
10 years agotests: Add test-hindex to gitignore.
Ethan Jackson [Tue, 18 Jun 2013 20:54:53 +0000 (13:54 -0700)]
tests: Add test-hindex to gitignore.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-xapi-sync: Cache the bridge-id value for non nicira-bridge-id too.
Gurucharan Shetty [Sun, 16 Jun 2013 12:09:20 +0000 (05:09 -0700)]
ovs-xapi-sync: Cache the bridge-id value for non nicira-bridge-id too.

Currently we connect to xapi in case there are multiple
external_ids:xs-network-uuids to get the single bridge id everytime
we have a change in the database for all the interested columns in
ovs-xapi-sync. The xs-network-uuids value can also change whenever
new VLANs are added or deleted, which is a common use case. The
disadvantage with this approach is that we query XAPI more often
and set the bridge-id as "" if we don't get a valid response for
our query. This can take down the logical connectivity for all the
VMs on that xenserver.

Instead of looking at the PIF records for all the xs-network-uuids,
we can instead just look at the xapi record which has the same bridge
name as the OVS bridge name and then cache its uuid. This value will
hold true till the OVS bridge is recreated in which case we will re-read
the value.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoofproto-dpif: Store patch port peer in struct ofport_dpif.
Ethan Jackson [Mon, 17 Jun 2013 21:04:36 +0000 (14:04 -0700)]
ofproto-dpif: Store patch port peer in struct ofport_dpif.

This removes ofproto-dpif-xlate's dependency on ofport_get_peer()
which, while cleaner in-and-of itself, will become more important
as ofproto-dpif_xlate modularizes.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Reconfigure tunnel in port_modified().
Ethan Jackson [Mon, 17 Jun 2013 21:09:50 +0000 (14:09 -0700)]
ofproto-dpif: Reconfigure tunnel in port_modified().

This seems like the logical place to do it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agohmap: Use is_pow2() instead of open-coding it.
Ben Pfaff [Tue, 18 Jun 2013 16:55:02 +0000 (09:55 -0700)]
hmap: Use is_pow2() instead of open-coding it.

Also, SIZE_MAX + 1 is 0, which is not a power of 2, so the following assert
is redundant and this commit removes it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto: Index flows by cookie.
Jarno Rajahalme [Tue, 18 Jun 2013 16:48:14 +0000 (19:48 +0300)]
ofproto: Index flows by cookie.

The simplest way for an OpenFlow controller to refer to a (set of) flows
is by a controller-issued flow cookie.  Make this fast by inserting flows
to a hash index, and use that when flows are queried, deleted, or modified
with a full cookie mask.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agohindex: New data structure for hashed multimaps.
Ben Pfaff [Tue, 18 Jun 2013 17:27:34 +0000 (10:27 -0700)]
hindex: New data structure for hashed multimaps.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Don't wildcard fields used in special processing.
Justin Pettit [Tue, 18 Jun 2013 01:07:33 +0000 (18:07 -0700)]
ofproto-dpif: Don't wildcard fields used in special processing.

A number of fields are looked at when determining whether special
processing (slow-path) is needed.  This commit removes wildcarding when
they were consulted.

Reported-by: Ethan Jackson <ethan@nicira.com>
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agoofproto-dpif: Move process_special() to ofproto-dpif-xlate.c.
Justin Pettit [Tue, 18 Jun 2013 00:56:54 +0000 (17:56 -0700)]
ofproto-dpif: Move process_special() to ofproto-dpif-xlate.c.

The action translation functions are the only ones that need
process_special().  Move that function closer to the callers, since a
future commit will use more xlate-related knowledge in process_special.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoleak-checker: Remove because it cannot be made thread-safe.
Ben Pfaff [Tue, 23 Apr 2013 21:52:41 +0000 (14:52 -0700)]
leak-checker: Remove because it cannot be made thread-safe.

The underlying glibc interface is deprecated because the interface itself
is not thread-safe.  That means that there's no way for a layer on top of
it to be thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agobacktrace: Remove variant that does not support threads.
Ben Pfaff [Tue, 23 Apr 2013 20:41:32 +0000 (13:41 -0700)]
backtrace: Remove variant that does not support threads.

This variant was Linux-specific, GCC-specific, only worked on
architectures with frame pointers (possibly only on i386?), and isn't used
with glibc anyway.  Remove it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif-xlate: Hide MAX_RESUBMIT_RECURSION.
Ethan Jackson [Fri, 14 Jun 2013 01:10:00 +0000 (18:10 -0700)]
ofproto-dpif-xlate: Hide MAX_RESUBMIT_RECURSION.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto: Make handle_openflow's msg argument const.
Jarno Rajahalme [Mon, 17 Jun 2013 00:55:25 +0000 (03:55 +0300)]
ofproto: Make handle_openflow's msg argument const.

handle_openflow() must not modify the received message. Make this
explicit.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoovs-xapi-sync: Retry getting bridge-ids in case xapi is not ready.
Gurucharan Shetty [Fri, 14 Jun 2013 18:23:25 +0000 (11:23 -0700)]
ovs-xapi-sync: Retry getting bridge-ids in case xapi is not ready.

When there are multiple xs-network-uuids set for a bridge,
we query xapi to get the record that does not have a VLAN
associated with it. For cases when xapi does not respond,
retry again after a second.

During the times when xapi does not respond, set the value
as external_ids:bridge_id "".

Bug #17877.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoodp-util: Use proper formatting for ODP port number.
Jarno Rajahalme [Fri, 14 Jun 2013 14:09:34 +0000 (17:09 +0300)]
odp-util: Use proper formatting for ODP port number.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto: Fix use of uninitialized local variable.
Jarno Rajahalme [Fri, 14 Jun 2013 14:09:33 +0000 (17:09 +0300)]
ofproto: Fix use of uninitialized local variable.

Also make the table id arithmetic less confusing.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agotunnel: Don't wildcard TTL and TOS in some circumstances.
Justin Pettit [Thu, 13 Jun 2013 23:46:33 +0000 (16:46 -0700)]
tunnel: Don't wildcard TTL and TOS in some circumstances.

For tunnels, we need to handle the facet's wildcards specially in a
couple of cases:

    - Don't wildcard TTL for facets if "ttl" option is "inherit".
    - Never wildcard the ECN bits, since they are always inherited.
    - Wildcard the rest of the TOS field if the "tos" option is "inherit".

Issue #17911

Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agolib/netdev-linux.c: Prevent receiving of sent packets
Murphy McCauley [Thu, 13 Jun 2013 21:41:21 +0000 (14:41 -0700)]
lib/netdev-linux.c: Prevent receiving of sent packets

Commit 796223f5 (netdev: Add new "struct netdev_rx" for capturing packets
from a netdev) refactored send and receive into separate netdevs.  As a
result, send and receive now use different socket descriptors (except for tap
interfaces which are treated specially).  An unintended side effect was that
all sent packets are looped back and received, which had previously been
avoided as the kernel specifically prevents this from happening on a single
socket descriptor.

To resolve the situation, a socket filter is added to the receive socket
so that it only accepts inbound packets.

Simon Horman co-discovered and initially reported this issue.

Signed-off-by: Murphy McCauley <murphy.mccauley@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Simon Horman <horms@verge.net.au>
10 years agoofproto-dpif-xlate: Remove useless variable in patch port logic.
Ethan Jackson [Thu, 13 Jun 2013 19:51:05 +0000 (12:51 -0700)]
ofproto-dpif-xlate: Remove useless variable in patch port logic.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoovsdb-server: Preserve remotes across crash and restart.
Ben Pfaff [Thu, 13 Jun 2013 19:25:39 +0000 (12:25 -0700)]
ovsdb-server: Preserve remotes across crash and restart.

Commit b421d2af0ab (ovsdb-server: Add commands for adding and removing
remotes) made it possible to make ovsdb-server connect to OVS managers only
after ovs-vswitchd has completed its initial configuration.  But this
results in an undesirable effect: whenever ovsdb-server crashes, the
monitor restarts its, but ovsdb-server can no longer connect to the manager
because the remotes were added during runtime and that information is lost
during the crash.

This commit fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodatapath: make skb->csum consistent with rest of networking stack.
Pravin B Shelar [Wed, 12 Jun 2013 23:59:28 +0000 (16:59 -0700)]
datapath: make skb->csum consistent with rest of networking stack.

As suggested by Jesse in the comment for patch "gre: Restructure
tunneling", following patch keeps skb->csum correct across ovs.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
10 years agoofproto-dpif: Hide struct priority_to_dscp.
Ethan Jackson [Wed, 12 Jun 2013 22:01:11 +0000 (15:01 -0700)]
ofproto-dpif: Hide struct priority_to_dscp.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Hide struct dpif_backer.
Ethan Jackson [Wed, 12 Jun 2013 21:16:01 +0000 (14:16 -0700)]
ofproto-dpif: Hide struct dpif_backer.

This patch removes the last reference to dpif_backer from
ofproto-dpif-xlate, and moves it's definition into ofproto-dpif.c.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Verify backer in ofport_get_peer().
Ethan Jackson [Wed, 12 Jun 2013 21:09:57 +0000 (14:09 -0700)]
ofproto-dpif: Verify backer in ofport_get_peer().

This marginally simplifies the code, and removes a reference to
dpif_backer from ofproto-dpif-xlate.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agomac-learning: Simplify mac_learning_changed().
Ethan Jackson [Wed, 12 Jun 2013 20:58:16 +0000 (13:58 -0700)]
mac-learning: Simplify mac_learning_changed().

With this patch, the mac_learning module takes responsibility for
remembering tags which need revalidation after a
mac_learning_changed() call.  This removes one of
ofproto-dpif-xlate's dpif_backer uses.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofp-print: Avoid returning static data.
Ben Pfaff [Wed, 12 Jun 2013 21:49:19 +0000 (14:49 -0700)]
ofp-print: Avoid returning static data.

Returning a static data buffer makes code more brittle and definitely
not thread-safe, so this commit switches to using a caller-provided
buffer instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif-xlate: Make code more readable via 'flow' and 'wc' locals.
Ben Pfaff [Wed, 12 Jun 2013 21:37:18 +0000 (14:37 -0700)]
ofproto-dpif-xlate: Make code more readable via 'flow' and 'wc' locals.

'ctx->xin->flow' and 'ctx->xout->wc' are both pretty long.  Where it gets
in the way of code readability, this patch replaces them by 'xin' and
'xout' using local variables.

Also, replace an explicit comparison against IP and IPv6 Ethertypes by
a call to is_ip_any().

Co-authored-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif-xlate: Harmonize naming of internal functions.
Jarno Rajahalme [Wed, 12 Jun 2013 21:33:17 +0000 (14:33 -0700)]
ofproto-dpif-xlate: Harmonize naming of internal functions.

It would be good to be able to harminize the use of "xlate", "execute",
"compose", etc.  "xlate" clearly relates to the use of the various
translation context structures, but the distinction between "execute" and
"compose" is not that clear, so these names could be going either way.
Choose to go with "compose", keeping with the older tradition.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Check for MPLS depth at the flow.
Jarno Rajahalme [Fri, 31 May 2013 11:35:11 +0000 (14:35 +0300)]
ofproto-dpif: Check for MPLS depth at the flow.

The earlier check on base_flow.mpls_depth seemed wrong, as multiple
MPLS push actions would have resulted in the flow.mpls_depth being
set to 1 each time.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif-xlate: Hide 'struct xlate_ctx'.
Ethan Jackson [Wed, 12 Jun 2013 19:51:52 +0000 (12:51 -0700)]
ofproto-dpif-xlate: Hide 'struct xlate_ctx'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoextract-ofp-errors: Remove support for hexadecimal error types.
Ben Pfaff [Wed, 13 Feb 2013 00:24:53 +0000 (16:24 -0800)]
extract-ofp-errors: Remove support for hexadecimal error types.

This feature wasn't used and removing it slightly simplifies the code.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Pull xlate_actions() into its own file.
Ethan Jackson [Tue, 11 Jun 2013 20:32:30 +0000 (13:32 -0700)]
ofproto-dpif: Pull xlate_actions() into its own file.

Ideally, this patch would move xlate_actions() into it's own module
with a clearly defined regular interface which is minimally
dependent on ofproto-dpif.  While, I've done this in a prototype,
moving large amounts of code into a new file while simultaneously
changing the logic and keeping up with changes to master has proved
nearly impossible.

This patch takes a different approach.  It simply copies the logic
directly from ofproto-dpif with no changes.  Once this is in,
future patches can begin breaking the ties between
ofproto-dpif-xlate and ofproto-dpif proper.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Print slow path actions in dpif/dump-megaflows.
Justin Pettit [Wed, 12 Jun 2013 05:54:50 +0000 (22:54 -0700)]
ofproto-dpif: Print slow path actions in dpif/dump-megaflows.

It's often helpful to see what the slow path actions actual are.  Print
them when "ovs-appctl dpif/dump-megaflows" is called.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Use proper flow when using facets.
Justin Pettit [Wed, 12 Jun 2013 05:47:12 +0000 (22:47 -0700)]
ofproto-dpif: Use proper flow when using facets.

The handle_flow_miss_with_facet() function used the facet's flow
information instead of the missed flow.  This corrects that.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Never wildcard dl_type for "normal" action.
Justin Pettit [Wed, 12 Jun 2013 00:15:31 +0000 (17:15 -0700)]
ofproto-dpif: Never wildcard dl_type for "normal" action.

The is_gratuitous_arp() function is occasionally called when
processing the "normal" action.  The previous code only disabled
wildcarding the dl_type field when the function was called, but
since it runs occasionally, it could lead to inconsistencies in the
facet table.  This commit causes the dl_type to never be wildcarded
when the "normal" action is used.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Fix format specifier.
Ben Pfaff [Tue, 11 Jun 2013 20:42:12 +0000 (13:42 -0700)]
ofproto-dpif: Fix format specifier.

list_size() returns a size_t, not a uint64_t.

Found by GCC.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
10 years agoofproto-dpif: Retire 'struct initial_vals'.
Ethan Jackson [Thu, 6 Jun 2013 00:15:35 +0000 (17:15 -0700)]
ofproto-dpif: Retire 'struct initial_vals'.

By detecting that a port is a vlan splinter realdev, we can force
xlate_actions() to emit the appropriate vlan push action.  This
allows as to ditch struct initial_vals.  It will not be missed.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agortnetlink-link: Make 'attrs' local variable non-static.
Ben Pfaff [Tue, 23 Apr 2013 23:04:57 +0000 (16:04 -0700)]
rtnetlink-link: Make 'attrs' local variable non-static.

I don't see any reason for this variable to be static.

CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Store relevant fields for wildcarding in facet.
Justin Pettit [Wed, 15 May 2013 01:24:43 +0000 (18:24 -0700)]
ofproto-dpif: Store relevant fields for wildcarding in facet.

Dynamically determines the flow fields that were relevant in
processing flows based on the OpenFlow flow table and switch
configuration.  The immediate use for this functionality is to
cache action translations for similar flows in facets.  This yields
a roughly 80% improvement in flow set up rates for a complicated
flow table.

More importantly, these wildcards will be used to determine what to
wildcard for the forthcoming kernel wildcard (megaflow) patches
that will allow wildcarding in the kernel, which will provide
significant flow set up improvements.

The approach to tracking fields and caching action translations in
facets was based on an impressive prototype by Ethan Jackson.

Co-authored-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agoflow: Add new wildcard functions.
Ethan Jackson [Tue, 11 Jun 2013 05:48:58 +0000 (22:48 -0700)]
flow: Add new wildcard functions.

Rename the function flow_wildcards_combine() to flow_wildcards_and().
Add new flow_wildcards_or() and flow_hash_in_wildcards() functions.
These will be useful in a future patch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agoclassifier: Add 'wc' argument to classifier_lookup().
Ethan Jackson [Fri, 10 May 2013 02:15:54 +0000 (19:15 -0700)]
classifier: Add 'wc' argument to classifier_lookup().

A future commit will want to know what bits were significant during the
classifier lookup.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Co-authored-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agoflow: Add new flow_wildcards_fold_minimask() function.
Ethan Jackson [Fri, 10 May 2013 02:14:20 +0000 (19:14 -0700)]
flow: Add new flow_wildcards_fold_minimask() function.

This function will be useful in a future commit.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Co-authored-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agometa-flow: Fix comment describing mf_set_flow_value().
Justin Pettit [Sat, 1 Jun 2013 18:44:01 +0000 (11:44 -0700)]
meta-flow: Fix comment describing mf_set_flow_value().

An obvious copy/paste error.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
10 years agoodp-execute: Style fixes
Joe Stringer [Tue, 11 Jun 2013 02:05:55 +0000 (11:05 +0900)]
odp-execute: Style fixes

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoprocess: Add thread safety comments.
Ben Pfaff [Wed, 8 May 2013 22:02:45 +0000 (15:02 -0700)]
process: Add thread safety comments.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoprocess: Make signal handling thread-safe.
Ben Pfaff [Thu, 6 Jun 2013 23:26:34 +0000 (16:26 -0700)]
process: Make signal handling thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoprocess: Remove unused features from process_start().
Ben Pfaff [Wed, 8 May 2013 21:31:55 +0000 (14:31 -0700)]
process: Remove unused features from process_start().

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoprocess: Remove process_run(), process_run_capture(), and related code.
Ben Pfaff [Wed, 8 May 2013 21:46:30 +0000 (14:46 -0700)]
process: Remove process_run(), process_run_capture(), and related code.

They are unused.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
10 years agoofproto-dpif: Fix incorrect printf format specifiers.
Ben Pfaff [Mon, 10 Jun 2013 18:26:03 +0000 (11:26 -0700)]
ofproto-dpif: Fix incorrect printf format specifiers.

    cc1: warnings being treated as errors
    ../ofproto/ofproto-dpif.c: In function â€˜dpif_show_backer’:
    ../ofproto/ofproto-dpif.c:8305: error: format â€˜%llu’ expects type â€˜long
    long unsigned int’, but argument 4 has type â€˜size_t’
    ../ofproto/ofproto-dpif.c:8305: error: format â€˜%llu’ expects type â€˜long
    long unsigned int’, but argument 5 has type â€˜size_t’

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
10 years agonetdev-vport: Make netdev_vport_get_dpif_port() code less confusing.
Ben Pfaff [Mon, 15 Apr 2013 22:55:56 +0000 (15:55 -0700)]
netdev-vport: Make netdev_vport_get_dpif_port() code less confusing.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-util: Don't return static data in ofputil_packet_in_reason_to_string().
Ben Pfaff [Tue, 16 Apr 2013 22:13:21 +0000 (15:13 -0700)]
ofp-util: Don't return static data in ofputil_packet_in_reason_to_string().

Returning a static data buffer makes code more brittle and definitely
not thread-safe, so this commit switches to using a caller-provided
buffer instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoodp-util: Avoid returning static data in ovs_key_attr_to_string().
Ben Pfaff [Mon, 15 Apr 2013 22:40:21 +0000 (15:40 -0700)]
odp-util: Avoid returning static data in ovs_key_attr_to_string().

Returning a static data buffer makes code more brittle and definitely
not thread-safe, so this commit switches to using a caller-provided
buffer instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
10 years agoofp-actions: Add comments to struct ofpact_learn_spec.
Ben Pfaff [Mon, 10 Jun 2013 17:38:39 +0000 (10:38 -0700)]
ofp-actions: Add comments to struct ofpact_learn_spec.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ansis Atteka <aatteka@nicira.com>
10 years agoovsdb-idlc: Write a new-line at the end of "annotate" output.
Ben Pfaff [Mon, 10 Jun 2013 17:25:29 +0000 (10:25 -0700)]
ovsdb-idlc: Write a new-line at the end of "annotate" output.

Some tools do not like text files that lack a trailing new-line.  In
particular, Debian's dpkg-source utility complains about a missing new-line
in the file generated by ovsdb-idlc:

    dpkg-source: warning: file
    openvswitch-1.9.2+git20130605/lib/vswitch-idl.ovsidl has no final
    newline (either original or modified version)

This commit fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif-governor: Dispense with governor name.
Ethan Jackson [Fri, 7 Jun 2013 20:51:31 +0000 (13:51 -0700)]
ofproto-dpif-governor: Dispense with governor name.

In almost all cases, ovs-vswitchd runs with a single datapath, and
therefore a single governor.  Therefore, it's usually clear from
context what governor log messages are referring to making the name
redundant.  This patch removes it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Maintain subfacets in dpif_backer.
Ethan Jackson [Wed, 1 May 2013 01:32:02 +0000 (18:32 -0700)]
ofproto-dpif: Maintain subfacets in dpif_backer.

Conceptually, a subfacet represents a datapath flow key, and
therefore belongs more to a datapath more than it does to a bridge.
This patch moves the subfacet hmap from 'struct ofproto_dpif' to
'struct dpif_backer', simplifying the code in the process.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Set flow-eviction-threshold globally.
Ethan Jackson [Tue, 4 Jun 2013 20:22:46 +0000 (13:22 -0700)]
ofproto-dpif: Set flow-eviction-threshold globally.

With the single datapath, it no longer makes sense to have a per
ofproto flow eviction threshold.  This patch moves the flow
eviction threshold to the Open_vSwitch table making the setting
global, though still treated separately for each ofproto.  A future
patch will unify flow eviction on a per datapath basis.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto: Track subfacet stats in the backer.
Ethan Jackson [Tue, 4 Jun 2013 22:48:31 +0000 (15:48 -0700)]
ofproto: Track subfacet stats in the backer.

Subfacets being per-datapath entities, their statistics are really
only interesting at per-datapath granularity.  This patch moves
them to the dpif_backer and makes some related simplifications.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: More responsive average subfacet statistics.
Ethan Jackson [Thu, 30 May 2013 20:22:26 +0000 (13:22 -0700)]
ofproto-dpif: More responsive average subfacet statistics.

Before this patch, statistics about subfacet average life span,
and count in the datapath, were calculated over the entire lifetime
of the ofproto.  Furthermore, the subfacet lifespan was only
updated when a subfacet was removed from the datapath causing long
lived subfacets to be ignored.  It's far more useful to know these
numbers averaged over all subfacets in the recent past.  This patch
changes the code to implement an exponentially weighted moving
average updated every time statistics are pulled from the datapath.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agotimeval: Remove time_disable_restart(), time_enable_restart() functions.
Ben Pfaff [Fri, 12 Apr 2013 16:42:44 +0000 (09:42 -0700)]
timeval: Remove time_disable_restart(), time_enable_restart() functions.

These functions will not have the same useful effect when Open vSwitch
becomes multithreaded, because time_disable_restart() will disable time
advancing for every thread, not just for the thread that calls it.

These functions are no longer used, so this commit removes them.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agonetdev-vport: Don't return static data in netdev_vport_get_dpif_port().
Ben Pfaff [Wed, 1 May 2013 18:05:28 +0000 (11:05 -0700)]
netdev-vport: Don't return static data in netdev_vport_get_dpif_port().

Returning a static data buffer makes code more brittle and definitely
not thread-safe, so this commit switches to using a caller-provided
buffer instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agodpif-netdev: Don't run port names through netdev_vport_get_dpif_port().
Ben Pfaff [Thu, 6 Jun 2013 22:27:15 +0000 (15:27 -0700)]
dpif-netdev: Don't run port names through netdev_vport_get_dpif_port().

The ports that exist within a dpif have already been translated through
netdev_vport_get_dpif_port(), so there is no value to translating them
again in the interfaces that query or dump ports (and possibly a drawback
if somehow the translation could change).

After this change, dpif-netdev translates port names in just one place,
the port_add path, which makes dpif-netdev act the same way as dpif-linux
in this respect.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Actually log errors in facet_check_consistency()
Simon Horman [Wed, 5 Jun 2013 13:28:47 +0000 (13:28 +0000)]
ofproto-dpif: Actually log errors in facet_check_consistency()

facet_check_consistency() goes to some effort to create informative
error messages, protected by a rate limit, but does not actually
log these messages.

This appears to be an unintended side effect of
4dff90977694784e67e9c08cc72dee28ebc343ae ("ofproto-dpif: Move
odp_actions from subfacet to facet.").  This patch restores the
logging behaviour present prior to the above commit.

This patch also reverses a changes made by the same commit to use
ds_put_cstr() instead of ds_put_char() in facet_check_consistency().

Cc: Justin Pettit <jpettit@nicira.com>
Cc: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoroute-table: Make 'rtnl_sock' and 'attrs' local variables non-static.
Ben Pfaff [Tue, 23 Apr 2013 23:03:36 +0000 (16:03 -0700)]
route-table: Make 'rtnl_sock' and 'attrs' local variables non-static.

I don't see any reason for these to be static.

CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agonetdev-vport: Make 'iface' non-static in tunnel_get_status().
Ben Pfaff [Mon, 15 Apr 2013 22:33:43 +0000 (15:33 -0700)]
netdev-vport: Make 'iface' non-static in tunnel_get_status().

I don't see any reason for this to be static.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agotimeval: Do not block SIGALRM around setting 'deadline' in time_alarm().
Ben Pfaff [Thu, 9 May 2013 18:26:24 +0000 (11:26 -0700)]
timeval: Do not block SIGALRM around setting 'deadline' in time_alarm().

There is no need to do so because the signal handler does not read or
write 'deadline'.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agolockfile: Remove calls to time_disable_restart()/time_enable_restart().
Ben Pfaff [Fri, 12 Apr 2013 16:39:50 +0000 (09:39 -0700)]
lockfile: Remove calls to time_disable_restart()/time_enable_restart().

These calls are not necessary because F_SETLK does not block.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agosignals: Make thread-safe.
Ben Pfaff [Wed, 8 May 2013 22:30:05 +0000 (15:30 -0700)]
signals: Make thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoAlways update ethertype on mpls_pop
Simon Horman [Wed, 5 Jun 2013 05:28:52 +0000 (14:28 +0900)]
Always update ethertype on mpls_pop

The ethertype should always be updated on mpls_pop
as there may be a transition between MPLS unicast (0x8847) and
MPLS multicast (0x8848).

Ben Pfaff tells me that this is consistent with the
behaviour described in EXT-194 of the JIRA bug tracker.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Use execute_actions to execute controller actions
Simon Horman [Wed, 5 Jun 2013 05:28:50 +0000 (14:28 +0900)]
ofproto-dpif: Use execute_actions to execute controller actions

Now that execute_actions() is available it can be used as a generic
replacement for special-case action execution in
execute_controller_action().

As suggested by Jesse Gross.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoodp-execute: Add set skb_mark, set_priority, tunnel support.
Simon Horman [Wed, 5 Jun 2013 05:28:49 +0000 (14:28 +0900)]
odp-execute: Add set skb_mark, set_priority, tunnel support.

The motivation for this is to allow such actions to be honoured
if they are encountered; by the user-space datapath before recirculation;
or by internal processing of actions by ovs-vswitchd before recirculation.
Recirculation will be added by a subsequent patch.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoodp-util: Export odp_tun_key_from_attr()
Simon Horman [Wed, 5 Jun 2013 05:28:48 +0000 (14:28 +0900)]
odp-util: Export odp_tun_key_from_attr()

Rename tun_key_from_attr() as odp_tun_key_from_attr() and export it.
This is in preparation for calling this function outside of odp-util.c.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofp-actions: enforce valid range for table_id in goto_table instruction
Jing Ai [Wed, 5 Jun 2013 20:18:09 +0000 (13:18 -0700)]
ofp-actions: enforce valid range for table_id in goto_table instruction

Found a bug that OVS allows goto_table_id to be smaller than (or equal to)
the current table id where the flow resides. It potentially creates an
infinite loop when composing actions for a packet. To fix it, we just let
OVS returns an error message to prevent such flow to be programmed.

Signed-off-by: Jing Ai <jinga@google.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agolib: Restore build on FreeBSD
Ed Maste [Wed, 5 Jun 2013 20:22:20 +0000 (16:22 -0400)]
lib: Restore build on FreeBSD

It appears that the size_t definition was supplied through header leakage
on other platforms after commit eee8089cbeffa39eef3858be57628be663b229b7
(signals: Make signal_name() thread-safe.).

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agosignals: Make signal_name() thread-safe.
Ben Pfaff [Tue, 16 Apr 2013 22:25:10 +0000 (15:25 -0700)]
signals: Make signal_name() thread-safe.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agosignals: Use sys_siglist[] instead of strsignal() for thread-safety.
Ben Pfaff [Fri, 5 Apr 2013 04:29:59 +0000 (23:29 -0500)]
signals: Use sys_siglist[] instead of strsignal() for thread-safety.

strsignal() isn't thread-safe but sys_siglist[] is.  Also, according to
the glibc manual, BSD has sys_siglist[] but not strsignal().

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Do not give stats to rules bypassed by "drop" frag policy.
Ben Pfaff [Wed, 5 Jun 2013 17:11:55 +0000 (10:11 -0700)]
ofproto-dpif: Do not give stats to rules bypassed by "drop" frag policy.

When the OFPC_FRAG_DROP policy is in effect, IP fragments are supposed to
be dropped before they reach the flow table.  Open vSwitch properly dropped
IP fragments in this case, but still accounted them to the packet and byte
counters for the flow that they would have hit if the OFPC_FRAG_NX_MATCh
policy had been in effect.

Reported-by: love you <thunder.love07@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agopackets: Fix typo in reserved multicast Ethernet addresses.
Ben Pfaff [Tue, 28 May 2013 23:05:34 +0000 (16:05 -0700)]
packets: Fix typo in reserved multicast Ethernet addresses.

The reserved multicast Ethernet addresses begin with 01:80:c2, not
01:08:c2.

Reported-by: Padmanabhan Krishnan <kprad1@yahoo.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
10 years agoFix misspellings in comments and docs.
Andy Hill [Tue, 4 Jun 2013 22:35:36 +0000 (17:35 -0500)]
Fix misspellings in comments and docs.

Flagged with: https://github.com/lyda/misspell-check
Run with: git ls-files | misspellings -f -

Signed-off-by: Andy Hill <hillad@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto/pktbuf.c: Fix a typo in the comment
Alex Wang [Wed, 29 May 2013 20:57:22 +0000 (13:57 -0700)]
ofproto/pktbuf.c: Fix a typo in the comment

This patch fixes a typo in the comment of the pktbuf_retrieve() function.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agotestsuite: make a sed command more portable
YAMAMOTO Takashi [Tue, 4 Jun 2013 00:17:34 +0000 (09:17 +0900)]
testsuite: make a sed command more portable

avoid using some GNU sed extensions, which are not available
eg. on NetBSD's /usr/bin/sed.

while there are other places these extenstions are used in the testsuite,
this instance is new and seems the only one currently being executed
for NetBSD.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agobridge.c: Change variable "ofport" type in "struct if_cfg" and "struct iface"
Alex Wang [Tue, 4 Jun 2013 19:46:38 +0000 (12:46 -0700)]
bridge.c: Change variable "ofport" type in "struct if_cfg" and "struct iface"

This patch changes the variable type of "ofport" in "struct if_cfg" and
"struct iface" from int64_t to uint16_t. This is more consistent with
the OpenFlow-1.0 port definition.

Also, before this patch, -1 is used to indicate an unknown port. This
patch uses OFPP_NONE, since "ofport" becomes uint16_t.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoAlways use valid ids pointer in dec_ttl_cnt_ids_from_openflow()
Simon Horman [Mon, 3 Jun 2013 05:46:30 +0000 (14:46 +0900)]
Always use valid ids pointer in dec_ttl_cnt_ids_from_openflow()

Always update the ids pointer after calling ofpbuf_put()
to ensure that it is valid when accessed.

During testing a case came up where the call to ofpbuf_put() in the
for (i = 0; i < ids->n_controllers; i++) loop would cause the underlying
buffer to be reallocated. This resulted in ids->n_controllers being an
incorrect value, the loop continuing on longer than desired and finally a
segmentation fault.

Reported-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agocfm: Update netdev when changed.
Ethan Jackson [Mon, 3 Jun 2013 20:49:13 +0000 (13:49 -0700)]
cfm: Update netdev when changed.

If ofproto decided to change the netdev of a particular ofport,
cfm_demand mode would improperly continue using the old netdev to
collect stats.

Bug #17583.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agodatapath: fix variable names in comment
Lorand Jakab [Mon, 3 Jun 2013 15:43:37 +0000 (08:43 -0700)]
datapath: fix variable names in comment

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agoofproto-dpif.c: Modify vsp_realdev_to_vlandev() function
Alex Wang [Fri, 31 May 2013 01:24:44 +0000 (18:24 -0700)]
ofproto-dpif.c: Modify vsp_realdev_to_vlandev() function

Commit 52a90c29 (Implement new "VLAN splinters" feature) passed in OpenFlow
port number to vsp_realdev_to_vlandev() function which asks for datapath port
number.

This patch fixes this bug by making the vsp_realdev_to_vlandev() function
take in and return OpenFlow port number.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoINSTALL: Add documentaion for hot upgrades.
Gurucharan Shetty [Thu, 30 May 2013 09:07:15 +0000 (09:07 +0000)]
INSTALL: Add documentaion for hot upgrades.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-ctl.in: Restore flows with vswitchd packet processing disabled.
Gurucharan Shetty [Tue, 28 May 2013 13:21:56 +0000 (13:21 +0000)]
ovs-ctl.in: Restore flows with vswitchd packet processing disabled.

It has been observed that when we upgrade openvswitch with
thousands of openflow flows already established and there is heavy
traffic going through the switch, restoring flows can take a very
long time (8 minutes in one use case) with CPU running at 100%.
This can make the upgrade very expensive.

This commit starts vswitchd by asking it to wait till flow restore is
finished. Once the flows are restored, it resumes normal operations.

Bug #16086.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-ctl.in: Add manager after restoring flows.
Gurucharan Shetty [Tue, 28 May 2013 12:53:17 +0000 (12:53 +0000)]
ovs-ctl.in: Add manager after restoring flows.

Currently we are adding the manager after starting ovs-vswitchd.
Instead, add the manager after flow restore is completed.

Bug #16086.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoovs-vswitchd: An option to wait for userspace flow restore to complete.
Gurucharan Shetty [Tue, 28 May 2013 12:52:36 +0000 (12:52 +0000)]
ovs-vswitchd: An option to wait for userspace flow restore to complete.

While upgrading openvswitch, it helps to restore openflow flows before
starting packet processing.  Typically we want to restart openvswitch,
add the openflow flows and then start packet processing.

To do this, we look for the other_config:flow-restore-wait column
in the Open_vSwitch table during startup. If set as true, we disable
receiving packets from the datapath, expiring or flushing flows and
running any periodic ofproto activities. This option does not prevent
the addition and deletion of ports. Once this option is set to false,
we return to normal processing.

An upcoming commit will use this feature in Open vSwitch startup scripts.

Bug #16086.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoofproto-dpif: Simplify ofproto hit count tracking.
Ethan Jackson [Thu, 30 May 2013 20:32:26 +0000 (13:32 -0700)]
ofproto-dpif: Simplify ofproto hit count tracking.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Fix a typo
Alex Wang [Thu, 30 May 2013 21:37:57 +0000 (14:37 -0700)]
ofproto-dpif: Fix a typo

This patch fixes a typo in handle_miss_upcalls() function.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Remove useless odp_in_port from subfacet.
Ethan Jackson [Wed, 29 May 2013 23:05:06 +0000 (16:05 -0700)]
ofproto-dpif: Remove useless odp_in_port from subfacet.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoImplement duration fields in OpenFlow 1.3 port stats.
Ben Pfaff [Thu, 30 May 2013 19:49:59 +0000 (12:49 -0700)]
Implement duration fields in OpenFlow 1.3 port stats.

Signed-off-by: Ben Pfaff <blp@nicira.com>
10 years agoofproto-dpif: Consolidate facet stat logic.
Ethan Jackson [Wed, 29 May 2013 19:38:48 +0000 (12:38 -0700)]
ofproto-dpif: Consolidate facet stat logic.

The logic for updating statistics at the facet level had been
spread through ofproto-dpif in a rather confusing manner.  This
patch consolidates as much of this logic as is reasonable into
facet_push_stats().

On a side note, I'd expect this patch to have a marginal positive
performance impact when using learning (though I haven't bothered
to measure it).  It combines facet_learn() and facet_push_stats()
into one step allowing us to avoid a redundant xlate_actions().

Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Fix facet_lookup_valid().
Ethan Jackson [Wed, 29 May 2013 23:19:20 +0000 (16:19 -0700)]
ofproto-dpif: Fix facet_lookup_valid().

facet_lookup_valid() attempted to re-revalidate its facet after
it had been removed.  Added very recently in commit 5bf64ad
(ofproto-dpif: Avoid redundant facet_find() in
facet_lookup_valid()).

Found by inspection (by Justin).

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
10 years agoofproto-dpif: Don't count misses in OpenFlow table stats.
Jesse Gross [Sat, 25 May 2013 00:01:34 +0000 (17:01 -0700)]
ofproto-dpif: Don't count misses in OpenFlow table stats.

Originally no rule existed for packets that did not match an
OpenFlow flow and therefore every packet with a rule could be
counted as a hit. However, newer versions of OVS have hidden
miss rules so this is no longer true. To return the correct
table stats, this subtracts packets that hit the miss rule
from the total and removes the separate counter.

Reported-by: love you <thunder.love07@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
10 years agodebian: Don't fail ovs-controller restart if daemon not running.
Gurucharan Shetty [Wed, 29 May 2013 00:18:12 +0000 (17:18 -0700)]
debian: Don't fail ovs-controller restart if daemon not running.

Reported-by: Maxime Brun <m.brun@alphalink.fr>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
10 years agoofproto-dpif: Revamp xlate_actions() interface.
Ethan Jackson [Mon, 13 May 2013 18:18:21 +0000 (11:18 -0700)]
ofproto-dpif: Revamp xlate_actions() interface.

This patch implements a new interface to xlate_actions which, aside
from being simpler and more intuitive, achieves several goals.  It
pulls all of xlate_actions() results into a single structure which
will be easier to cache and pass around in future.  And it shields
xlate_ctx from the rest of the code, making it possible to factor
xlate_actions() in the future (hopefully).

Signed-off-by: Ethan Jackson <ethan@nicira.com>