ovs-ofctl: Ability to read a hex string from file.
The unit test, "OFPST_TABLE reply - OF1.2" in ofp-print.at
sends a very large hex string as an argument to 'ovs-ofctl ofp-print'.
The length of the hex string exceeds the maximum command line length
in Windows. With this commit, we can pass the same hex string by
placing it inside a file.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
ovsdb-tool: Workaround inability to replace existing file on Windows.
rename() on an existing destination file fails on Windows. This commit
worksaround that problem.
There are two tests that test it. But both of them use the ovsdb-server's
--run option for the test and it does not exist in Windows. So change
the test to workaround the lack of that feature.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
ovsdb-server.at: Handle different error message for already opened database.
Commit ebed9f78(ovsdb-server: Improve message for "add-db" of
database already open.) improved the error message seen when
opening an already opened database on Linux. For Windows,
we still need to look for the lockfile error message.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
sflow feature needs to be investigated for Windows. Right now
test-sflow related tests do not pass because of LOOPBACK_INTERFACE
constraints for 'agent'. Add a TODO item and skip the tests.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
file_name.at: Skip a symlink related test for Windows.
There is no one-one mapping of symlinks between Linux and
Windows. This test currently fails on Windows and we do not
really need this functionality on Windows. So skip it.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl.at: Prevent msys from getting confused with ipv6 address.
msys has a set of rules which triggers an automatic conversion of
arguments into something else to suit Windows requirements. Sometimes
this also causes unwanted conversions. Details of the rules is here:
http://www.mingw.org/wiki/Posix_path_conversion
msys converts ::1/::1 into ;1\;1. To prevent this, use fullform
ipv6 address of the form 0:0:0:0:0:0:0:1 instead.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
rconn: Don't warn when peer abruptly closes connection.
On Windows, when a peer terminates without calling a close
on socket fd, the server ends up printing "connection dropped"
warning messages. We probably don't want those warning messages
when the error is WSAECONNRESET.
(In OVS unit tests on Windows, anytime a client like ovs-ofctl
calls a ovs_fatal without clean close(fd) on the socket, the
server like ovs-vswitchd prints warnings that cause unit tests
to fail.)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
For this particular test, we pass the PKIDIR through a
ovsdb-tool transact and msys does not convert the path style.
(On Windows, we have to pass the directory in the form C:/foo/bar.pem.)
So get the Windows style path through 'pwd -W'(which is called through
the function pwd ())
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
stream-tcp: Cleanup files created for Windows "unix" sockets.
On Windows, we create "unix sockets" by creating TCP sockets
and hiding the TCP port number in files. When we close the
pstream session, we need to delete the file.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Fri, 13 Jun 2014 17:38:05 +0000 (10:38 -0700)]
lib/classifier: Optimize megaflows for single rule case.
When, during a classifier lookup, we narrow down to a single potential
rule, it is enough to match on ("unwildcard") one bit that differs
between the packet and the rule.
This is a special case of the more general algorithm, where it is
sufficient to match on enough bits that separates the packet from all
higher priority rules than the matched rule. For a miss that would be
all the rules. Implementing this is expensive for a more than a few
rules. This patch starts by doing this for a single rule when we
already have it, also reducing the lookup cost by finishing the lookup
earlier than before.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Jarno Rajahalme [Thu, 26 Jun 2014 14:41:25 +0000 (07:41 -0700)]
lib/pvector: Non-intrusive RCU priority vector.
Factor out the priority vector code from the classifier.
Making the classifier use RCU instead of locking requires parallel
access to the priority vector, pointing to subtables in descending
priority order. When a new subtable is added, a new copy of the
priority vector is allocated, while the current readers can keep on
using the old copy they started with. Adding and removing subtables
is usually less frequent than adding and removing rules, so this
should not have a visible performance implication. As an optimization
for the userspace datapath use, where all the subtables have the same
priority, new subtables can be added to the end of the vector without
reallocation and without disturbing readers.
cls_subtables_reset() is now removed, as it served its purpose in bug
hunting. Checks on the new pvector are now incorporated into
tests/test-classifier.c.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Mon, 23 Jun 2014 23:46:31 +0000 (08:46 +0900)]
ofproto-dpif: MPLS recirculation
In some cases an pop MPLS action changes a packet to be a non-mpls packet.
In this case subsequent any L3+ actions require access to portions
of the packet which were not decoded as they were opaque when the
packet was MPLS. Allow such actions to be translated by
first recirculating the packet.
Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
Ryan Wilson [Mon, 23 Jun 2014 19:36:11 +0000 (12:36 -0700)]
dpif-netdev: Implement batched flow dumping.
Previously, flows were retrieved one by one when dumping flows for
datapaths of type 'netdev'. This increased contention for the dump's
mutex, negatively affecting revalidator performance.
This patch retrieves batches of flows when dumping flows for datapaths
of type 'netdev'.
Signed-off-by: Ryan Wilson <wryan@nicira.com>
[blp@nicira.com relaxed max_flows restriction] Signed-off-by: Ben Pfaff <blp@nicira.com>
dpif-netdev: Delete packet if not able to do upcall
In dp_netdev_input() we nevered fully covered the case where handler queues are
not there.
With this change we increment the stat counter and free the packet.
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
netdev-dpdk: Disable NIC offloading and multiseg mbufs
We do not use any offloading (now) or multiple segments per packet, so
we might as well disable those features while configuring the NIC.
This could give performance improvements. For ixgbe, for example, this change
allows the driver to use a simpler tx routine, resulting in throuput
improvements (~7.5%)
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
netdev-dpdk: Fix coding style in TX/RX conf structs
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
netdev-dpdk: Count and delete every dropped packet
Commit f4fd623c4c25 introduced a bug in netdev_dpdk_send(): if multiple
consecutive packets exceed MTU, only the first one is deleted and
counted.
This should fix the bug
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Pravin B Shelar [Tue, 24 Jun 2014 20:00:52 +0000 (13:00 -0700)]
lib: Rename ofp to buf.
dpif-packet contains ofpbuf which points to packet data. Here buf
is better name rather than ofp.
Following patch renames all remaining instances of ofp variable.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Jesse Gross [Wed, 25 Jun 2014 01:28:08 +0000 (18:28 -0700)]
datapath: Rehash 16-bit skbuff hashes into 32 bits.
Currently, if the network stack provides skb->rxhash then we use it,
otherwise we compute our own. However, on at least some versions of
RHEL/CentOS, the stack provides a hash that is 16 bits rather than
32 bits. In cases where we use the uppermost bits of the hash this
is particularly bad because we detect that a hash is present and we
use it rather than computing our own but the result is always zero.
This is particularly noticible with tunnel ports that use the hash
to generate a source port, such as VXLAN. On these kernels the tunnel
source port is always the minimum value. To solve this problem while
still taking advantage of the precomputed hash, this rehashes the
hash so that the entropy is spread throughout 32 bits.
Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com>
Ben Pfaff [Tue, 24 Jun 2014 23:39:33 +0000 (16:39 -0700)]
dpif: When executing actions needs help, use "set" action to set tunnel.
Open vSwitch userspace is able to implement some actions that the kernel
doesn't support, such as modifying ARP fields. When it does this for a
tunneled packet, it needs to supply the tunnel information with a "set"
action, because the Linux kernel datapath throws away tunnel information
supplied in the OVS_PACKET_CMD_EXECUTE metadata argument.
Simon Horman [Tue, 24 Jun 2014 11:56:57 +0000 (20:56 +0900)]
datapath: Add basic MPLS support to kernel
Allow datapath to recognize and extract MPLS labels into flow keys
and execute actions which push, pop, and set labels on packets.
Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer.
Cc: Ravi K <rkerur@gmail.com> Cc: Leo Alterman <lalterman@nicira.com> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Joe Stringer <joe@wand.net.nz> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
Flavio Leitner [Thu, 19 Jun 2014 01:14:29 +0000 (22:14 -0300)]
lib: Add IGMP snooping library bits
This patch adds generic IGMP snooping library code
that is used in follow-up patches.
Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Thomas Graf <tgraf@redhat.com> Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
There are always a few unit tests that have some race conditions
that cause them to occasionally fail. It is probably a good idea
to re-run the failed tests once while building deb packages.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Co-authored-by: Keith Amidon <kamidon@nicira.com> Signed-off-by: Keith Amidon <kamidon@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
As of now, when a process tries to reacquire a lockfile, we
return EEXIST on Windows and print a different error message.
This means that the unit tests need to look for different error
messages too. Linux uses EDEADLK for the same. EDEADLK feels like
a good error description for Windows too and this also lets us
not change the tests too much. So use it.
Some of the tests in test-lockfile.c uses fork to test a
child's ability to acquire lock. We do not fork in Windows.
We also do not support symlinks on Windows. So, comment out
those tests.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
daemon-windows: unlink pidfile before stopping the service.
When a OVS daemon is configured to run as a Windows service,
when the service is stopped by calling service_stop(), the
windows services manager does not give enough time to do
everything in the atexit handler. So call the exit handler
directly from service_stop().
Also add a test case for Windows services which checks for
the termination of the service by looking at pidfile cleaned
by the exit handler.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com Acked-by: Ben Pfaff <blp@nicira.com>
There is no 'kill -l' type functionality available on Windows.
So instead of looking for the string 'ABRT', check for the exit
code in both platforms. On msys (unit test environment), it is 9
and on Linux, it is 134 (SIGABRT + 128).
On Windows, stderr is fully buffered if connected to a pipe.
Make it _IONBF so that an abort does not miss log contents.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
WSAStartup() needs to be called before using winsock2 related
functions. We need this for almost all the utilities. So call
it through OVS_CONSTRUCTOR.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Mon, 23 Jun 2014 15:52:03 +0000 (15:52 +0000)]
Revert "revalidator: Use xcache when revalidation is required."
This reverts commit a48c85b2d672505b89e488d28066538705b94942. The commit
was causing intermittent testsuite failures and unexpected re-install of
stale mac-learning entries.
The netdev_send function has been modified to accept multiple packets, to
allow netdev providers to amortize locking and queuing costs.
This is especially true for netdev-dpdk.
Later commits exploit the new API.
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
dpif-netdev: use dpif_packet structure for packets
This commit introduces a new data structure used for receiving packets from
netdevs and passing them to dpifs.
The purpose of this change is to allow storing some private data for each
packet. The subsequent commits make use of it.
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
vswitchd: skip right number of arguments in dpdk_init()
rte_eal_init() returns the number of parsed dpdk arguments to skip.
dpdk_init() should add 1 to that number, because it has already skipped
the "--dpdk" argument itself.
This patch also makes sure the program name is ovs-vswitchd in
rte_eal_init() and proctitle_init().
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Signed-off-by: Ryan Wilson <wryan@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Simon Horman [Fri, 13 Jun 2014 23:33:13 +0000 (08:33 +0900)]
ofproto: Honour out_port of flow monitors
Previously the out_port of a flow monitor was
checked in ofmonitor_report() using ofoperation_has_out_port().
When ofoperation_has_out_port() was removed so was the call to
it in ofmonitor_report() thus flow monitor updates are longer
filtered on the out_port.
This restores filtering on the out_port by using
ofproto_rule_has_out_port to check the actions of the rule.
If the actions have been changed by a modify actions then
ofpacts_output_to_port() is also used to check the old actions.
This patch also adds a test to exercise out_ports for flow monitors.
This resolves what appears to be a regression introduced by b20f4073eecd4761 ("ofproto: Do straightforward removal of asynchronous flow
operations.")
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
Makefile.am: fix printf-check in out-of-tree build
The introduction of a %zu in datapath/flow_netlink.c with commit c1fc1411
revealed a problem with out-of-tree builds.
printf-check and thread-safety-check skip some directories with a 'grep -v'.
In the case of an out-of-tree build, the grep -v pattern doesn't work, because
it assumes the pathnames to be relative to the OVS root directory.
This commit fixes the problem by changing the directory before executing any
commands, like we do elsewhere in Makefile.am
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com> Signed-off-by: Joe Stringer <joestringer@nicira.com>
Jesse Gross [Sat, 21 Jun 2014 00:41:45 +0000 (17:41 -0700)]
datapath: Check tunnel info before dereferencing on send.
It's possible that the tunnel information may not have been set by
userspace before a packet is output to a tunnel port. Therefore, we
should ensure that we validate that the information is there before
attempting to use it.
Jesse Gross [Fri, 6 Jun 2014 02:07:32 +0000 (19:07 -0700)]
datapath: Add support for Geneve tunneling.
This adds support for Geneve - Generic Network Virtualization
Encapsulation. The protocol is documented at
http://tools.ietf.org/html/draft-gross-geneve-00
The kernel implementation is completely agnostic to the options
that are in use and can handle newly defined options without
further work. It does this by simply matching on a byte array
of options and allowing userspace to setup flows on this array.
Userspace currently implements only support for basic version of
Geneve. It can work with the base header (including the VNI) and
is capable of parsing options but does not currently support any
particular option definitions. Over time, the intention is to
allow options to be matched through OpenFlow without requiring
explicit support in OVS userspace.
Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Jesse Gross [Fri, 6 Jun 2014 01:36:19 +0000 (18:36 -0700)]
datapath: Factor out allocation and verification of actions.
As the size of the flow key grows, it can put some pressure on the
stack. This is particularly true in ovs_flow_cmd_set(), which needs several
copies of the key on the stack. One of those uses is logically separate,
so this factors it out to reduce stack pressure and improve readibility.
Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Jesse Gross [Wed, 28 May 2014 04:50:35 +0000 (21:50 -0700)]
tunnel: Add support for matching on OAM packets.
Some tunnel formats have mechanisms for indicating that packets are
OAM frames that should be handled specially (either as high priority or
not forwarded beyond an endpoint). This provides support for allowing
those types of packets to be matched.
Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Jesse Gross [Wed, 28 May 2014 01:15:59 +0000 (18:15 -0700)]
datapath: Wrap struct ovs_key_ipv4_tunnel in a new structure.
Currently, the flow information that is matched for tunnels and
the tunnel data passed around with packets is the same. However,
as additional information is added this is not necessarily desirable,
as in the case of pointers.
This adds a new structure for tunnel metadata which currently contains
only the existing struct. This change is purely internal to the kernel
since the current OVS_KEY_ATTR_IPV4_TUNNEL is simply a compressed version
of OVS_KEY_ATTR_TUNNEL that is translated at flow setup.
Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Jesse Gross [Tue, 10 Jun 2014 01:00:18 +0000 (18:00 -0700)]
datapath: Eliminate memset() from flow_extract.
As new protocols are added, the size of the flow key tends to
increase although few protocols care about all of the fields. In
order to optimize this for hashing and matching, OVS uses a variable
length portion of the key. However, when fields are extracted from
the packet we must still zero out the entire key.
This is no longer necessary now that OVS implements masking. Any
fields (or holes in the structure) which are not part of a given
protocol will be by definition not part of the mask and zeroed out
during lookup. Furthermore, since masking already uses variable
length keys this zeroing operation automatically benefits as well.
In principle, the only thing that needs to be done at this point
is remove the memset() at the beginning of flow. However, some
fields assume that they are initialized to zero, which now must be
done explicitly. In addition, in the event of an error we must also
zero out corresponding fields to signal that there is no valid data
present. These increase the total amount of code but very little of
it is executed in non-error situations.
Removing the memset() reduces the profile of ovs_flow_extract()
from 0.64% to 0.56% when tested with large packets on a 10G link.
Suggested-by: Pravin Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Andy Zhou [Mon, 16 Jun 2014 19:45:04 +0000 (12:45 -0700)]
datapath: keep mask array compact when deleting mask
When deleting a mask from the mask array, we always move the last entry
into its current location. Another approach can be NULL in its
current place, and periodically compact it.
The approach taken by this patch is more efficient during run
time. During look up, fast path packet don't have to skip over NULL
pointers.
A more important advantage of this approach is that it tries to
keep the mask array index stable by avoiding periodic index
reshuffle.
This patch implements an optimization to further promote index
stability. By leaving the last entry value intact when moving it
to a new location, the old cache index can 'fix' themselves, by noticing
the index in the cache is outside the valid mask array region. The
new index can be found by scanning the mask pointer within the valid
rtegion.
Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
Alex Wang [Fri, 30 May 2014 17:19:26 +0000 (10:19 -0700)]
bridge: Make ovs-vswitchd run again if status_txn commit fails.
This commit adds logic that checks the return value of status_txn
transaction and runs the update again if the transaction fails
(transaction status is not 'TXN_SUCCESS', 'TXN_UNCHANGED', or
'TXN_INCOMPLETE').
To keep the code simple, the re-run of update on transaction failure
will extracts the status from all interfaces, rather than just those
that have status change. Since the transaction failure is considered
to be very rare, such overhead is deemed to be affordable.
Alex Wang [Fri, 30 May 2014 22:07:31 +0000 (15:07 -0700)]
ofproto: Add separate functions for checking bfd/cfm status change.
Currently, ofproto_port_get_bfd/cfm_status() is used to check the
bfd/cfm status change and query the status change. Users decide
what to do with the filled status struct based on the return value
of the funciton. Such design is confusing and makes the caller
code hard to read.
This commit breaks the function into a status change check function
and a status query function, so that they become easier to read and
use.
Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Tue, 10 Jun 2014 01:35:35 +0000 (18:35 -0700)]
cfm: Extracts the cfm status in one function.
This commit adds a new function, cfm_get_status(), for extracting
all cfm status at once. This helps avoid the sequence of lock
acquire/release in current implementation of status query.
Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 29 May 2014 22:37:37 +0000 (15:37 -0700)]
ovs-thread: Implement OVS specific barrier.
Non-leader revalidator thread uses pthread_barrier_* functions in their
main loop to synchronize with leader thread. However, since those threads
only call poll_block() intermittently, the poll interval check in
poll_block() can wrongly take the time since last call as poll interval
and issue the following warnings:
"Unreasonably long XXXXms poll interval".
To prevent it, this commit implements the barrier struct and operations
for OVS which allow thread to block on barrier via poll_block().
Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Wed, 28 May 2014 04:59:26 +0000 (21:59 -0700)]
netdev-vport: Use dpif_port as base for tunnel backing port.
In most cases, tunnel ports specify a dpif name to act as the backing
port in the datapath. However, in the case of UDP tunnels the type is
used with the port number appended. This is potentially a problem for
IPsec tunnels because they have different types but should have the
same backing port. The hasn't been a problem in practice though because
no UDP tunnels are currently used with IPsec.
This switches to use the dpif_port in all cases plus a port number if
necessary. It does this by making the names short enough to accomodate
ports, which also makes the naming more consistent.
Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Fri, 13 Jun 2014 02:40:24 +0000 (11:40 +0900)]
ofproto: Honour NXFMF_OWN flag of flow monitors
If NXFMF_OWN is set then full updates should be sent.
Prior to this change an abbreviated update is always sent
to the controller to which a monitor belongs, that is,
the NXFMF_OWN flag is ignored.
Also:
* Update existing flow tests for this chagne
* Add a test to exercise NX flow monitor with !own
I noticed this while working on support for OpenFlow1.4 flow monitors.
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Fri, 13 Jun 2014 02:40:23 +0000 (11:40 +0900)]
ofproto: Break out perl code for sorting multiline messages
The flow monitoring tests includes a perl script to sort multiline
messages. This commit breaks it out of an individual test so that it can
be used elsewhere.
Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com changed approach from a separate file to a shell function] Signed-off-by: Ben Pfaff <blp@nicira.com>
Linda Sun [Fri, 13 Jun 2014 21:21:36 +0000 (14:21 -0700)]
Move setsockopt TCP_NODELAY to when TCP is connected.
On windows platform, TCP_NODELAY can only be set when TCP
is established. If the conection is not immediately returning
success, call it when state is changed from TCP_CONNECTING
to SSL_CONNECTING.
Signed-off-by: Linda Sun <lsun@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 13 Jun 2014 23:03:33 +0000 (16:03 -0700)]
util: Move definition of HANDLE here.
A few Open vSwitch source files use a type named HANDLE on Windows systems,
in a way that makes it easier to avoid #ifdefs if we have a dummy
definition on other platforms. <linux/types.h> was a really weird place
for this dummy definition. This commit moves it to util.h.
Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Gurucharan Shetty <gshetty@nicira.com>