Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Zhou, Han
Hi Alex, On Wed, 2014-02-12 at 20:24 -0800, Alex Wang wrote: > > > I'd very much like to get a full review from you. Are you planning to do > that? > > > Also want to ask about your timetable, do you think you could finish review > this week? > Yes, I will try to finish review by this wee

[ovs-dev] [PATCH v7] ofproto: Honour Table Mod settings for table-miss handling

2014-02-12 Thread Simon Horman
This reworks lookup of rules for both table 0 and table action translation. The result is that Table Mod settings, which can alter the miss-behaviour of tables, including table 0, on a per-table basis may be honoured. Previous patches proposed by myself which build on earlier merged patches by And

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Alex Wang
Hey Han, I'd very much like to get a full review from you. Are you planning to do that? Also want to ask about your timetable, do you think you could finish review this week? Appreciate your help, ;D Alex Wang, On Wed, Feb 12, 2014 at 6:37 AM, Zhou, Han wrote: > Hi Alex, > > On Fri, 2014-02

[ovs-dev] [PATCH] ipfix: add SCTP, ICMP, and ICMPv6 flow reporting

2014-02-12 Thread Romain Lenglet
Signed-off-by: Romain Lenglet --- ofproto/ofproto-dpif-ipfix.c | 120 ++ 1 file changed, 87 insertions(+), 33 deletions(-) diff --git a/ofproto/ofproto-dpif-ipfix.c b/ofproto/ofproto-dpif-ipfix.c index 2500efd..a529884 100644 --- a/ofproto/ofproto-dpif-ip

Re: [ovs-dev] [PATCH v2 02/13] datapath: Per NUMA node flow stats.

2014-02-12 Thread Pravin Shelar
On Tue, Feb 11, 2014 at 4:07 PM, Jarno Rajahalme wrote: > Keep kernel flow stats for each NUMA node rather than each (logical) > CPU. This avoids using the per-CPU allocator and removes most of the > kernel-side OVS locking overhead otherwise on the top of perf reports > and allows OVS to scale b

Re: [ovs-dev] [PATCH v2 11/13] datapath: Remove memory allocations from ovs_flow_cmd_execute.

2014-02-12 Thread Pravin Shelar
On Tue, Feb 11, 2014 at 4:07 PM, Jarno Rajahalme wrote: > Signed-off-by: Jarno Rajahalme > --- > datapath/datapath.c | 60 > +++ > 1 file changed, 32 insertions(+), 28 deletions(-) > > diff --git a/datapath/datapath.c b/datapath/datapath.c > ind

Re: [ovs-dev] [PATCH v2 03/13] datapath: Fix race.

2014-02-12 Thread Pravin Shelar
On Tue, Feb 11, 2014 at 4:07 PM, Jarno Rajahalme wrote: > ovs_vport_cmd_dump() did rcu_read_lock() only after getting the > datapath, which could have been deleted in between. Resolved by > taking rcu_read_lock() before the get_dp() call. > > Signed-off-by: Jarno Rajahalme Looks good. Acked-by:

[ovs-dev] [PATCH 1/2] ovs-thread: Add support for pthread adaptive mutex

2014-02-12 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- lib/ovs-thread.c | 11 +++ lib/ovs-thread.h |8 2 files changed, 19 insertions(+) diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index a20b2fd..f0b1e9e 100644 --- a/lib/ovs-thread.c +++ b/lib/ovs-thread.c @@ -168,6 +168,17 @@ ovs_mutex_

[ovs-dev] [PATCH 2/2] ofproto-dpif: Use adaptive mutex for stats.

2014-02-12 Thread Jarno Rajahalme
Stats critical sections are held for very short time, so it makes sense to spin on them for a while rather than sleeping immediately. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/of

[ovs-dev] [PATCH] Windows implementation of stream-fd.

