[ovs-dev] [PATCH] cfm: Update the ovsdb when remote maintenance points changed.

2014-03-14 Thread Alex Wang
The list of remote maintenance points can be used by other daemons in leader election. This commit makes ovs-vswitchd update the row of remote maintenance points in ovsdb immediately after it is changed. Signed-off-by: Alex Wang --- lib/cfm.c |2 ++ 1 file changed, 2 insertions(+) diff --g

[ovs-dev] [PATCH] socket-util: Fix definition of LINUX.

2014-03-14 Thread Ben Pfaff
Reported-by: Mukesh Hira Signed-off-by: Ben Pfaff --- lib/socket-util.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/socket-util.c b/lib/socket-util.c index 4c79cd6..aeda543 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -53,9 +53,9 @@ VLOG_DEFINE_THI

Re: [ovs-dev] [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall

2014-03-14 Thread Zoltan Kiss
On 11/03/14 19:41, Zoltan Kiss wrote: On 07/03/14 17:59, Thomas Graf wrote: On 03/07/2014 06:28 PM, Pravin Shelar wrote: Problem is mapping SKBTX_DEV_ZEROCOPY pages to userspace. skb_zerocopy is not doing that. Unless I missing something, Current netlink code can not handle skb-frags with zero

Re: [ovs-dev] [urcu v2 14/15] dpif-netdev: Use ovsthread_stats for flow stats.

2014-03-14 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > This should scale better than a single mutex, though still not > ideally. > > Signed-off-by: Ben Pfaff > --- > lib/dpif-netdev.c | 99 > +++-- > 1 file changed, 74 inser

Re: [ovs-dev] [urcu v2 13/15] ovs-thread: Replace ovsthread_counter by more general ovsthread_stats.

2014-03-14 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > This allows clients to do more than just increment a counter. The > following commit will make the first use of that feature. > > Signed-off-by: Ben Pfaff > --- > lib/dpif-netdev.c | 75 +++

[ovs-dev] [log backtrace v2] backtrace: add log_backtrace_*()

2014-03-14 Thread Andy Zhou
log_backtrace() and log_backtrace_msg() logs the back trace into the log file. It may be most useful when debugging unit tests. "backtrace.h" documents the usage. It is not being called directly in the code, but rather as a handy tool available when needed. --- v1->v2: address BEN's review fe

Re: [ovs-dev] [PATCH] backtrace: add LOG_BACKTRACE()

2014-03-14 Thread Andy Zhou
Thanks for the input. I will send out a V2 implementing the suggested changes. On Fri, Mar 14, 2014 at 1:33 PM, Ben Pfaff wrote: > On Thu, Mar 13, 2014 at 06:17:14PM -0700, Andy Zhou wrote: > > LOG_BACKTRACE() logs the back trace into the log file. I find it > > to be helpful when debugging uni

Re: [ovs-dev] [PATCH] backtrace: add LOG_BACKTRACE()

2014-03-14 Thread Ben Pfaff
On Thu, Mar 13, 2014 at 06:17:14PM -0700, Andy Zhou wrote: > LOG_BACKTRACE() logs the back trace into the log file. I find it > to be helpful when debugging unit tests. "backtrace.h" documents > the usage. It is not being called directly in the code, but rather as > a handy tool available when need

Re: [ovs-dev] [urcu v2 13/15] ovs-thread: Replace ovsthread_counter by more general ovsthread_stats.

2014-03-14 Thread Jarno Rajahalme
On Mar 14, 2014, at 2:25 AM, Andy Zhou wrote: > How about using atomic operations to maintain stats instead of per thread > buckets? It seems to be a win at least within a NUMA node from kernel > datapath experience. Atomic modify operations require locking the bus and are thus very expensive

Re: [ovs-dev] [urcu v2 13/15] ovs-thread: Replace ovsthread_counter by more general ovsthread_stats.

2014-03-14 Thread Ben Pfaff
I think that using atomics and using per-thread or per-NUMA node buckets is orthogonal: one can use either technique without the other. I am reluctant to use atomics here because I think we need 64-bit stats (packet counters can definitely roll over past 2**32) and 64-bit atomics are internally im

Re: [ovs-dev] [urcu v2 10/15] ovs-rcu: New library.

2014-03-14 Thread Andy Zhou
On Fri, Mar 14, 2014 at 10:44 AM, Ben Pfaff wrote: > On Fri, Mar 14, 2014 at 01:36:15AM -0700, Andy Zhou wrote: > >Acked-by: Andy Zhou > > Thanks. > > > On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > > > > > RCU allows multiple threads to read objects in parallel without any > > > perf

Re: [ovs-dev] [urcu v2 10/15] ovs-rcu: New library.

2014-03-14 Thread Ben Pfaff
On Fri, Mar 14, 2014 at 01:36:15AM -0700, Andy Zhou wrote: >Acked-by: Andy Zhou Thanks. > On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > > > RCU allows multiple threads to read objects in parallel without any > > performance penalty. The following commit will introduce the first use.

[ovs-dev] [PATCH 3/9] ovs-ofctl: Use fcntl instead of sys/fcntl.

2014-03-14 Thread Gurucharan Shetty
Windows does not have a sys/fcntl.h Signed-off-by: Gurucharan Shetty --- utilities/ovs-ofctl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index e62e646..8ae7c34 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.

[ovs-dev] [PATCH 1/9] windefs: Include the library advapi32.

2014-03-14 Thread Gurucharan Shetty
advapi32 is needed by multiple functions So include it in a common place. Signed-off-by: Gurucharan Shetty --- include/windows/windefs.h |2 ++ lib/daemon-windows.c |2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/windows/windefs.h b/include/windows/wind

[ovs-dev] [PATCH 9/9] BUILD.Windows: Update compilable utilities.

2014-03-14 Thread Gurucharan Shetty
We can now compile a few OVS userspace components on Windows. Signed-off-by: Gurucharan Shetty --- BUILD.Windows |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BUILD.Windows b/BUILD.Windows index 9bbaa80..119334b 100644 --- a/BUILD.Windows +++ b/BUILD.Windows @@ -

[ovs-dev] [PATCH 7/9] windefs: srandom() and random() for windows.

2014-03-14 Thread Gurucharan Shetty
Windows does not have a srandom() and random(). But it does have a srand() and rand(). We use these functions in sflow code. Signed-off-by: Gurucharan Shetty --- include/windows/windefs.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/include/windows/windefs.h b/include/windows/windef

[ovs-dev] [PATCH 2/9] windows/unistd: Add definitions for STD*_FILENO.

2014-03-14 Thread Gurucharan Shetty
Signed-off-by: Gurucharan Shetty --- include/windows/unistd.h |5 + 1 file changed, 5 insertions(+) diff --git a/include/windows/unistd.h b/include/windows/unistd.h index 0f553bb..d9ded5a 100644 --- a/include/windows/unistd.h +++ b/include/windows/unistd.h @@ -18,4 +18,9 @@ #define fs

[ovs-dev] [PATCH 8/9] system-stats: Port for Windows.

2014-03-14 Thread Gurucharan Shetty
This does not provide us all the functionality that is available in Linux. But should be a start. Signed-off-by: Gurucharan Shetty --- include/windows/automake.mk |1 + vswitchd/system-stats.c | 17 + 2 files changed, 18 insertions(+) create mode 100644 include/windows

[ovs-dev] [PATCH 5/9] sflow: Include the windefs.h header for windows.

2014-03-14 Thread Gurucharan Shetty
sflow.h uses u_int32_t that needs windefs.h for compilation in visual studio. Signed-off-by: Gurucharan Shetty --- include/windows/windefs.h |1 + lib/sflow.h |4 2 files changed, 5 insertions(+) diff --git a/include/windows/windefs.h b/include/windows/windefs.h index

[ovs-dev] [PATCH 4/9] ofproto: Don't use DELETE inside enumerator list.

2014-03-14 Thread Gurucharan Shetty
Visual studio does not like it. It is mostly a keyword. Signed-off-by: Gurucharan Shetty --- ofproto/in-band.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ofproto/in-band.c b/ofproto/in-band.c index 265dcb2..416043e 100644 --- a/ofproto/in-band.c +++ b/ofproto/in

[ovs-dev] [PATCH 6/9] strsep: Copy from netbsd.

2014-03-14 Thread Gurucharan Shetty
Windows does not have a strsep. Signed-off-by: Gurucharan Shetty --- COPYING |1 + debian/copyright.in |3 +- include/windows/windefs.h |2 ++ lib/automake.mk |1 + lib/strsep.c | 75 + 5

[ovs-dev] [ovs-discuss] How to Search in Archives?

2014-03-14 Thread Rizwan Jamil
Hi! Search is provided in mininet-discuss and openflow-discuss mailing archives. But why it has not been provided in ovs-dev and ovs-discuss archives? How can I search my question in ovs-dev and ovs-discuss? Regards,Rizwan Jamil ___

Re: [ovs-dev] [urcu v2 15/15] dpif-netdev: Use RCU to protect data.

2014-03-14 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > --- > lib/dpif-netdev.c | 148 > - > 1 file changed, 43 insertions(+), 105 deletions(-) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netd

Re: [ovs-dev] [urcu v2 13/15] ovs-thread: Replace ovsthread_counter by more general ovsthread_stats.

2014-03-14 Thread Andy Zhou
How about using atomic operations to maintain stats instead of per thread buckets? It seems to be a win at least within a NUMA node from kernel datapath experience. On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > This allows clients to do more than just increment a counter. The > following

Re: [ovs-dev] [urcu v2 12/15] util: New functions for allocating memory while avoiding false sharing.

2014-03-14 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > This factors code out of fat-rwlock, making it easily usable by other code. > > Signed-off-by: Ben Pfaff > --- > lib/fat-rwlock.c | 29 ++ > lib/util.c | 60 >

Re: [ovs-dev] [urcu v2 11/15] ofproto: Use RCU to protect rule_actions.

2014-03-14 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > > Conflicts: > lib/ovs-rcu.h > --- > ofproto/connmgr.c|5 +- > ofproto/ofproto-dpif-xlate.c |2 - > ofproto/ofproto-dpif.c |2 - > ofproto/ofproto-provid

Re: [ovs-dev] [urcu v2 10/15] ovs-rcu: New library.

2014-03-14 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Mar 11, 2014 at 1:56 PM, Ben Pfaff wrote: > RCU allows multiple threads to read objects in parallel without any > performance penalty. The following commit will introduce the first use. > > Signed-off-by: Ben Pfaff > --- > lib/automake.mk |2 +

[ovs-dev] [PATCH] [RFC] flow: Do not clear L3+ fields of flow in flow_push_mpls()

2014-03-14 Thread Simon Horman
When creating a flow in the datapath as the result of an upcall the match itself is the match supplied in the upcall while the mask of the match, if supplied, is generated based on the flow and mask composed during action translation. In the case of, for example a UDP packet, the match will includ

[ovs-dev] [PATCH v2.55] datapath: Add basic MPLS support to kernel

2014-03-14 Thread Simon Horman
Hi Pravin, Hi Jesse, Hi All, I have updated this patch so that: * The datapath rejects push MPLS actions in the presence of VLAN tags. I have done this by white-listing the following: - ETH_P_IP (0x0800) - ETH_P_ARP (0x0806) - ETH_P_RARP (0x0835) - ETH_P_IPV6 (0x86DD) Previously it

[ovs-dev] [PATCH v2.55] datapath: Add basic MPLS support to kernel

2014-03-14 Thread Simon Horman
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 Cc: Leo Alterman Cc: Isaku Yamahata Cc: Joe Stringer Signed-off-by: Sim