Ansis Atteka [Fri, 11 Oct 2013 20:17:07 +0000 (13:17 -0700)]
ovsdb-doc: generate vswitch.[pic|gv] files only if dot tool is available
These are auto-generated files, so it would be better not to keep them
inside Open vSwitch repository.
Behaviour before this patch was that if dot tool was not present on
the system, then ovs-vswitchd.conf.db.5 would have used pre-generated
vswitch.pic file that was already checked in the git repository. After
this patch ovs-vswitchd.conf.db.5 will simply not have a dot diagram,
if dot was not present at the time when Open vSwitch was built.
Jarno Rajahalme [Wed, 16 Oct 2013 23:16:03 +0000 (16:16 -0700)]
include/openflow: Move union ofp_action away from headers.
union ofp_action cannot remain in the OF 1.0 header as it is expanded
to include actions from later versions. Also, it is not part of the
protocol interface and will be easier to update where it is actually
used.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-dpctl: Add a 'filter' option to match wildcarded 'dump-flows'.
With mega-flows, many flows in the kernel datapath are wildcarded.
For someone that is debugging a system and wants to find a particular
flow and its actions, it is a little hard to zero-in on the flow
because some fields are wildcarded.
With the filter='$filter' option, we can now filter on the o/p
of 'ovs-dpctl dump-flows'.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Wed, 16 Oct 2013 03:32:34 +0000 (03:32 +0000)]
ofproto-dpif-monitor: Use heap to order the mport wakeup time.
Before this commit, each time ofproto-dpif-monitor thread wakes up,
all monitored ports will be iterated over. This adds a huge overhead
to the monitor thread. This commit uses a heap to order the wakeup
time of monitored ports. So each time the monitor thread is waken up,
it will only iterate those monitored ports that have timed out.
This commit greatly increases the number of monitored interfaces
openvswitch could support.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Wed, 16 Oct 2013 03:32:30 +0000 (03:32 +0000)]
ofproto-dpif-monitor: Run ofproto-dpif-monitor in a thread.
This commit moves the ofproto-dpif-monitor module into a
dedicated thread. This helps eliminate the burden of main
thread having to wake up very frequently for periodic
interface monitoring (bfd, cfm). Thusly, this commit greatly
increases the number of bfd/cfm sessions that can be supported
by ovs.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Wed, 16 Oct 2013 03:32:29 +0000 (03:32 +0000)]
tests: Relax the requirement of bfd tests on timing.
Before this commit, the bfd related tests check the change of
states with very strict timing requirement. This makes the tests
fragile, especially when ofproto-dpif-monitor module is moved to
its own thread.
Thusly, this commit relaxes the requirement on timing, making the
tests more reliable.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
The combination of two commits:
commit 8e4e1713e4
("openvswitch: Simplify datapath locking.")
commit 2537b4dd0a
("openvswitch:: link upper device for port devices")
introduced a bug where upper_dev wasn't unlinked upon
netdev_unregister notification
The following steps:
modprobe openvswitch
ovs-dpctl add-dp test
ip tuntap add dev tap1 mode tap
ovs-dpctl add-if test tap1
ip tuntap del dev tap1 mode tap
This patch also affects moving devices between net namespaces.
OVS used to ignore netns move notifications which caused problems.
Like:
ovs-dpctl add-if test tap1
ip link set tap1 netns 3512
and then removing tap1 inside the namespace will cause hang on missing dev_put.
With this patch OVS will detach dev upon receiving netns move event.
ofproto: Re-use port numbers of ports that were deleted an hour ago.
We have a least recently used algorithm for assigning ofport values
to newly created ports. i.e., when we don't have any unused ofport
numbers, we use ofport numbers from the oldest deleted port.
What this means is that after using ~65000 previously unused ofport
numbers, we will have to go through all of the possible ports
to see which one was least recently used. This will eventually
slow down ofport allocation.
With this commit, any port that was deleted more than an hour ago is
considered never to have been used. So it's ofport number becomes
free to be used.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Wed, 16 Oct 2013 10:17:01 +0000 (19:17 +0900)]
netdev-dummy: Count rx packets regardless of source
This alters the way rx packets are accounted for by
counting them when they are processed by netdev_dummy_rx_recv(),
which seems to be a common path used by all received packets.
Previously accounting was done earlier, in netdev_dummy_receive(),
however this does not appear to count packets that are received via
a socket.
This resolves packet counting errors reported by the following
OFtest tests:
Jarno Rajahalme [Tue, 15 Oct 2013 19:40:38 +0000 (12:40 -0700)]
Set datapath mask bits when setting a flow field.
Since at the datapath interface we do not have set actions for
individual fields, but larger sets of fields for a given protocol
layer, the set action will in practice only ever apply to exactly
matched flows for the given protocol layer. For example, if the
reg_load changes the IP TTL, the corresponding datapath action will
rewrite also the IP addresses and TOS byte. Since these other field
values may not be explicitly set, they depend on the incoming flow field
values, and are hence all of them are set in the wildcards masks, when
the action is committed to the datapath. For the rare case, where the
reg_load action does not actually change the value, and no other flow
field values are set (or loaded), the datapath action is skipped, and
no mask bits are set. Such a datapath flow should, however, be
dependent on the specific field value, so the corresponding wildcard
mask bits must be set, lest the datapath flow be applied to packets
containing some other value in the field and the field value remain
unchanged regardless of the incoming value.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Tue, 15 Oct 2013 19:40:37 +0000 (12:40 -0700)]
meta-flow: Add mf_mask_field_and_prereqs().
Sets mask bits for the given field and its prerequisite fields.
Needed for unwildcarding the proper bits from datapath masks.
Removed old prototype for mf_force_prereqs().
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Fri, 11 Oct 2013 19:40:13 +0000 (12:40 -0700)]
vxlan: Optimize vxlan rcv
vxlan-udp-recv function lookup vxlan_sock struct on every packet
recv by using udp-port number. we can use sk->sk_user_data to
store vxlan_sock and avoid lookup.
This commit also allows us to get rid of socket hash table.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Alex Wang [Tue, 15 Oct 2013 05:12:59 +0000 (22:12 -0700)]
tests: Make ovsdb-server add/remove remote test faster and more reliable.
Until now, the "ovsdb-server/add-remote and remove-remote with --monitor"
test killed ovsdb-server with SIGSEGV twice. Each time, the "--monitor"
option caused the supervisor process to restart the child, but the second
time it incurred a 10-second delay intended to prevent the daemon from
wasting CPU time by restarting itself and dying again very quickly in a
loop. This made the test take over 10 seconds to execute. It also made
it occasionally fail because the OVS_WAIT_UNTIL check waits at most
approximately 10 seconds before it decides that the condition that it is
testing for will never occur.
This commit fixes the problem by breaking the test into two tests, each of
which kills ovsdb-server with SIGSEGV only once.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Fri, 11 Oct 2013 04:23:29 +0000 (13:23 +0900)]
Add support for write-actions
Implementation note:
All actions which modify a field are added to the action set
at the point where "set" actions should be added. In general
modifying a field many times is the same as only modifying it
the last time so the implementation simply adds all set actions to
the action set in the order they are specified. However, this breaks
down if two actions modify different portions of the same field.
Some examples.
1. load acting a subfield
2. mod_vlan_vid, mod_vlan_pcp
If this is considered to be a problem one possible solution would be to
either disallow all set actions other than set_field in write_actions.
Another possible solution is prohibit problematic the actions listed above
in write actions.
Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com simplified and edited the code] Signed-off-by: Ben Pfaff <blp@nicira.com>
Commit 91d6cd12 (ofproto-dpif: Move send_packet() to
ofproto-dpif-xlate module.) introduced a bug that frees the "struct
ofpbuf" in 'xout' when the struct is not initialized. This commit
fixes the bug.
Reported-by: Simon Horman <horms@verge.net.au> Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Fri, 11 Oct 2013 06:11:09 +0000 (23:11 -0700)]
connmgr: Formalize 'ofproto_mutex' as protecting ofconn monitor data.
'ofproto_mutex' has effectively protected the monitor-related members of
struct ofconn since its introduction, but this was not written down or
systematically annotated. This commit makes it more systematic and fixes
a few issues found using the annotations.
Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Fri, 11 Oct 2013 17:04:32 +0000 (10:04 -0700)]
connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.
Code in the ofproto-dpif miss handler threads can currently access
ofconns, sending flow_removed and flow monitor messages due to NXAST_LEARN
actions. Nothing currently protects those threads from accessing ofconns
that are in the process of being destroyed. This commit adds protection
'ofproto_mutex', which NXAST_LEARN already takes.
Later patches will address other races that remain.
Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Thu, 10 Oct 2013 00:37:30 +0000 (17:37 -0700)]
Add software switch support for modifying ARP headers in OpenFlow.
This support is added through the userspace slow path, because we don't
judge that this is important enough to require permanent support in the
Linux kernel ABI.
Bug #19259. CC: Teemu Koponen <koponen@nicira.com> CC: Pankaj Thakkar <thakkar@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Thu, 10 Oct 2013 00:28:05 +0000 (17:28 -0700)]
dpif: Support working around actions that a datapath does not support.
Until now, OVS has expected that the datapath supports all the actions
required by any flow to be installed. There are at least two reasons why
a datapath might not support a given action:
- The datapath version is older than the userspace version, and the
action was introduced after the version of the datapath in use.
- The action is not considered important enough to implement as part of
an ABI that must be maintained forever.
This commit adds infrastructure to handle these cases. It doesn't actually
add any uses; that will come in an upcoming commit.
Ben Pfaff [Fri, 20 Sep 2013 19:54:51 +0000 (12:54 -0700)]
odp-util: Make it possible to combine slow path reasons.
It will soon be possible for a single flow to be slow pathed for multiple
reasons. This commit makes it possible to indicate more than one reason
to slow path a flow.
This commit is logically a revert of commit 98f0520fb2 (odp-util: Make
slow_path_reasons mutually exclusive.) but details have changed.
Ben Pfaff [Mon, 23 Sep 2013 17:24:05 +0000 (10:24 -0700)]
ofproto-dpif-upcall: Make miss handlers accumulate coverage counters.
The miss handler threads do not call poll_block(), which calls
coverage_clear() indirectly. This meant that coverage counters incremented
by miss handler threads never got integrated into the global coverage
counters and therefore did not show up in coverage logging or
"ovs-appctl coverage/show" output. This commit fixes the problem.
Ben Pfaff [Mon, 23 Sep 2013 17:13:54 +0000 (10:13 -0700)]
timeval: Call coverage_clear() before coverage_log() in time_poll().
time_poll() calls log_poll_interval(), which in some circumstances calls
coverage_log(). Before this commit, time_poll() also called
coverage_clear() after log_poll_interval(). This made sense before commit 857165b5fd26 (coverage: Make thread-safe.), because coverage_log() would
log the most recent main loop's coverage counters separately and calling
coverage_clear() beforehand would zero out those counters. However, it
doesn't make sense any longer because the most recent loop's counters are
no longer separately logged and in fact this practice now means that the
most recent loop's counters are omitted from the logged counters.
Therefore, this commit moves the call to coverage_clear() earlier, so that
the most recent loop's counters are included.
Ethan Jackson [Wed, 9 Oct 2013 20:23:31 +0000 (13:23 -0700)]
ofproto-dpif-xlate: Do initial rule lookup for callers.
None of the functions available in ofproto-dpif.h are thread safe
unless holding the xlate_rwlock because one can't know that an ofproto
or ofport used as argument will survive during the function call. For
this reason, ofproto-dpif-upcall's invocation of rule_dpif_lookup()
is unsafe because the ofproto could be destroyed during the call.
This patch fixes the problem by optionally doing the initial rule
lookup in xlate_actions() so that it can be done while holding the
xlate_rwlock. This has the nice side benefit of removing a bunch of
boilerplate.
Note that this only partially solves the problem, there's still
vsp_realdev_to_vlandev() and ofproto_dpif_send_packet_in() which
aren't thread safe for the same reason.
This commit adds a new module ofproto-dpif-monitor in ofproto
directory. This module is in charge of executing the periodic
functions of monitoring code (e.g. bfd and cfm).
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Wed, 9 Oct 2013 04:30:36 +0000 (04:30 +0000)]
timeval: Wake up all threads when time is warped.
This commit makes the main thread wake up all other threads when time is
warped.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Wed, 9 Oct 2013 04:30:35 +0000 (04:30 +0000)]
tests: Remove the unit test for "ovs-appctl coverage/show".
Changes will be made to allow "ovs-appctl time/warp" wake up all
threads. With that, all threads will try calling "coverage_run()".
And it will be impossible to deterministically check the output of
the "ovs-appctl coverage/show" command. Thus, this commit removes
the unit test for the coverage/show command.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Wed, 9 Oct 2013 04:30:33 +0000 (04:30 +0000)]
ofproto-dpif: Move send_packet() to ofproto-dpif-xlate module.
This commit moves the main logic of send_packet() function into
the ofproto-dpif-xlate module. Also, modification is made to
guarantee the thread safety of ofproto-dpif-xlate module.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
ovs-lib: Return the correct exit status of the command 'status'
commit 46528f78e5c(debian, rhel, xenserver: Ability to collect ovs-ctl logs)
made changes in the startup scripts such that the o/p of ovs-ctl is logged
into ovs-ctl.log. But it had an unintended consequence that the exit status
of ovs-ctl was no longer returned. We would always return success(the exit
status of tee).
With this commit, we return the exit status of ovs-ctl instead of tee.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
ovs-lib: Revert "Return the exit status of ovs-ctl in ovs_ctl()."
This reverts commit 9d46457e07ca which had a side-effect that
ssh executing start/restart command on a remote machine would
hang as one of the file descriptors created in that commit
was getting passed along to the daemons. The daemons weren't closing
it and hence ssh would just wait for them to close and hang.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
If we allow oversize datapath actions to make it out of translation, then
we will assert-fail later when we try to put those actions into a Netlink
attribute.
Bug #19277. Reported-by: Paul ingram <paul@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
Ben Pfaff [Fri, 4 Oct 2013 15:47:16 +0000 (08:47 -0700)]
ofproto-dpif-xlate: Limit memory and time that translation can consume.
The resubmit depth has been limited to MAX_RESUBMIT_RECURSION, currently
64, for a long time. But the flow "actions=resubmit:1, resubmit:2,
output:1" generates about 2**MAX_RESUBMIT_RECURSION output actions,
exhausting memory. This commit fixes the problem.
Such a flow also requires 2**MAX_RESUBMIT_RECURSION time for translation.
This commit fixes that problem too.
Bug #19277. Reported-by: Paul Ingram <paul@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
Pravin B Shelar [Thu, 3 Oct 2013 20:49:31 +0000 (13:49 -0700)]
datapath: Move mega-flow list out of rehashing struct.
ovs-flow rehash does not touch mega flow list. Following patch
moves it dp struct datapath. Avoid one extra indirection for
accessing mega-flow list head on every packet receive.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Over the time datapath.c and flow.c has became pretty large files.
Following patch restructures functionality of component into three
different components:
Duffie Cooley [Wed, 2 Oct 2013 14:07:43 +0000 (07:07 -0700)]
ovs-lib: Return the exit status of ovs-ctl in ovs_ctl().
commit 46528f78e5c(debian, rhel, xenserver: Ability to collect ovs-ctl logs)
made changes in the startup scripts such that the o/p of ovs-ctl is logged
into ovs-ctl.log. But it had an unintended consequence that the exit status
of ovs-ctl was no longer returned. We would always return success(the exit
status of tee).
With this commit, we return the exit status of ovs-ctl instead of tee.
Code referenced from: (line wrapped).
http://unix.stackexchange.com/questions/14270/\
get-exit-status-of-process-thats-piped-to-another/70675#70675)
ovs-dpctl, ofproto/trace: Show and handle the in_port name in flows.
With this commit, whenever the verbosity is enabled with '-m'
option, the ovs-dpctl dump-flows command will display the flows with
in_port field showing the name instead of a port number.
Conversely, one can also use a name in the in_port field with del-flow,
add-flow and mod-flow commands of ovs-dpctl. One should also be able
to use the port name when supplying the datapath flow as an input
to ofproto/trace command.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
stream: Log a warning when the default OpenFlow or OVSDB port is used.
Both OpenFlow and OVSDB have new IANA-assigned port numbers. We still
default to the original values (6633 and 6632, respectively), but this
commit logs a warning. In the future, we will switch to the official
values (6653 and 6640, respectively).
Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Don't differentiate between TCP and SSL ports for OpenFlow and OVSDB.
The OVS code has always made a distinction between the unencrypted (TCP)
and SSL port numbers for the OpenFlow and OVSDB protocols. The default
port numbers for both protocols has changed, and there continues to be
no distinction between the unencrypted and SSL versions. This
commit removes the distinction in port numbers. A future patch will
recognize the change in default port number.
Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Tue, 1 Oct 2013 15:24:55 +0000 (08:24 -0700)]
datapath: Fix vxlan gso with vlan.
To use ovs-gso-compatibility we need to record inner skb offset.
In case of vxlan it is done before vlan header is pushed which
gives wrong inner packet to ovs-gso.
Following patch reset skb offsets after inner skb is completely built.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
Alex Wang [Tue, 1 Oct 2013 01:32:44 +0000 (18:32 -0700)]
ofproto-dpif: Compute the subfacet add/del rate using coverage counters.
So far, the subfacet rates (e.g. add rate, del rate) are computed by
exponential moving averaging function in ofproto-dpif.c. This commit
replaces that logic with coverage counters. And the rates can be
checked by running "ovs-appctl coverage/show" command.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Alex Wang [Tue, 1 Oct 2013 01:31:44 +0000 (18:31 -0700)]
coverage: Reimplement the "ovs-appctl coverage/show" command.
This commit changes the "ovs-appctl coverage/show" command to show the
the averaged per-second rates for the last few seconds, the last minute
and the last hour, and the total counts of all of the coverage counters.
Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Simon Horman [Tue, 1 Oct 2013 06:15:22 +0000 (15:15 +0900)]
ofproto-dpif: Correct endian problem in recv_upcalls()
Use nl_attr_get_u32() instead of nl_attr_get_be32() to parse nla
so that the decoded value which is passed to mhash_add()
is host byte order as mhash_add() expects.
This resolves a minor regression introduced by 10e576406c7444ef ("ofproto-dpif: Move special upcall handling into
ofproto-dpif-upcall.").
I do not expect this change has any runtime implications.
Detected using sparse.
Cc: Ethan Jackson <ethan@nicira.com> Cc: Ben Pfaff <blp@nicira.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Tue, 24 Sep 2013 22:04:04 +0000 (15:04 -0700)]
ofproto-dpif: Move special upcall handling into ofproto-dpif-upcall.
Both the IPFIX and SFLOW modules are thread safe, so there's no
particular reason to pass them up to the main thread. Eliminating
this step significantly simplifies the code.
Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Shih-Hao Li [Fri, 27 Sep 2013 20:15:27 +0000 (13:15 -0700)]
ovs-bugtool: Change log-days parameter based on file last_mod_time.
Previously the log-days parameter can only support rotated logs
based on their numbered filename extension. Thus it can not be
used for other types of log filenames. This patch changes it to
be based on file last modification time.
Issue: #19671
Signed-off-by: Shih-Hao Li <shihli@vmware.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Simon Horman [Thu, 26 Sep 2013 21:55:19 +0000 (06:55 +0900)]
Remove mpls_depth field from flow
Rather than tracking the MPLS depth as a field in the
flow, which is an entirely poor place for it, just track
the delta to the MPLS depth during translation.
This logic was developed while implementing recirculation
and intended to be used to detect when recirculation should
occur. This variant of the patch uses the logic to determine
if processing of actions should stop due to an MPLS
action which cannot be translated (without recirculation).
A side-effect of this patch is that it resolves a bug
whereby ovs-vswitchd will abort due to to an assertion
on eth_type_mpls(ctx->xin->flow.dl_type) in compose_mpls_pop_action(()
if the actions of a flow include pop_mpls twice without
a push_mpls in between.
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
If there is a lot of churn in creation and deletion of
interfaces, we may end up recycling the ofport value of a
recently deleted interface for a newly created interface.
This may result in an old stale openflow rule applying
on the newly created interface.
With this commit, when a new port is added, try and provide
it an ofport value that has not been used during the current
run. If such value does not exist, provide the least
recently used ofport value.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>