2014-02-12 Thread Linda Sun
Use send/recv for socket stream instead of read/write. Use event handle for polling on socket stream. Check windows specific return code. Signed-off-by: Linda Sun --- lib/automake.mk |7 +- lib/latch-unix.c| 87 +++ lib/latch.c | 87 ---

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Alex Wang
Thanks Han for the review, ;D I misunderstood how rcu works. The access of "vport->upcall_pids" is a "single writer, multiple readers" problem. And it has already been protected by the 'ovs_lock()' in callers. I'll remove the rcu read critical section in the V3 patch. Alex Wang, On Wed, Feb 1

[ovs-dev] [PATCH] FAQ: Mention hairpinning under actions=in_port.

2014-02-12 Thread Joe Stringer
Signed-off-by: Joe Stringer --- I've heard term in the context of using a switch to "bless" traffic. Adding this wording makes it easier to search for the relevant FAQ entry. --- FAQ |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FAQ b/FAQ index a08d65c..6c79efe 1006

[ovs-dev] [PATCHv3 5/7] dpif: Don't synchronize flow_dump_next() status.

2014-02-12 Thread Joe Stringer
Recent changes to the flow_dump_next() interface have made it the responsibility of the dpif implementation to track error status over a flow dump operation. This patch removes status tracking from 'struct dpif_flow_dump', allowing multiple threads to call dpif_flow_dump_next() and track their sta

[ovs-dev] [PATCHv3 6/7] dpif: New function flow_dump_next_may_destroy_keys().

2014-02-12 Thread Joe Stringer
This new function allows callers to determine whether previously returned keys will be modified or reallocated on the next call to dpif_flow_dump_next(). This will be used in a future commit to allow batched flow deletion by revalidator threads. Signed-off-by: Joe Stringer --- v3: Renamed functio

[ovs-dev] [PATCHv3 3/7] dpif: Separate local and shared flow dump state.

2014-02-12 Thread Joe Stringer
This patch separates the structures for thread-local flow dump state ("state") from the shared flow dump state ("iter") in dpif-linux and dpif-netdev. Future patches will make use of this to allow multiple threads to dump flows from the same flow dump operation. Signed-off-by: Joe Stringer --- v3

[ovs-dev] [PATCHv3 2/7] netlink: Make nl_dump_next() thread-safe.

2014-02-12 Thread Joe Stringer
This patch modifies 'struct nl_dump' and nl_dump_next() to allow multiple threads to share the same nl_dump. These changes are targeted around synchronizing dump status between multiple callers, and allowing callers to fully process their existing buffers before determining whether to stop fetching

[ovs-dev] [PATCHv3 4/7] dpif: Make dpif_flow_dump_next() thread-safe.

2014-02-12 Thread Joe Stringer
This patch makes it the caller's responsibility to initialize a per-thread 'state' object and pass it down to the dpif_flow_dump_next() implementation. The implementation can expect to be called from multiple threads with the same 'iter' and different 'state' objects. When flow_dump_next() returns

[ovs-dev] [PATCHv3 7/7] ofproto-dpif: Remove the flow_dumper thread.

2014-02-12 Thread Joe Stringer
From: Ethan Jackson Previously, we had a separate flow_dumper thread that fetched flows from the datapath to distribute to revalidator threads. This patch takes the logic for dumping and pushes it into the revalidator threads, resulting in simpler code with similar performance to the current code

[ovs-dev] [PATCHv3 0/7] Remove the flow_dumper thread.

2014-02-12 Thread Joe Stringer
Currently, we have a single thread (the 'flow_dumper') that fetches the flows from the datapath and distributes them to revalidator threads. To clean up the code and support more flows in the datapath, we are looking at removing this flow_dumper thread, and have each revalidator fetch flows from th

[ovs-dev] [PATCHv3 1/7] netlink: Remove buffer from 'struct nl_dump'.

