[ovs-dev] [PATCH 2/2] datapath-windows: use the Netlink set API and need new APIs

2014-09-12 Thread Nithin Raju
In this change: 1. we refactor the code that fills up information about the DP into a seprate function. 2. use the netlink set APIs to fill up the netlink attributes. Signed-off-by: Nithin Raju --- datapath-windows/ovsext/Datapath.c | 123 +++- 1 files changed, 6

[ovs-dev] [PATCH 1/2] datapath-windows: fix bug in NlBufCopyAtTailUninit

2014-09-12 Thread Nithin Raju
We should be returning value of tail before the increment and not after. Signed-off-by: Nithin Raju --- datapath-windows/ovsext/Netlink/NetlinkBuf.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/datapath-windows/ovsext/Netlink/NetlinkBuf.c b/datapath-windows/ovse

Re: [ovs-dev] [PATCH v2 2/2] dpif: Use OVS_FLOW_ATTR_PROBE.

2014-09-12 Thread Jarno Rajahalme
> On Sep 12, 2014, at 11:35 AM, Ben Pfaff wrote: > >> On Fri, Sep 12, 2014 at 11:24:23AM -0700, Jarno Rajahalme wrote: >> Use the new OVS_FLOW_ATTR_PROBE flag when probing for datapath feature >> support. Suppress also dpif error logging when requested, as probe >> failures are already logged a

[ovs-dev] [PATCH] ofproto: Do not update stats on fake bond interface.

2014-09-12 Thread Pravin B Shelar
There are couple of reasons to remove this support: * This is used in very old OVS use-case. It is much better to read stats directly from OVS. * Forthcoming commit will remove support for setting stats for vport. The stats update depends on stats-set. Signed-off-by: Pravin B Shelar -

[ovs-dev] [dpdk patch v4 5/5] dpif-netdev: Create multiple pmd threads by default.

2014-09-12 Thread Alex Wang
With this commit, ovs by default will create one pmd thread for each numa node and pin the pmd thread to available cpu core on the numa node. NON_PMD_CORE_ID (currently 0) is used to reserve a particular cpu core for the I/O of all non-pmd threads. No pmd thread can be pinned to this reserved cor

[ovs-dev] [dpdk patch v4 4/5] netdev-dpdk: Remove the tx queue spinlock.

2014-09-12 Thread Alex Wang
The previous commit makes OVS create one tx queue for each cpu core, each pmd thread will use a separate tx queue. Also, tx of non-pmd threads on dpdk interface is all through 'NON_PMD_THREAD_TX_QUEUE', protected by the 'nonpmd_mempool_mutex'. Therefore, the spinlock is no longer needed. And this

[ovs-dev] [dpdk patch v4 3/5] netdev-dpdk: Add indicator for flushing tx queue.

2014-09-12 Thread Alex Wang
Previous commit makes OVS create one tx queue for each cpu core. An upcoming patch will allow multiple pmd threads be created and pinned to cpu cores. So each pmd thread will use the tx queue corresponding to its core id. Moreover, the pmd threads running on different numa node than the dpdk int

[ovs-dev] [dpdk patch v4 2/5] dpif-netdev: Create multiple tx/rx queues when adding dpdk interface.

2014-09-12 Thread Alex Wang
Before this commit, ovs creates one tx and one rx queue for each dpdk interface and uses only one poll thread for handling I/O of all dpdk interfaces. An upcoming patch will allow multiple poll threads be created. As a preparation, this commit changes the dpif-netdev to create multiple tx/rx queu

[ovs-dev] [dpdk patch v4 1/5] netdev: Add function for configuring tx and rx queues.

2014-09-12 Thread Alex Wang
This commit adds a new API to the 'struct netdev_class' which allows user to configure the number of tx queues and rx queues of 'netdev'. Upcoming patches will use this function to set multiple tx/rx queues when adding the netdev to dpif-netdev. Currently, only netdev-dpdk module implements this

Re: [ovs-dev] [PATCH] datapath: Improve robustness of this_cpu_ptr definition in compat layer

