Pritesh Kothari [Wed, 1 Oct 2014 06:23:46 +0000 (23:23 -0700)]
README: Adding github markup and travis-ci build status to github readme page.
Signed-off-by: Pritesh Kothari <pritesh.kothari@cisco.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
YAMAMOTO Takashi [Wed, 1 Oct 2014 05:00:36 +0000 (14:00 +0900)]
ovs-vswitchd.at: Fix "start additional ovs-vswitchd process" test
NetBSD implementation of wc command outputs extra whitespaces
like the following. Tweak the test to success on such environments.
% echo hoge|wc -l|hexdump -C
00000000 20 20 20 20 20 20 20 31 0a | 1.|
00000009
%
The failing test was introduced by
commit
6bef3c7ca859f208239ca61ec3b25c09a3571553
("bridge: Fix high cpu utilization.")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Joe Stringer <joestringer@nicira.com>
Alex Wang [Tue, 30 Sep 2014 20:46:22 +0000 (13:46 -0700)]
bridge: Fix high cpu utilization.
When there are more than one ovs-vswitchd processes started,
only one process is enabled. The disabled processes should
just sleep. However, a bug in ovs makes the disabled processes
keep waking up on global connectivity sequence number which is
never sync'ed. Consequently, those processes use 100% cpu.
This commit fixes the bug by always sync up the connectivity
sequence number for disabled processes.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
YAMAMOTO Takashi [Mon, 29 Sep 2014 22:59:36 +0000 (07:59 +0900)]
CodingStyle: Mention our assumption about conversions to bool
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Fri, 26 Sep 2014 15:05:40 +0000 (15:05 +0000)]
INSTALL.DPDK: Update DPDK related documentation.
This commit updates the DPDK related documentation to reflect
the pmd thread multi-threading work.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Ben Pfaff [Tue, 30 Sep 2014 16:57:08 +0000 (09:57 -0700)]
ovs-vswitchd: Better diagnose errors in DPDK command-line options.
With DPDK compiled in, when the --dpdk option was given other than as the
first command-line argument, ovs-vswitchd silently ignored it. Without
DPDK compiled in, when the --dpdk option was given anywhere, ovs-vswitchd
silently ignored it. However, in each case any options following --dpdk
were not ignored, and since --dpdk is normally followed by additional
DPDK-specific options, this caused even more confusing trouble.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Tested-by: Daniele Di Proietto <ddiproietto@vmware.com>
Lilijun [Tue, 30 Sep 2014 08:55:25 +0000 (16:55 +0800)]
pstream-unix: Increase listen count to 64 in punix_open().
In my test with openstack setup, ovs-ofctl executes failed when there are
many flow rules to be added by multiple threads.
The error like this:
ovs-ofctl: /var/run/openvswitch/br1.mgmt: failed to open socket (Protocol
error)
In the function listen(fd, 10) in punix_open(), the number 10 should be
modified to more bigger, such as 64 maybe a proper value.
Signed-off-by: Lilijun <jerry.lilijun@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Fri, 26 Sep 2014 17:28:12 +0000 (17:28 +0000)]
tests: Mention binomial coefficient in hash tests.
This just makes it a bit easier for someone coming in fresh to do some
searches and figure out what the description means.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Joe Stringer [Fri, 26 Sep 2014 17:28:05 +0000 (17:28 +0000)]
revalidator: Distinguish new and duplicate flows.
We previously counted flows that have been installed during the current
dump as duplicates, rather than recognising them as new flows. This
patch separates the counters out for these two cases.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 12 Sep 2014 21:42:47 +0000 (14:42 -0700)]
nx-match: Encode dp_hash and recirc_id in OXM also.
dp_hash and recirc_id are specific to OVS, but that doesn't mean that we
shouldn't encode them into flow matches when OXM is used in OpenFlow 1.2
and later.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Ben Pfaff [Tue, 2 Sep 2014 23:47:01 +0000 (16:47 -0700)]
ofp-actions, nx-match: Use mf_oxm_header() instead of explicit constants.
Following this change, only meta-flow.c uses any explicit NXM_* or OXM_*
constants. An upcoming commit will actually remove the definitions of
these constants, hiding them behind a functional interface, for better
abstraction.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Ben Pfaff [Thu, 4 Sep 2014 20:34:37 +0000 (13:34 -0700)]
nx-match: Reject bad wildcard combinations.
A log message has warned that this was going to happen for some time, and
newer OpenFlow versions require this behavior.
The test updates fix this behavior in our testsuite.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Ben Pfaff [Tue, 2 Sep 2014 23:38:55 +0000 (16:38 -0700)]
ovs-ofctl: Correct typo in documentation.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Ben Pfaff [Tue, 2 Sep 2014 23:37:42 +0000 (16:37 -0700)]
extract-ofp-msgs: Correct some user messages.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Ben Pfaff [Mon, 29 Sep 2014 21:34:11 +0000 (14:34 -0700)]
Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.
The Open vSwitch "make" output was still pretty verbose even when
configured with --enable-silent-rules. This cleans it up.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
Justin Pettit [Mon, 29 Sep 2014 18:15:12 +0000 (11:15 -0700)]
FAQ: Replace reference to OVS 2.2 with 2.3.
We never released 2.2.0, so references to it are confusing.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
Joe Stringer [Mon, 29 Sep 2014 18:09:57 +0000 (18:09 +0000)]
bridge: Fix bug where IDL wakeup causes 100% CPU.
Commit
9c537baf613a16e (bridge: Refactor the stats and status update.)
inadvertently changed the way that the status transaction is destroyed,
which could cause the main thread to constantly wake up.
The bug occurs when ovsdb_idl_txn_commit() returns TXN_INCOMPLETE and
there are no further changes to connectivity or 'status_txn_try_again'.
- ovsdb_idl_run() receives the transaction reply and updates the
transaction status to TXN_SUCCESS.
- status_update_wait() detects that the transaction is in progress, and
the status is TXN_SUCCESS so wakes up the main thread immediately.
- run_status_update() is meant to destroy the transaction now that it is
finished, however the logic is never run because there were no changes.
- Repeat the wakeup every time the main loop runs.
This patch fixes the behaviour by ensuring that ovsdb_idl_txn_commit()
gets a chance to run whenever there is an ongoing status transaction.
Bug was found by unloading and reloading the kernel module, then
immediately restarting ovs-vswitchd.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
Ankur Sharma [Mon, 29 Sep 2014 17:13:00 +0000 (10:13 -0700)]
datapath-windows: Build fix.
Recently we changed the signature of NlAttrParse.
Function OvsGetVport was not updated accordingly.
Fixed the same.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Ben Pfaff [Mon, 29 Sep 2014 16:20:07 +0000 (09:20 -0700)]
AUTHORS: Add Sorin Vinturis.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Sorin Vinturis [Mon, 29 Sep 2014 15:07:04 +0000 (15:07 +0000)]
datapath-windows: Missed packets are not queued.
Currently, whenever there's a missed packet, the ovs driver allocates
memory and copies the packet even if there's no packet queue setup from
userspace. Then if there's no queue created, the packet is released and
dropped.
The solution was to check for the existence of the userspace queue before
trying to allocate and add a new missed packet to the queue. If there is
no userspace queue created, the original packet is dropped without creating
a new missed packet.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Nithin Raju <nithin@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/32
Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Wang Sheng-Hui [Mon, 29 Sep 2014 07:21:37 +0000 (15:21 +0800)]
flow.c: Correct the comment for miniflow_equal().
It's for miniflow equalness check, not flow.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 29 Sep 2014 16:11:43 +0000 (09:11 -0700)]
AUTHORS: Add Samuel Ghinet.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:33:42 +0000 (17:33 -0700)]
datapath-windows: Rename OvsFlowNlNewCmdHandler to OvsFlowNlCmdHandler
OvsFlowNlNewCmdHandler NEW/DEL/SET/FLUSH commands hence renaming it to
OvsFlowNlCmdHandler.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:33:34 +0000 (17:33 -0700)]
datapath-windows/Flow.c: DEL_FLOWS command handler.
Added changes to handle DEL_FLOWS (FLUSH) scenario.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:33:26 +0000 (17:33 -0700)]
datapath-windows/Flow.c: FLOW_DEL command handler.
Registered FLOW_DEL command handler. The same command
handler as FLOW_ADD is good enough to handle FLOW_DEL
case as well with minor changes for checking to action
attribute.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:33:17 +0000 (17:33 -0700)]
datapath-windows/Flow.c: FLOW_SET command handler.
Registered FLOW_SET command handler. The same command
handler as FLOW_ADD is good enough to handle FLOW_SET
case as well.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:33:08 +0000 (17:33 -0700)]
datapath-windows/Flow.c: FLOW_NEW command handler.
This patch covers the changes needed to support FLOW_NEW command.
API _OvsFlowMapNlToFlowPutFlags has a bug, which will be fixed
with the patches for FLOW_DEL.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:32:59 +0000 (17:32 -0700)]
datapath-windows/Flow.c : Basic support for add-flow.
This patch covers basic changes in registering add flow handler.
And declaring FLOW related attribute parsing policies.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:32:49 +0000 (17:32 -0700)]
datapath-windows/Netlink: Fixed NlAttrParseNested
NlAttrParseNested was using the whole netlink payload for iteration.
This is not correct, as it would lead to exceeding the
nested attribute boundries. Fixed the same in this patch.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:32:40 +0000 (17:32 -0700)]
datapath-windows/Netlink: Allow support for NESTED Attributes in NlAttrValidate
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:32:31 +0000 (17:32 -0700)]
datapath-windows/Netlink: Add NlAttrLen API
Added an API to retrieve the attribute length.
Added 2 more API for BE16 and BE8 attribute parsing.
Fixed a trailing whitespace issue.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:32:21 +0000 (17:32 -0700)]
datapath-windows/Netlink: Add NlFillOvsMsg API for creating Netlink message headers.
Added NlFillOvsMsg API in Netlink.c This API will be used to populate
netlink message headers.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Sat, 27 Sep 2014 00:32:12 +0000 (17:32 -0700)]
datapath-windows: move OVS_MESSAGE to Netlink.h
Moved the structure OVS_MESSAGE to Netlink.h.
This change is done for following reasons.
a. Patch 2 in this series provides a generic API in Netlink.c
for creating netlink message. That API needs OVS_MESSAGE.
Including Datapath.h in Netlink.c/h gives compilation error.
b. OVS_MESSAGE defines netlink messages hence moving it to
Netlink.h looked fine to me.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Mon, 29 Sep 2014 16:03:25 +0000 (09:03 -0700)]
datapath-windows: Fix broken build by adding new file to distribution.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alin Serdean [Thu, 25 Sep 2014 06:18:19 +0000 (06:18 +0000)]
datapath-windows: Add WMI Script that updates Hyper-V friendly port names.
The following script leverage's the advantages of WMI infrastructure
offered in Hyper-V.
This scripts allows the user to change the
Msvm_EthernetPortAllocationSettingData property of a VM network adapter
connected to a Hyper-V Virtual Switch.
Usage:
import-module .\OVS.psm1
$vnic = Get-VMNetworkAdapter VM1
Connect-VMNetworkAdapter -VMNetworkAdapter $vnic -SwitchName external
$vnic | Set-VMNetworkAdapterOVSPort -OVSPortName ovs-port-1
VM1 - is a VM on top of a Hyper-V
external - is a Hyper-V Virtual Switch
Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Tested-by: Nithin Raju <nithin@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Eitan Eliahu [Sat, 27 Sep 2014 08:39:06 +0000 (01:39 -0700)]
datapath-windows: Implement event read handler.
The Read event handler is executed when user mode issues a socket
receive on an MC socket associated with the event queue. A new IOCTL
READ command is used to differentiate between transaction based and packet
miss sockets.
An entry for the handler will be added once the Control family (logically
should have been added to the Vport family)
implementation checked in.
User mode code for setting the socket type will follow
Signed-off-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Sat, 27 Sep 2014 01:38:16 +0000 (18:38 -0700)]
datapath-windows: NUL character should be left out during VPORT hash lookup
While calculating the hash on a VPORT name, we don't include the NUL character.
We should be doing the same while doing lookup as well.
We set the required minimum length of the name to be 2 so that the string has
at least one valid character.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Wed, 24 Sep 2014 04:43:19 +0000 (13:43 +0900)]
ovs-ofctl: Correct help text for add-groups
It is add-groups rather than add-group that takes FILE as an argument.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Simon Horman [Thu, 25 Sep 2014 04:02:13 +0000 (13:02 +0900)]
AUTHORS: Add Simon Horman <simon.horman@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Samuel Ghinet [Thu, 25 Sep 2014 21:22:50 +0000 (21:22 +0000)]
datapath-windows: Add Netlink vport command get.
The transactional get vport command.
This command uses the netlink transactional errors.
Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Samuel Ghinet [Thu, 25 Sep 2014 21:22:22 +0000 (21:22 +0000)]
datapath-windows: Add file NetlinkError.h.
Contains error codes for netlink transactional errors.
These errors are passed to the "error" field (INT) of the NL_MSG_ERR struct.
The userspace requires them to be negative values: the nl_msg_nlmsgerr userspace
function transforms them from negative to positive values.
These error codes correspond to the userspace error codes defined in:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\errno.h"
Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Samuel Ghinet [Thu, 25 Sep 2014 21:21:33 +0000 (21:21 +0000)]
datapath-windows: Implement vport dump Netlink command.
Functionality for vport dump.
Later, when we will add more netlink dump commands, some common code will need
to be split to functions.
Notes:
a) the current implementation of vport assumes the datapath feature
"multiple upcall pids" is not used. A single upcall pid is used now.
c) the vxlan destination udp port is currently a constant. When it will become
configurable, the vport options netlink attribute will become relevant.
Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Samuel Ghinet [Thu, 25 Sep 2014 21:20:25 +0000 (21:20 +0000)]
datapath-windows: fix OVS_VPORT_TYPE
The windows ovs kernel uses an OVS_VPORT_TYPE enum that is incompatible with
the userspace counterpart (enum ovs_vport_type from openvswitch.h). We must use
the same enum type for the netlink communication to work properly.
This patch makes the fix: "typedef enum ovs_vport_type OVS_VPORT_TYPE" and
changes the afferent kernel driver code:
o) vport types synthetic and emulated turn to: netdev
o) vport type internal turns to: internal
o) vport type external truns to: netdev (plus, we hold a field in vport,
"isExternal"
Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Gurucharan Shetty [Wed, 30 Jul 2014 17:31:26 +0000 (10:31 -0700)]
ovs-vtep: Use shlex module to split args.
string.split() function splits a quoted string if there is a whitespace
inside the quote.
ex: The following code snippet will output ['printing', '"No', 'Diagnostic"']
args = 'printing "No Diagnostic"'
print args.split()
The above is a problem if we run the following command through vtep_ctl().
vtep-ctl set tunnel $uuid bfd_status:diagnostic="No Diagnostic"
The workaround is to use the split() function from shlex module.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Gurucharan Shetty [Tue, 29 Jul 2014 15:40:19 +0000 (08:40 -0700)]
ovs-vtep: Store physical switch name globally.
ovs-vtep is an emulator and it works only on one
physical switch. This switch name is stored in the variable
'ps_name' and then passed around. An upcoming commit requires
access to this variable at more places and it is easier if this
variable is global.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Gurucharan Shetty [Thu, 24 Jul 2014 19:40:39 +0000 (12:40 -0700)]
ovs-vtep: Clear left-over local mac information.
Before destroying a logical switch, cleanup any left over local
mac information in Ucast_Macs_Local or Mcast_Macs_Local table.
We need to do this to atleast cleanup the 'unknown-dst' information
added in the Mcast_Macs_Local table while creating the Logical_Switch
class in setup_ls().
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Gurucharan Shetty [Tue, 29 Jul 2014 13:53:47 +0000 (06:53 -0700)]
vtep-ctl: Add Tunnel table to vtep_ctl_table_class.
This is needed to create, get, set records in the Tunnel table.
(We need to add the Tunnel table's 'local' and 'remote' columns
that point to the Physical_Locator record to cache because vtep-ctl
commands like 'add-ucast-local' will try to add an entry in
Physical_Locator table based on the contents of the cache.)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Gurucharan Shetty [Thu, 4 Sep 2014 19:03:28 +0000 (12:03 -0700)]
README.ovs-vtep: Remotes can be connected through VTEP's manager table.
Reported-by: Ziyou Wang <ziyouw@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Jarno Rajahalme [Thu, 25 Sep 2014 21:53:50 +0000 (14:53 -0700)]
lib/ofproto: Sync RSTP operational state after configuration changes.
Otherwise the RSTP port operational state could be out of sync until
the next time the port's carrier status changes.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
Alex Wang [Thu, 25 Sep 2014 20:10:55 +0000 (13:10 -0700)]
netdev-dpdk: Fix crash when there is no pci numa info.
When kernel cannot obtain the pci numa info, the numa_node file
in corresponding pci directory in sysfs will show -1. Then the
rte_eth_dev_socket_id() function will return it to ovs. On
current master, ovs assumes rte_eth_dev_socket_id() always
returns non-negative value. So using this -1 in pmd thread
creation will cause ovs crash.
To fix the above issue, this commit makes ovs always check the
return value of rte_eth_dev_socket_id() and use numa node 0 if
the return value is negative.
Reported-by: Daniel Badea <daniel.badea@windriver.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Alex Wang [Thu, 25 Sep 2014 18:40:24 +0000 (11:40 -0700)]
netdev: Fix error check.
Reported-by: Daniel Badea <daniel.badea@windriver.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Simon Horman [Thu, 25 Sep 2014 11:57:53 +0000 (11:57 +0000)]
ofproto-dpif-rid: remove unused return value of rid_pool_add()
The return value of rid_pool_add() is never used
so the code may be slightly simplified by removing it.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Simon Horman [Thu, 25 Sep 2014 11:57:52 +0000 (11:57 +0000)]
ofproto-dpif-rid: remove struct rid_map
struct rid_map only has one member which is a struct hmap.
This allows for a slight simplification of the code by removing
struct rid_map and using a struct hmap directly instead.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Alex Wang [Thu, 25 Sep 2014 23:51:01 +0000 (23:51 +0000)]
rstp.at: Fix intermittent test failure.
Sub-test "RSTP - dummy interface" checks the ovs-vswitchd.log
output immediately after command execution. The check may
fail if the write of new log is delayed by the IO thread.
This commit fixes the above issue by waiting for the
ovs-vswitchd.log output.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
Simon Horman [Wed, 24 Sep 2014 12:41:02 +0000 (12:41 +0000)]
ofproto-dpif-rid: correct logic error in rid_pool_alloc_id()
When searching through the valid ids an id should
be used if is not found rather than if it is found.
It appears to me that without this change duplicate recirculation
ids may used in cases where the last recirculation id has
been allocated; selection loops back to the beginning of the pool and;
reaches a recirculation id that is still in use.
As the number of recirculation ids is currently RECIRC_ID_N_IDS = 1024 this
does not seem beyond the bounds of possibility.
I have not verified that such a scenario can actually occur. But it seems
that a likely consequence would be that some packets may be forwarded
incorrectly.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Gurucharan Shetty [Wed, 24 Sep 2014 17:25:52 +0000 (10:25 -0700)]
ovs-atomic-msvc: Fix 64 bit atomic read/writes.
MSVC converts 64 bit read/writes into two instructions (uses 'mov' as
seen through cl //FAs). So there is a possibility that an interrupt can
make a 64 bit read/write non-atomic even when 8 byte aligned. So we cannot
use a simple assignment. Use a full memory barrier function instead.
Reported-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ben Pfaff [Wed, 24 Sep 2014 17:02:35 +0000 (10:02 -0700)]
AUTHORS: Add Selvamuthukumar <smkumar@merunetworks.com>.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Selvamuthukumar [Wed, 24 Sep 2014 16:53:13 +0000 (09:53 -0700)]
ofp-actions: Fix error code for invalid table id.
Send OFPET_BAD_INSTRUCTION/OFPBIC_BAD_TABLE_ID if table is invalid
in goto table instruction.
Signed-off-by: Selvamuthukumar <smkumar@merunetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 18 Sep 2014 17:49:47 +0000 (10:49 -0700)]
jsonrpc: Notify excessive sending backlog.
This commit adds a log message to notify the excessive backlog
for jsonrpc. Expectedly, this message should never be printed.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 18 Sep 2014 21:35:30 +0000 (14:35 -0700)]
bridge: Refactor the stats and status update.
This commit refactors the stats and status update in bridge_run()
by moving the corresponding code to separate functions. This
makes the code more organized.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Thu, 18 Sep 2014 21:10:24 +0000 (14:10 -0700)]
bridge: Rate limit the statistics update.
When ovs is running with large topology (e.g. large number of
interfaces), the stats update to ovsdb becomes huge and normally
requires multiple run of ovsdb jsonrpc message processing loop to
consume.
To prevent the periodic stats update from backlogging in the
jsonrpc sending queue, this commit adds rate limiting logic
which only allows new update if the previous one is done.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Thomas Graf [Tue, 23 Sep 2014 14:02:35 +0000 (16:02 +0200)]
datapath: Constify various function arguments
Help produce better optimized code.
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Pravin B Shelar [Sun, 21 Sep 2014 04:10:49 +0000 (21:10 -0700)]
datapath: Restore OVS_CB after skb_segment.
OVS needs to segments large skb before sending it for miss
packet handling to userspace. but skb_gso_segment uses
skb->cb. This corrupted OVS_CB which result in following panic.
[ 735.419921] BUG: unable to handle kernel paging request at
00000014000001b2
[ 735.423168] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[ 735.445097] RIP: 0010:[<
ffffffffa05df0d7>] [<
ffffffffa05df0d7>] ovs_nla_put_flow+0x37/0x7c0 [openvswitch]
[ 735.468858] Call Trace:
[ 735.470384] [<
ffffffffa05d7ec2>] queue_userspace_packet+0x332/0x4d0 [openvswitch]
[ 735.471741] [<
ffffffffa05d8155>] queue_gso_packets+0xf5/0x180 [openvswitch]
[ 735.481862] [<
ffffffffa05da9f5>] ovs_dp_upcall+0x65/0x70 [openvswitch]
[ 735.483031] [<
ffffffffa05dab81>] ovs_dp_process_packet+0x181/0x1b0 [openvswitch]
[ 735.484391] [<
ffffffffa05e2f55>] ovs_vport_receive+0x65/0x90 [openvswitch]
[ 735.492638] [<
ffffffffa05e5738>] internal_dev_xmit+0x68/0x110 [openvswitch]
[ 735.495334] [<
ffffffff81588eb6>] dev_hard_start_xmit+0x2e6/0x8b0
[ 735.496503] [<
ffffffff81589847>] __dev_queue_xmit+0x3c7/0x920
[ 735.499827] [<
ffffffff81589db0>] dev_queue_xmit+0x10/0x20
[ 735.500798] [<
ffffffff815d3b60>] ip_finish_output+0x6a0/0x950
[ 735.502818] [<
ffffffff815d55f8>] ip_output+0x68/0x110
[ 735.503835] [<
ffffffff815d4979>] ip_local_out+0x29/0x90
[ 735.504801] [<
ffffffff815d4e46>] ip_queue_xmit+0x1d6/0x640
[ 735.507015] [<
ffffffff815ee0d7>] tcp_transmit_skb+0x477/0xac0
[ 735.508260] [<
ffffffff815ee856>] tcp_write_xmit+0x136/0xba0
[ 735.510829] [<
ffffffff815ef56e>] __tcp_push_pending_frames+0x2e/0xc0
[ 735.512296] [<
ffffffff815e0593>] tcp_sendmsg+0xa63/0xd50
[ 735.513526] [<
ffffffff81612c2c>] inet_sendmsg+0x10c/0x220
[ 735.516025] [<
ffffffff81566b8c>] sock_sendmsg+0x9c/0xe0
[ 735.518066] [<
ffffffff81566d41>] SYSC_sendto+0x121/0x1c0
[ 735.521398] [<
ffffffff8156801e>] SyS_sendto+0xe/0x10
[ 735.522473] [<
ffffffff816df5e9>] system_call_fastpath+0x16/0x1b
Reported-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Thomas Graf [Tue, 23 Sep 2014 17:59:56 +0000 (19:59 +0200)]
datapath: Fix double free when ovs_nla_copy_actions() fails
ovs_nla_copy_actions() already frees the allocated actions buffers,
ovs_flow_cmd_new() will free it a second time when jumping to
err_kfree_acts.
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Alex Wang [Mon, 22 Sep 2014 22:34:12 +0000 (15:34 -0700)]
ovs-pki: Use SHA-1 instead of SHA-512 as message digest.
Commit
9ff33ca7 (ovs-pki: Use SHA-512 instead of MD5 as message
digest.) changes the message digest algorithm to SHA-512. This
seems to break the unit tests on some xenserver 5.6/6.0 builds
causing the error: "SSL_connect: error:
0D0C50A1:asn1 encoding
routines:ASN1_item_verify:unknown message digest algorithm".
As a solution, this commit changes the message digest algorithm
to SHA-1 which works for both the above xenserver builds and
centos 7.
VMware-BZ: #
1319116
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Pravin B Shelar [Sun, 21 Sep 2014 18:41:28 +0000 (11:41 -0700)]
datapath: compat: Fix compilation for 2.6.32 kernel
Define alloc_netdev() using alloc_netdev_mq() which is available on all
kernel supported by OVS.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Pravin B Shelar [Thu, 18 Sep 2014 01:58:44 +0000 (18:58 -0700)]
datapath: Remove pkt_key from OVS_CB.
OVS keeps pointer to packet key in skb->cb, but the packet key is
store on stack. This could make code bit tricky. So it is better to
get rid of the pointer.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Samuel Gauthier [Sat, 20 Sep 2014 13:25:23 +0000 (06:25 -0700)]
datapath: restore OVS_FLOW_CMD_NEW notifications
Since commit
fb5d1e9e127a ("openvswitch: Build flow cmd netlink reply only if needed."),
the new flows are not notified to the listeners of OVS_FLOW_MCGROUP.
This commit fixes the problem by using the genl function, ie
genl_has_listerners() instead of netlink_has_listeners().
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Thomas Graf [Thu, 18 Sep 2014 12:48:56 +0000 (14:48 +0200)]
datapath: Provide compatibility for kernels up to 3.17
Port datapath to work with kernrels up to 3.17 and use 3.16.2 as
the new kernel for CI testing.
Tested with 3.14, 3.16.2, and net-next (3.17).
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Co-authored-by: Madhu Challa <challa@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Pravin B Shelar [Sat, 20 Sep 2014 12:36:47 +0000 (05:36 -0700)]
datapath: fix sparse warning.
datapath/linux/datapath.c:1418:28: warning: symbol
'i' shadows an earlier one
datapath/linux/datapath.c:1396:18: originally declared here
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Li RongQing [Sat, 20 Sep 2014 12:10:03 +0000 (05:10 -0700)]
datapath: change the data type of error status to atomic_long_t
Change the date type of error status from u64 to atomic_long_t, and use atomic
operation, then remove the lock which is used to protect the error status.
The operation of atomic maybe faster than spin lock.
Cc: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Pravin B Shelar [Sat, 20 Sep 2014 12:02:54 +0000 (05:02 -0700)]
datapath: Remove support to set vport stats.
This was required for old compatibility code which update stats
on fake bond interface. Now vswitchd has dropped it. This
support was always deprecated, so finally removing it.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Daniele Di Proietto [Fri, 19 Sep 2014 23:20:01 +0000 (16:20 -0700)]
dpif-netdev: Fix (packet) memory leaks in the slow path.
If a packet didn't match a rule in the fast path classifier its memory was
never freed. The issue was particularly clear with DPDK devices because it was
not possible to process more than ~250000 DPDK mbufs in the slow path.
This commit fixes the problem by:
* calling dpif_packet_delete() if the upcalls are disabled
* passing may_steal==true to dp_netdev_execute_actions() during normal upcall
processing
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Ben Pfaff [Fri, 19 Sep 2014 23:17:09 +0000 (16:17 -0700)]
ovs-pki: Use SHA-512 instead of MD5 as message digest.
This fixes numerous testsuite failures of the form "SSL_connect:
error:
0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message
digest algorithm" on systems that disable MD5 in OpenSSL. Centos 7 is one
example. Presumably it increase security as well for anyone who generates
certificates based on a new configuration created by the new ovs-pki.
Reported-by: Robert Strickler <anomalyst@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Mon, 8 Sep 2014 22:22:26 +0000 (15:22 -0700)]
dpif-netdev: Allow multi-rx-queue, multi-pmd-thread configuration.
This commits adds the multithreading functionality to OVS dpdk
module. Users are able to create multiple pmd threads and set
their cpu affinity via specifying the cpu mask string similar
to the EAL '-c COREMASK' option.
Also, the number of rx queues for each dpdk interface is made
configurable to help distribution of rx packets among multiple
pmd threads.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Alex Wang [Mon, 23 Jun 2014 01:08:15 +0000 (18:08 -0700)]
ovs-numa: Add support for cpu-mask configuration.
This commit adds support in ovs-numa module for reading a user
specified cpu mask, which configures the availability of the cores.
The cpu mask has the format of a hex string similar to the EAL '-c
COREMASK' option input or the 'taskset' mask input. The lowest order
bit corresponds to the first CPU core. Bit value '1' means the
corresponding core is available.
An upcoming patch will allow user to configure the mask via OVSDB.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Nithin Raju [Fri, 19 Sep 2014 22:34:45 +0000 (15:34 -0700)]
dpif-netlink: rename linux_flow variable to datapath_flow
In the flow related functions, there's a stack variable called
'linux_flow'. Since this code is not specific to Linux anymore,
in this patch, we rename the variable to 'datpath_flow'.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Fri, 19 Sep 2014 21:30:56 +0000 (14:30 -0700)]
datapath-windows: add OVS_DP_CMD_SET and OVS_DP_CMD_GET transaction support
In this patch, we add support for two commands, both of them are issued
as part of transactions semantics from userspace:
1. OVS_DP_CMD_SET is used to get the properties of a DP as well as set
some properties. The set operations does not seem to make much sense for
the Windows datpath right now.
2. There's already support for OVS_DP_CMD_GET command issued via the
dump semantics from userspace. Turns out that userspace can issue
OVS_DP_CMD_GET as a transaction.
There's lot of common code between these two commands. Hence combining
the implementation and the review.
Also refactories some of the code in the implementation of dump-based
OVS_DP_CMD_GET, and updated some of the comments.
Validation:
- With these series of patches, I was able to run the following command:
> .\utilities\ovs-dpctl.exe show
system@ovs-system:
lookups: hit:0 missed:22 lost:0
flows: 0
- I got so far as to hit the PORT_DUMP command which is currently not
implemented.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Tested-by: Nithin Raju <nithin@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/38
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Fri, 19 Sep 2014 21:30:55 +0000 (14:30 -0700)]
extract-odp-netlink-windows-dp-h: add definition of IFNAMSIZ
The Windows kernel datapath needs the definition of 'IFNAMSIZ' for
specifying attribute sizes in netlink policies. Adding the definition
of 'IFNAMSIZ' to be part of OvsDpInterface.h similar to ETH_ADDR_LEN.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Fri, 19 Sep 2014 21:30:54 +0000 (14:30 -0700)]
lib/netlink-socket.c: add support for nl_transact() on Windows
In this patch, we add support for nl_transact() on Windows using
the OVS_IOCTL_TRANSACT ioctl that sends down the request and gets
the reply in the same call to the kernel.
This is obviously a digression from the way it is implemented in
Linux where all the sends are done at once using sendmsg() and
replies are received one at a time.
Initial implementation was in the Linux way using multiple writes
followed by reads, but decided against it since it is not efficient
and also it complicates the state machine in the kernel.
The Windows implementation has equivalent code for handling corner
cases and error coditions similar to Linux. Some of it is not
applicable yet. Eg. the Windows kernel does not embed an error
in the netlink message itself. There's userspace code nevertheless
for this.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Fri, 19 Sep 2014 21:30:53 +0000 (14:30 -0700)]
datapath-windows: add OvsCompareString() to compare strings
In this patch we implement a utility function to compare ANSI
strings using the Rtl* functions. As much as possible, in an
NDIS driver, we stick to Rtl* functions for memory/string
manipulation.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Nithin Raju [Fri, 19 Sep 2014 21:30:52 +0000 (14:30 -0700)]
datapath-windows: return TRUE on success in NlAttrValidate
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 19 Sep 2014 20:09:24 +0000 (13:09 -0700)]
travis: Allow testsuite to run with GCC or Clang.
I don't see why the testsuite is supported only with GCC.
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 19 Sep 2014 18:11:58 +0000 (11:11 -0700)]
travis: Include testsuite.log on failure.
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Fri, 19 Sep 2014 17:38:39 +0000 (10:38 -0700)]
netdev-dpdk: Fix a bug in netdev_dpdk_set_multiq().
Commit 5a0340 (dpif-netdev: Create multiple tx/rx queues when
adding dpdk interface.) introduced a bug which causes the function
netdev_dpdk_set_multiq() never resetting the tx queues. This bug
could cause pmd thread accessing unassigned memory, resulting in
segfault.
This commit fixes the bug.
Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Alex Wang [Fri, 19 Sep 2014 17:37:08 +0000 (10:37 -0700)]
netdev-dpdk: Fix a typo.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Ben Pfaff [Fri, 19 Sep 2014 15:24:11 +0000 (08:24 -0700)]
coverage: Remove unused macro.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
YAMAMOTO Takashi [Fri, 19 Sep 2014 16:10:30 +0000 (01:10 +0900)]
FAQ: Fix a newline problem
Fix a newline problem in commit
dd63a57e55daddccbbd4f0bedfdc86b6827b6b1a
("FAQ: Add an entry about reconfiguration")
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
YAMAMOTO Takashi [Thu, 18 Sep 2014 04:44:52 +0000 (13:44 +0900)]
FAQ: Add an entry about reconfiguration
It seems that the behaviour is not so intuitive.
cf. https://bugs.launchpad.net/neutron/+bug/
1346861
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
Alex Wang [Fri, 19 Sep 2014 00:02:17 +0000 (17:02 -0700)]
netdev-dpdk: Pass queue id to dpdk_do_tx_copy().
Since dpdk_do_tx_copy() will be called by both pmd and
non-pmd thread, it should take the queue id as input.
The current ovs always uses NON_PMD_THREAD_TX_QUEUE
as queue id, which causes unprotected multi-access
to the same queue.
This commit fixes the issue by passing the queue id
to dpdk_do_tx_copy().
Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Eitan Eliahu [Thu, 18 Sep 2014 06:12:05 +0000 (23:12 -0700)]
datapath-windows: NetLink kernel side, Event subscription and notification
This code handles an event notification subscription for a user mode thread
which joins an MC group. The event wait handler queues an IRP which is
completed upon change in a port state.
Signed-off-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Alin Gabriel Serdean [Thu, 18 Sep 2014 11:17:54 +0000 (04:17 -0700)]
dpif-linux: Rename dpif-netlink; change to compile with MSVC.
The patch contains the necessary modifications to compile and also to run
under MSVC.
Added the files to the build system and also changed dpif_linux to be under
a more generic name dpif_windows.
Added a TODO under the windows part in case we want to implement another
counterpart for epoll functions.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Wed, 17 Sep 2014 20:22:14 +0000 (13:22 -0700)]
ofproto: Warn about excessive rule counts in OpenFlow tables.
Frequently we've run into controller bugs which result in hundreds of
thousands, or even millions of rules being installed in an OpenFlow
table. This isn't something trouble-shooters naturally think of to
check for, so it's nice to have a low rate warning message to hint at
the potential problem.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Daniele Di Proietto [Sat, 6 Sep 2014 08:10:43 +0000 (08:10 +0000)]
dpif-netdev: Store miniflow length in exact match cache
This optimization is done to avoid calling count_1bits(), which, if
the popcnt istruction is not available might is slow. popcnt may not
be available because:
- We are running on old hardware
- (more likely) We're using a generic build (i.e. packaged OVS from a
distro), not tuned for the specific CPU
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Daniele Di Proietto [Sat, 6 Sep 2014 08:10:42 +0000 (08:10 +0000)]
dpif-netdev: Introduce netdev_flow_key_* functions
netdev_flow_key is a miniflow with the following constraints:
1) It is used only inside dpif-netdev.c.
2) It always has inline values.
3) It contains only miniflows created by miniflow_extract().
Therefore, by using these new functions instead of the miniflow_*
ones, we get the following (performance related) benefits:
- Because of (1) the functions can be inlined.
- Because of (2) and (3) the netdev_flow_key can be treated as POD.
Specifically, because of (3), we can do comparisons with memcmp,
since if the map is different the miniflow must be different.
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Daniele Di Proietto [Wed, 17 Sep 2014 22:01:48 +0000 (15:01 -0700)]
ofproto-dpif-xlate: Wildcard skb_priority if QoS is disabled
This optimization should give a small performance benefit to the userspace
datapath.
Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Ankur Sharma [Tue, 16 Sep 2014 01:18:05 +0000 (18:18 -0700)]
datapath-windows/Netlink: Add optional flag in policy.
Added the optional flag in policy structure. This would allow
caller to avoid checks for mandatory attributes if parsing
succeeds.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Tue, 16 Sep 2014 01:17:36 +0000 (18:17 -0700)]
datapath-windows: Add support for getting 64 and 16 bit attributes.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ankur Sharma [Tue, 16 Sep 2014 01:17:22 +0000 (18:17 -0700)]
datapath-windows/Netlink: Added support for variable length attributes in validation.
Added minor fix for allowing support for variable lenghth attributes in
parsing policy.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ethan Jackson [Fri, 5 Sep 2014 21:18:27 +0000 (14:18 -0700)]
ovs-dev.py: Support running the clang binaries.
They have slightly different support characteristics, so it's nice to
easily switch between them for testing.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>