2014-02-12 Thread Joe Stringer
This patch makes all of the users of 'struct nl_dump' allocate their own buffers to pass down to nl_dump_next(). This paves the way for allowing multithreaded flow dumping. Signed-off-by: Joe Stringer --- v3: Rebase. v2: Add NL_DUMP_BUFSIZE. Add buffer to dpif_linux_flow_state. Fold "netl

Re: [ovs-dev] [netdev-dummy V3 2/2] netdev-dummy: Reduce reconnect back off timeout

2014-02-12 Thread Andy Zhou
Thanks for the review and testing. Pushed. On Tue, Feb 11, 2014 at 3:31 PM, Jarno Rajahalme wrote: > These work for me, and the code looks OK too, so (for both patches): > > Acked-by: Jarno Rajahalme > > On Feb 11, 2014, at 1:53 PM, Andy Zhou wrote: > > > netdev-dummy will mostly be used for t

Re: [ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-12 Thread Ben Pfaff
On Wed, Feb 12, 2014 at 08:59:18AM -0800, Jarno Rajahalme wrote: > > On Feb 11, 2014, at 4:40 PM, Ben Pfaff wrote: > > > On Tue, Feb 11, 2014 at 04:30:44PM -0800, Jarno Rajahalme wrote: > >> Reading the hmap count for determining if it is empty or not is thread > >> safe, so avoid locking when n

Re: [ovs-dev] [PATCH 1/7] meta-flow: Fix setting MFF_IP_FRAG.

2014-02-12 Thread Ben Pfaff
On Wed, Feb 12, 2014 at 08:54:46AM -0800, Jarno Rajahalme wrote: > > On Feb 11, 2014, at 4:45 PM, Ben Pfaff wrote: > > > On Tue, Feb 11, 2014 at 04:38:35PM -0800, Jarno Rajahalme wrote: > >> > >> On Feb 11, 2014, at 4:30 PM, Ben Pfaff wrote: > >> > >>> On Tue, Feb 11, 2014 at 04:30:43PM -0800

Re: [ovs-dev] [PATCH v5 REPOST] ofproto: Honour Table Mod settings for table-miss handling

2014-02-12 Thread Ben Pfaff
On Wed, Feb 12, 2014 at 05:24:30PM +0900, Simon Horman wrote: > On Mon, Feb 03, 2014 at 05:12:12PM -0800, Ben Pfaff wrote: > > On Wed, Jan 29, 2014 at 12:53:03PM +0900, Simon Horman wrote: > > > This reworks lookup of rules for both table 0 and table action > > > translation. > > > The result is t

Re: [ovs-dev] [PATCH 2/7] ofproto: Lock for vlan splinters only if have them.

2014-02-12 Thread Jarno Rajahalme
On Feb 11, 2014, at 4:40 PM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 04:30:44PM -0800, Jarno Rajahalme wrote: >> Reading the hmap count for determining if it is empty or not is thread >> safe, so avoid locking when not necessary. >> >> Signed-off-by: Jarno Rajahalme > > It might be worth a

Re: [ovs-dev] [PATCH 1/7] meta-flow: Fix setting MFF_IP_FRAG.

2014-02-12 Thread Jarno Rajahalme
On Feb 11, 2014, at 4:45 PM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 04:38:35PM -0800, Jarno Rajahalme wrote: >> >> On Feb 11, 2014, at 4:30 PM, Ben Pfaff wrote: >> >>> On Tue, Feb 11, 2014 at 04:30:43PM -0800, Jarno Rajahalme wrote: mf_set_flow_value() was not setting 'flow->nw_frag'

Re: [ovs-dev] [PATCH V2] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-02-12 Thread Zhou, Han
Hi Alex, On Fri, 2014-02-07 at 17:17 -0800, Alex Wang wrote: > This commit removes the 'dispatcher' thread by allowing 'handler' > threads to read upcalls directly from dpif. vport in dpif will > open netlink sockets for each handler and will use the 5-tuple > hash from the missed packet to choos

Re: [ovs-dev] [PATCH v5 REPOST] ofproto: Honour Table Mod settings for table-miss handling

2014-02-12 Thread Simon Horman
On Mon, Feb 03, 2014 at 05:12:12PM -0800, Ben Pfaff wrote: > On Wed, Jan 29, 2014 at 12:53:03PM +0900, Simon Horman wrote: > > This reworks lookup of rules for both table 0 and table action translation. > > The result is that Table Mod settings, which can alter the miss-behaviour > > of tables, inc

Re: [ovs-dev] [PATCH 0/6] Bond port megaflow using recirculation

2014-02-12 Thread Simon Horman
On Tue, Feb 11, 2014 at 03:01:27PM -0800, Ben Pfaff wrote: > On Tue, Feb 04, 2014 at 04:36:18PM -0800, Andy Zhou wrote: > > This patch adds the necessary infrastructure for the next patch series. > > recirculation logic is still work in progress. It is not enabled. There > > should > > be no beha

[ovs-dev] [PATCH/RFC v18 4/6] flow: Add mf_is_l3_or_higher()

2014-02-12 Thread Simon Horman
This is in preparation for adding recirculation where it will be used to test if load, move and set_field actions require recirculation to be performed first. Signed-off-by: Simon Horman --- lib/meta-flow.h | 8 1 file changed, 8 insertions(+) diff --git a/lib/meta-flow.h b/lib/meta-fl

[ovs-dev] [PATCH/RFC v18 6/6] Test hack

2014-02-12 Thread Simon Horman
A quick hack to allow the learn test to pass. I need to investigate the root-cause of its failure. Signed-off-by: Simon Horman --- tests/ofproto-dpif.at | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index bca44de..cecf5ac 100644 --- a/tests/ofp

[ovs-dev] [PATCH/RFC v18 0/6] Packet recirculation for MPLS

2014-02-12 Thread Simon Horman
I am posting this share my implementation with Andy Zhou. I hope this will help us to work towards a recirculation implementation which works for both bridging (the target of his work) and MPLS (the target of this work. Although working in parts intended an RFC and has several limitations: - The l

[ovs-dev] [PATCH/RFC v18 1/6] ofproto-dpif: Break out MPLS controller tests into their own test

2014-02-12 Thread Simon Horman
This makes maintaining the controller test slightly easier by splitting it in two. Based on a similar patch by Joe Stringer. Cc: Joe Stringer Signed-off-by: Simon Horman --- tests/ofproto-dpif.at | 352 ++ 1 file changed, 185 insertions(+), 167 d

[ovs-dev] [PATCH/RFC v18 2/6] flow: add count_mpls_labels()

2014-02-12 Thread Simon Horman
Add count_mpls_labels() which counts LSEs present in an array. This is a more general form of flow_count_mpls_labels(). This is in preparation for using count_mpls_labels() in parse_odp_key_mask_attr() where no struct flow is available. Signed-off-by: Simon Horman --- lib/flow.c | 36 ++

[ovs-dev] [PATCH/RFC v18 3/6] Break out rule_dpif_choose_miss_rule

2014-02-12 Thread Simon Horman
Signed-off-by: Simon Horman --- ofproto/ofproto-dpif.c | 26 +- ofproto/ofproto-dpif.h | 4 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 7b3e1eb..8606226 100644 --- a/ofproto/ofproto-dpif.c +++

Re: [ovs-dev] [PATCH 4/6] lib/odp-util: Add new ODP actions for recirculation

2014-02-12 Thread Simon Horman
Hi Andy, On Tue, Feb 04, 2014 at 04:36:22PM -0800, Andy Zhou wrote: > > Signed-off-by: Andy Zhou > --- > include/linux/openvswitch.h | 26 ++ > lib/dpif-netdev.c |2 ++ > lib/dpif.c |2 ++ > lib/odp-execute.c |2 ++ > li