2014-09-12 Thread Pravin Shelar
On Fri, Sep 12, 2014 at 12:18 PM, Andy Zhou wrote: > Yes, older distribution kernels may not follow the upstream kernel > pattern. For example, centos-6.5-linux-2.6.32-431. > ok. Acked-by: Pravin B Shelar > On Thu, Sep 11, 2014 at 6:23 PM, Pravin Shelar wrote: >> On Wed, Sep 10, 2014 at 3:58 PM

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Eitan Eliahu
Hi Guru, I tried to use the /TP compilation flag. This resolved the issue of the decltype operator but the __cplusplus reserved compilation variable was automatically defined which caused different code segments of the OVS code to be comiled. I don't know of any other way to enable decltype w

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-12 Thread Eitan Eliahu
My understating is the Cleanup callback is called when the file handle is closed by user mode. However, at that time you can still have outstanding I/O requests in the driver or even synchronous I/O requests sent to the driver from a context of a different user mode thread. We do complete the ou

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-12 Thread Nithin Raju
On Sep 12, 2014, at 12:46 PM, Eitan Eliahu mailto:elia...@vmware.com>> wrote: Sorry for coming late on this one. We should free the dump state when the system calls the driver on cleanup as you did. But, the cleanup IOCTL can be (actually will be) executed from a different thread context. This

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-12 Thread Eitan Eliahu
Hi Nithin, Sorry for coming late on this one. We should free the dump state when the system calls the driver on cleanup as you did. But, the cleanup IOCTL can be (actually will be) executed from a different thread context. This means that we need to protect dumpState.ovsMsg. Eitan -Origina

Re: [ovs-dev] [PATCH] datapath: Improve robustness of this_cpu_ptr definition in compat layer

2014-09-12 Thread Andy Zhou
Yes, older distribution kernels may not follow the upstream kernel pattern. For example, centos-6.5-linux-2.6.32-431. On Thu, Sep 11, 2014 at 6:23 PM, Pravin Shelar wrote: > On Wed, Sep 10, 2014 at 3:58 PM, Andy Zhou wrote: >> Current autoconfig detection logic for HAVE_PER_CPU_PTR is not robust

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Gurucharan Shetty
On Fri, Sep 12, 2014 at 11:22 AM, Eitan Eliahu wrote: > /TP compilation flag can be used on these specific files which uses these > macros. There should be no problem to mix standard C file with files that are > compiled with the /TP flag. Unfortunately, I am not so familiar with > controlling

Re: [ovs-dev] [dpdk patch v3 2/6] netdev: Add n_txq to 'struct netdev'.

2014-09-12 Thread Alex Wang
Applied the first two patches to master. Will rebase the following ones based on the discussion and comments. On Thu, Sep 11, 2014 at 10:38 PM, Pravin Shelar wrote: > On Tue, Sep 9, 2014 at 5:00 PM, Alex Wang wrote: > > This commit adds new variable n_txq to 'struct netdev' for recording > > t

Re: [ovs-dev] [PATCH v2 2/2] dpif: Use OVS_FLOW_ATTR_PROBE.

2014-09-12 Thread Ben Pfaff
On Fri, Sep 12, 2014 at 11:24:23AM -0700, Jarno Rajahalme wrote: > Use the new OVS_FLOW_ATTR_PROBE flag when probing for datapath feature > support. Suppress also dpif error logging when requested, as probe > failures are already logged at ofproto-dpif. > > Signed-off-by: Jarno Rajahalme > Signe

Re: [ovs-dev] [RFC PATCH] lib/odp-util: Relax expectations when parsing a masked key.

2014-09-12 Thread Ben Pfaff
On Thu, Sep 11, 2014 at 11:12:29AM -0700, Jarno Rajahalme wrote: > This could fix using ovs-dpctl to add userspace datapath flows. > > Signed-off-by: Jarno Rajahalme s/prerequisities/prerequisites/ in a comment somewhere. It looks like we need a new exception for the xregs in odp_flow_key_to_fl

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Eitan Eliahu
/TP compilation flag can be used on these specific files which uses these macros. There should be no problem to mix standard C file with files that are compiled with the /TP flag. Unfortunately, I am not so familiar with controlling the build under mingw. Thanks, Eitan -Original Message

[ovs-dev] [PATCH v2 1/2] datapath: Add support for OVS_FLOW_ATTR_PROBE.

2014-09-12 Thread Jarno Rajahalme
This new flag is useful for suppressing error logging while probing for datapath features using flow commands. For backwards compatibility reasons the commands are executed normally, but error logging is suppressed. Signed-off-by: Jarno Rajahalme --- v2: renamed SILENT as PROBE, added comments,

[ovs-dev] [PATCH v2 2/2] dpif: Use OVS_FLOW_ATTR_PROBE.

2014-09-12 Thread Jarno Rajahalme
Use the new OVS_FLOW_ATTR_PROBE flag when probing for datapath feature support. Suppress also dpif error logging when requested, as probe failures are already logged at ofproto-dpif. Signed-off-by: Jarno Rajahalme Signed-off-by: Ben Pfaff --- v2: renamed SILENT as PROBE. lib/dpif-linux.c

[ovs-dev] [PATCH 2/2] ovs-dev.py: skip clang if configure fails

2014-09-12 Thread Daniele Di Proietto
If 'configure' with clang fails (this can happen for example if it doesn't support all the cflags), simply skip it Signed-off-by: Daniele Di Proietto --- utilities/ovs-dev.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py

[ovs-dev] [PATCH 1/2] ovs-dev.py: do not pass --enable-dummy to ovsdb

2014-09-12 Thread Daniele Di Proietto
--enable-dummy was useless anyway for ovsdb-server. Now it is an error to pass it. Signed-off-by: Daniele Di Proietto --- utilities/ovs-dev.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 5cf4771..869d89e 100755 --- a/u

Re: [ovs-dev] [ovs-dev 3/3] ovs-dev.py: Support running the clang binaries.

2014-09-12 Thread Daniele Di Proietto
Acked-by: Daniele Di Proietto On 9/5/14, 2:20 PM, "Ethan Jackson" wrote: >They have slightly different support characteristics, so it's nice to >easily switch between them for testing. > >Signed-off-by: Ethan Jackson >--- > utilities/ovs-dev.py | 18 ++ > 1 file changed, 14 inse

Re: [ovs-dev] [ovs-dev 2/3] ovs-dev.py: Support additional optimization flags.

2014-09-12 Thread Daniele Di Proietto
There¹s a minor issue with this patch: not every option is supported by every compiler (for example, on my system, clang doesn¹t support -Og). In this case ovs-dev.py fails to generate a Makefile. I think we can address this in a separate commit. In the meantime: Acked-by: Daniele Di Proietto O

Re: [ovs-dev] [PATCH] ovs-rcu: Make ovsrcu_quiesce() flush the callback event set.

2014-09-12 Thread Alex Wang
Applied to master with the changes mentioned in previous email. Thanks, On Fri, Sep 12, 2014 at 10:18 AM, Alex Wang wrote: > Thx for pointing it out! > > Actually, I did 'perthread = pthread_getspecific(perthread_key);' instead > of > using 'ovsrcu_perthread_get()', which is wrong. Will fix it

Re: [ovs-dev] [PATCH] ovs-rcu: Make ovsrcu_quiesce() flush the callback event set.

2014-09-12 Thread Alex Wang
Thx for pointing it out! Actually, I did 'perthread = pthread_getspecific(perthread_key);' instead of using 'ovsrcu_perthread_get()', which is wrong. Will fix it and remote the call to ovsrcu_init_module(). On Fri, Sep 12, 2014 at 9:47 AM, Ben Pfaff wrote: > On Tue, Sep 09, 2014 at 11:23:34A

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Eitan Eliahu
Yes, it is C++ type specifier ( part "C++11" extensions) but we could compile our C code to use it. I came across a custom implementation of "typeof" (but C++ too): http://www.boost.org/doc/libs/1_55_0/boost/typeof/msvc/typeof_impl.hpp -Original Message- From: Ben Pfaff [mailto:b...@nici

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Ben Pfaff
On Fri, Sep 12, 2014 at 04:54:52PM +, Eitan Eliahu wrote: > Yes, it is C++ type specifier ( part "C++11" extensions) but we > could compile our C code to use it. I doubt OVS compiles cleanly as C++. ___ dev mailing list dev@openvswitch.org http://ope

Re: [ovs-dev] [PATCH v5] Netlink_socket.c Join/Unjoin an MC group for event subscription

2014-09-12 Thread Ben Pfaff
On Thu, Sep 11, 2014 at 10:01:02AM -0700, Eitan Eliahu wrote: > Use a specific out of band device control to subscribe/unsubscribe a socket > to the driver event queue for notification. > > Signed-off-by: Eitan Eliahu > Acked-by: Nithin Raju > Acked-by: Saurabh Shah > Acked-by: Ankur Sharma >

Re: [ovs-dev] [PATCH v4 2/2] datapath-windows/Netlink: Nested attributes put/parse.

2014-09-12 Thread Ben Pfaff
On Wed, Sep 10, 2014 at 05:36:22PM -0700, Ankur Sharma wrote: > Added APIs for creating and parsing nested netlink attributes. > APIs are on similar lines as userspace netlink code. > > Signed-off-by: Ankur Sharma > Acked-by: Nithin Raju Applied, thanks!

Re: [ovs-dev] [PATCH v2 1/2] datapath-windows/NetlinkBuf.h: Added NlBufSize

2014-09-12 Thread Ben Pfaff
On Wed, Sep 10, 2014 at 04:20:16PM -0700, Ankur Sharma wrote: > Added an inline function to return used size in the buffer. > > Signed-off-by: Ankur Sharma > Acked-by: Nithin Raju Applied, thanks. ___ dev mailing list dev@openvswitch.org http://openvs

Re: [ovs-dev] [RFC PATCH] lib/odp-util: Relax expectations when parsing a masked key.

2014-09-12 Thread Jarno Rajahalme
Ben, Are you happy with this? I really see this as something we could have done at the time we introduced datapath flow key masks (megaflows), but did not. The basic change is that we allow datapath flow setup without requiring key fields that are fully wildcarded to be present. Jarno On Se

Re: [ovs-dev] [PATCH] ovs-rcu: Make ovsrcu_quiesce() flush the callback event set.

2014-09-12 Thread Ben Pfaff
On Tue, Sep 09, 2014 at 11:23:34AM -0700, Alex Wang wrote: > On current master, the per-thread callback event set is flushed > when ovsrcu_quiesce_start() is called or when the callback > event set is full. For threads that only call 'ovsrcu_quiesce()' > to indicate quiescient state, their callbac

Re: [ovs-dev] [dpdk patch v3 3/6] netdev-dpdk: Create multiple tx/rx queues by default.

2014-09-12 Thread Pravin Shelar
On Thu, Sep 11, 2014 at 11:29 PM, Alex Wang wrote: > You mean netdev_open(), or rxq_open() or some function else? > I was referring to netdev_open(). > netdev_open() seems not a good place, it can be called at multiple > places. and we need to keep record of the n_rxq config at some high > level

Re: [ovs-dev] [dpdk patch v3 6/6] dpif-netdev: Create multiple pmd threads by default.

2014-09-12 Thread Jarno Rajahalme
On Sep 11, 2014, at 11:20 PM, Pravin Shelar wrote: > On Thu, Sep 11, 2014 at 10:43 PM, Alex Wang wrote: >> One example is when STP config pkts are received from the dpdk port, >> >> when processing the pkts in xlate's process_special(), if the stp state >> machine need to send a config immedia

Re: [ovs-dev] [PATCH] debian: Don't depened on $RUNLEVEL at startup to create bridges.

2014-09-12 Thread Gurucharan Shetty
On Fri, Sep 12, 2014 at 1:22 AM, Philipp S. Schmidt wrote: > > The patch below fixes the problem for me - Thanks I applied the patch to master branch and 2.3 branch of OVS repo found here: https://github.com/openvswitch/ovs I suppose Ben will eventually upload it to debian. _

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Gurucharan Shetty
> ((LONG)(LONG_PTR)&((decltype(OBJECT))0)->MEMBER) > I think it is the right way to implement it. But, this keyword "decltype" is > ignored by the compiler when above macro is used in the OVS source base. I > don't know the reason for it but it might be related to custom compilation > opt

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Ben Pfaff
On Fri, Sep 12, 2014 at 02:11:00PM +, Eitan Eliahu wrote: > [2] The usage of the decltype does work with of a built in VS project I > created: > #define OBJECT_OFFSETOF(OBJECT, MEMBER) \ > ((LONG)(LONG_PTR)&((decltype(OBJECT))0)->MEMBER) > I think it is the right way to implement it. Bu

Re: [ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

2014-09-12 Thread Eitan Eliahu
[1] The local warning suppression added to the macro does not work as the warning suppression is effected only after the complier encounter the first curly brace "{" (which does not appear in this specific MACRO) #define OBJECT_OFFSETOF(OBJECT, MEMBER) __pragma(warning(push) __pragma(warning(d

[ovs-dev] Rackspace Users List

2014-09-12 Thread alanna hayes
Hi, Would you be interested in *Rackspace *users list for your Sale/Marketing campaigns? Information Fields – Name, Title, Email, Company Name, and Company Details like, Physical Address, Web Address, Revenue Size, Employee Size and industry. We also have other Software/Hardware users like

[ovs-dev] Addition of importance parameter in flow_mod structure for implementation of eviction according to OF1.4

2014-09-12 Thread Rishi Bamba
Hi All, We are working on the implementation of eviction on the basis of importance in accordance to the OpenFlow Specs 1.4.Also we are using Open vSwitch 2.3.0 stable version downloaded from "http://openvswitch.org/releases/openvswitch-2.3.0.tar.gz"; for development. The following changes h

Re: [ovs-dev] Openflow 1.4: Eviction mechanism implementation

2014-09-12 Thread Saloni Jain
Hi Ben/Team, > I would enable eviction if it is configured through the database or through the OpenFlow connection. In current implementation, to enable eviction using create table ... overflow-policy=evict, oftable_enable_eviction() in ofproto.c is called which sets table->eviction fields. I

[ovs-dev] parse first packet in the user space

2014-09-12 Thread Po-Ching Lin
As the first packet of a new flow goes to ovs-vswitchd, we are tracing where the packet is parsed in the source code of ovs-vswitchd. We found the packet is copied to user_skb in datapath.c:queue_userspace_packet, and then passed to the user space by genlmsg_unicast. In the user space, we guess dp

Re: [ovs-dev] [PATCH] debian: Don't depened on $RUNLEVEL at startup to create bridges.

2014-09-12 Thread Philipp S. Schmidt
The patch below fixes the problem for me - Thanks On 11.09.2014, at 18:43, Gurucharan Shetty wrote: > Commit b2a0daa5bd (debian: Don't recreate bridges during manual restart.) > added a check on $RUNLEVEL to only create bridges and ports when the > system starts up. This fix does not work with

Re: [ovs-dev] [RFC ovs-appctl compgen] ovs-appctl: Add bash command-line completion script.

2014-09-12 Thread Alex Wang
depends on this patch: http://openvswitch.org/pipermail/dev/2014-September/045617.html On Fri, Sep 12, 2014 at 12:14 AM, Alex Wang wrote: > This patch is a RFC for the bash command-line completion script > for ovs-appctl command. Right now, the script can do the following: > > - accept user sp

[ovs-dev] [RFC ovs-appctl compgen] ovs-appctl: Add bash command-line completion script.

2014-09-12 Thread Alex Wang
This patch is a RFC for the bash command-line completion script for ovs-appctl command. Right now, the script can do the following: - accept user specified '--target' and query available completions from the corresponding deamons. - once the subcommand (e.g. ofproto/trace) has been given, the