[ovs-dev] [PATCH] packet: Make set_ethertype() static

2014-02-11 Thread Simon Horman
Make set_ethertype() static as it is not used outside of packet.c Signed-off-by: Simon Horman --- lib/packets.c | 2 +- lib/packets.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/packets.c b/lib/packets.c index 43134dc..7238f42 100644 --- a/lib/packets.c +++ b/lib/pa

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

2014-02-11 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

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

2014-02-11 Thread Simon Horman
Hi Jesse, Hi All, As per the suggestion made by Ben in relation to this patch I have updated it so that: * The datapath rejects push MPLS actions in the presence of VLAN tags. I have done this by blacklisting the following: - ETH_P_8021Q (0x8100) - ETH_P_8021AD (0x88A8) - ETH_P_QINQ1 (0x

Re: [ovs-dev] [PATCH 6/7] ofproto-dpif: Use ovs_spinlock for stats.

2014-02-11 Thread YAMAMOTO Takashi
> ovs_mutex showed high up in 'perf' stats, use a spinlock instead. is the mutex implementation on your platform non-adaptive? YAMAMOTO Takash ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] ofproto: fix interactions between flow monitors and barriers

2014-02-11 Thread YAMAMOTO Takashi
> On Wed, Feb 05, 2014 at 07:04:05PM +0900, YAMAMOTO Takashi wrote: >> Following OpenFlow 1.4 semantics, make barriers wait for >> flow monitor replies. This should fix a race in >> "ofproto - flow monitoring pause and resume" test. >> >> Signed-off-by: YAMAMOTO Takashi > > I still don't unders

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

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 05:52:43PM -0800, Andy Zhou wrote: > On Tue, Feb 11, 2014 at 5:12 PM, Ben Pfaff wrote: > > > On Tue, Feb 11, 2014 at 05:00:33PM -0800, Andy Zhou wrote: > > > On Tue, Feb 11, 2014 at 3:01 PM, Ben Pfaff wrote: > > > > Here's another proposal. Take one OpenFlow table (say,

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

2014-02-11 Thread Andy Zhou
On Tue, Feb 11, 2014 at 5:12 PM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 05:00:33PM -0800, Andy Zhou wrote: > > On Tue, Feb 11, 2014 at 3:01 PM, Ben Pfaff wrote: > > > Here's another proposal. Take one OpenFlow table (say, table 254) > > > and use it for recirculation. Populate the metadata

Re: [ovs-dev] [PATCH 7/7] meta-flow: Add mf_mask_subfield_wc()

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 04:30:49PM -0800, Jarno Rajahalme wrote: > The code setting wc masks shows up in 'perf' reports. This patch streamlines > the code and avoids setting the mask bits for registers or metadata, as > those fields do not exist on datapaths. > > Signed-off-by: Jarno Rajahalme

Re: [ovs-dev] [PATCH 4/4] tests: Add MPLS push on MPLS test.

2014-02-11 Thread Simon Horman
On Tue, Feb 11, 2014 at 05:06:53PM -0800, Joe Stringer wrote: > On 11 February 2014 16:53, Simon Horman wrote: > > > > I believe that the reason you are seeing a VLAN tagged packet come out is > > that you are sending a VLAN tagged packet in. This is because of > > eth_type(0x8100), which I believ

Re: [ovs-dev] [PATCH 6/7] ofproto-dpif: Use ovs_spinlock for stats.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 04:30:48PM -0800, Jarno Rajahalme wrote: > ovs_mutex showed high up in 'perf' stats, use a spinlock instead. > > Signed-off-by: Jarno Rajahalme Do spinlocks perform better than adaptive mutexes, e.g. that one would initialize by adding a function like this: /* Initialize

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

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 05:22:55PM -0800, Jesse Gross wrote: > On Tue, Feb 11, 2014 at 5:12 PM, Ben Pfaff wrote: > > On Tue, Feb 11, 2014 at 05:00:33PM -0800, Andy Zhou wrote: > >> Bonding metaflow does not need it, but one can envision that > >> controller may want to manage (some subset of) reci

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

2014-02-11 Thread Jesse Gross
On Tue, Feb 11, 2014 at 5:12 PM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 05:00:33PM -0800, Andy Zhou wrote: >> Bonding metaflow does not need it, but one can envision that >> controller may want to manage (some subset of) recirc_ids in the >> future. In those cases, table 254 is a good candida

Re: [ovs-dev] [PATCH 4/7] ofproto: Move 'rule->used' to the provider.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 04:30:46PM -0800, Jarno Rajahalme wrote: > Rule's 'used' timestamp is updated at the same time with the other > stats. So far the 'used' has been updated without proper protection, > which may lead to 'tearing' in 32-bit architectures, resulting in an > incorrect 'used' tim

[ovs-dev] [PATCH v2 1/2] tests: Add MPLS push on MPLS test.

2014-02-11 Thread Simon Horman
From: Joe Stringer Signed-off-by: Joe Stringer Co-Authored-By: Simon Horman Signed-off-by: Simon Horman --- v2 [Simon Horman] * Ethtype of (MPLS) input packet should be an MPLS type rather than a VLAN type (0x8100) * Input packet only contains an L2 header and MPLS label stack entry, zero

[ovs-dev] [PATCH v2 0/2] MPLS push on MPLS packet

2014-02-11 Thread Simon Horman
Hi, this series builds on a patch posted by Joe Stringer. It aims to: * Provide a working version of the MPLS push on MPLS test originally posted by Joe and; * Fix a bug and add a test-case for the case where an MPLS push on an MPLS packet causes the ethernet type to change. Joe Stringer (1)

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

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 05:00:33PM -0800, Andy Zhou wrote: > On Tue, Feb 11, 2014 at 3:01 PM, Ben Pfaff wrote: > > Here's another proposal. Take one OpenFlow table (say, table 254) > > and use it for recirculation. Populate the metadata field (yes, it's 64 > > bits, but that's OK) with the recir

[ovs-dev] [PATCH v2 2/2] packets: Always set ethertype in push_mpls()

2014-02-11 Thread Simon Horman
There are two different MPLS ethertypes, 0x8847 and 0x8848 and a push MPLS action applied to an MPLS packet may cause the ethertype to change from one to the other. To ensure that this happens update the ethertype in push_mpls() regardless of if the packet is already MPLS or not. Test based on a s

Re: [ovs-dev] [PATCH 4/4] tests: Add MPLS push on MPLS test.

2014-02-11 Thread Joe Stringer
On 11 February 2014 16:53, Simon Horman wrote: > > I believe that the reason you are seeing a VLAN tagged packet come out is > that you are sending a VLAN tagged packet in. This is because of > eth_type(0x8100), which I believe should be eth_type(0x8847). I see, that makes sense. > The packet

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

2014-02-11 Thread Andy Zhou
This is an interesting idea. I have a few questions in line: On Tue, Feb 11, 2014 at 3:01 PM, 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 progre

Re: [ovs-dev] [PATCH 3/7] ofproto: Optimize the case of a repeated learn action execution.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 04:30:45PM -0800, Jarno Rajahalme wrote: > When the target flow exists already as intended, only the 'modified' > time needs to be updated. Allow modification without taking the > 'ofproto_mutex' by always using the 'rule->mutex' when accessing the > 'modified' time. > > S

Re: [ovs-dev] [PATCH 4/4] tests: Add MPLS push on MPLS test.

2014-02-11 Thread Simon Horman
Hi Joe, On Fri, Feb 07, 2014 at 04:39:55PM -0800, Joe Stringer wrote: > Signed-off-by: Joe Stringer > --- > This test currently fails, and for some reason we're seeing a VLAN > tagged packet arrive at the monitor. The expected result is not 100% > correct, but it's a lot closer than what OVS is c

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

2014-02-11 Thread Ben Pfaff
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' properly. > >> > >> Signed-off-by: Jarno Rajahalme

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

2014-02-11 Thread Ben Pfaff
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 adding an atomic_thread_fence(memory_order_acquire); before

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

2014-02-11 Thread Jarno Rajahalme
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' properly. >> >> Signed-off-by: Jarno Rajahalme > > Will you backport this as far as necessary? > > Acked-by: Ben Pfaff Pus

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

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 04:30:43PM -0800, Jarno Rajahalme wrote: > mf_set_flow_value() was not setting 'flow->nw_frag' properly. > > Signed-off-by: Jarno Rajahalme Will you backport this as far as necessary? Acked-by: Ben Pfaff ___ dev mailing list d

[ovs-dev] [PATCH 6/7] ofproto-dpif: Use ovs_spinlock for stats.

2014-02-11 Thread Jarno Rajahalme
ovs_mutex showed high up in 'perf' stats, use a spinlock instead. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c | 95 +++- 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c ind

[ovs-dev] [PATCH 0/7] ofproto: Reduce lock contention etc.

2014-02-11 Thread Jarno Rajahalme
I have included indicative performance test numbers from a netperf TCP_CRR test, tested on top of the kernel side lock contention patches sent out separately. Jarno Rajahalme (7): 56.8k (datapath lock contention patches) meta-flow: Fix setting MFF_IP_FRAG. 57kofproto: Lock for vlan spl

[ovs-dev] [PATCH 5/7] lib/ovs-thread: ovs_spinlock

2014-02-11 Thread Jarno Rajahalme
pthread_spin_* wrappers to be used for extremely small critical sections. Signed-off-by: Jarno Rajahalme --- lib/ovs-thread.c | 56 -- lib/ovs-thread.h | 26 + 2 files changed, 63 insertions(+), 19 deletions(-) diff

[ovs-dev] [PATCH 7/7] meta-flow: Add mf_mask_subfield_wc()

2014-02-11 Thread Jarno Rajahalme
The code setting wc masks shows up in 'perf' reports. This patch streamlines the code and avoids setting the mask bits for registers or metadata, as those fields do not exist on datapaths. Signed-off-by: Jarno Rajahalme --- lib/learn.c |4 +- lib/meta-flow.c |

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

2014-02-11 Thread Jarno Rajahalme
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 --- ofproto/ofproto-dpif-xlate.c | 19 +-- ofproto/ofproto-dpif.c | 17 +++-- 2 files changed, 20 insertions(+),

[ovs-dev] [PATCH 4/7] ofproto: Move 'rule->used' to the provider.

2014-02-11 Thread Jarno Rajahalme
Rule's 'used' timestamp is updated at the same time with the other stats. So far the 'used' has been updated without proper protection, which may lead to 'tearing' in 32-bit architectures, resulting in an incorrect 'used' timestamp. While in practice this is highly improbable, it is still better

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

2014-02-11 Thread Jarno Rajahalme
mf_set_flow_value() was not setting 'flow->nw_frag' properly. Signed-off-by: Jarno Rajahalme --- lib/meta-flow.c |2 +- tests/ofproto-dpif.at |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index d08dacc..3afcd4c 100644 ---

[ovs-dev] [PATCH 3/7] ofproto: Optimize the case of a repeated learn action execution.

2014-02-11 Thread Jarno Rajahalme
When the target flow exists already as intended, only the 'modified' time needs to be updated. Allow modification without taking the 'ofproto_mutex' by always using the 'rule->mutex' when accessing the 'modified' time. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-provider.h | 18 +++

[ovs-dev] [PATCH v2 13/13] datapath: Do not return actions from flow delete.

2014-02-11 Thread Jarno Rajahalme
Not returning the actions from flow delete allows the reply (if any) be allocated before taking the lock, and failing out properly if no memory is available. It seems that userspace has no plausable use for the actions in a flow delete reply, so this should be OK. Signed-off-by: Jarno Rajahalme

[ovs-dev] [PATCH v2 08/13] datapath: Minimize ovs_flow_cmd_del critical section.

2014-02-11 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- datapath/datapath.c | 75 ++- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 452b889..cbdd68f 100644 --- a/datapath/datapath.c +++ b/datapath/datap

[ovs-dev] [PATCH v2 12/13] datapath: Build netlink reply only if needed.

2014-02-11 Thread Jarno Rajahalme
Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a reply is needed or not. Signed-off-by: Jarno Rajahalme --- datapath/datapath.c | 57 +++ 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/datapath/datapath.c b/datap

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

2014-02-11 Thread Jarno Rajahalme
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 --- v2: No change datapath/datapath.c |7 --- 1 file changed, 4 insertions(+),

[ovs-dev] [PATCH v2 10/13] datapath: Store alloced size with sw_flow_acts.

2014-02-11 Thread Jarno Rajahalme
This helps reduce calls to ksize(). Also add support for statically alloced actions, which will be used by a subsequent patch. Signed-off-by: Jarno Rajahalme --- datapath/datapath.c |2 +- datapath/flow.h |2 ++ datapath/flow_netlink.c | 20 +++- datapath/f

[ovs-dev] [PATCH v2 04/13] datapath: Avoid assigning a NULL pointer to flow actions.

2014-02-11 Thread Jarno Rajahalme
Flow SET can set an empty set of actions by not passing any actions. Previously, we assigned the flow's actions pointer to NULL in this case, but we never check for the NULL pointer later on. This patch modifies this case to allocate a valid but empty set of actions instead. Signed-off-by: Jarno

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

2014-02-11 Thread Jarno Rajahalme
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 index a46ceb0..90fdc60 100644 --- a/datapath/datapath.c +++ b/datapath/datap

[ovs-dev] [PATCH v2 09/13] datapath: Minimize ovs_flow_cmd_new_or_set critical section.

2014-02-11 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- datapath/datapath.c | 83 - datapath/flow_table.c |2 +- datapath/flow_table.h |2 +- 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index cbd

[ovs-dev] [PATCH v2 05/13] datapath: Use TCP flags in the flow key for stats.

2014-02-11 Thread Jarno Rajahalme
We already extract the TCP flags for the key, might as well use that for stats. Signed-off-by: Jarno Rajahalme --- datapath/flow.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/datapath/flow.c b/datapath/flow.c index 6ed5250..3a6d424 100644 --- a/datapath/

[ovs-dev] [PATCH v2 07/13] datapath: Minimize dp and vport critical sections.

2014-02-11 Thread Jarno Rajahalme
Move most memory allocations away from the ovs_mutex critical sections. vport allocations still happen while the lock is taken, as changing that would require major refactoring. Also, vports are created very rarely so it should not matter. Change ovs_dp_cmd_get() now only takes the rcu_read_lock(

[ovs-dev] [PATCH v2 06/13] datapath: Clarify locking.

2014-02-11 Thread Jarno Rajahalme
Remove unnecessary locking from functions that are always called with appropriate locking. Signed-off-by: Jarno Rajahalme --- datapath/datapath.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 0e5e3a1..cdac2dd 1

[ovs-dev] [PATCH v2 01/13] datapath: Remove 5-tuple optimization.

2014-02-11 Thread Jarno Rajahalme
The 5-tuple optimization becomes unnecessary with a later per-NUMA node stats patch. Remove it first to make the changes easier to grasp. Signed-off-by: Jarno Rajahalme --- datapath/datapath.c | 11 - datapath/flow.c | 41 - datapath/flow.

[ovs-dev] [PATCH v2 00/13] datapath: Reduce lock contention.

2014-02-11 Thread Jarno Rajahalme
This series reduces kernel datapath lock contention. I have included the NUMA stats patches, as the rest do not apply cleanly without them. I have added netperf TCP_CRR results (connections/second) as the first column in the list below. These are in a specific 2-socket server, YMMV. I have inclu

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

2014-02-11 Thread Jarno Rajahalme
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 better with higher number of threads. With 9 handlers and 4 reval

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

2014-02-11 Thread Jarno Rajahalme
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 testing and debugging over fairly > reliable connection. Reduce reconnect back off timeout in case the first > con

Re: [ovs-dev] [PATCH] tunnel: Support all combinations of flow-based and specific tunnel matches.

2014-02-11 Thread Pritesh Kothari (pritkoth)
On Feb 11, 2014, at 3:20 PM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 06:48:33PM +, Pritesh Kothari (pritkoth) wrote: >> >> On Feb 11, 2014, at 8:05 AM, Ben Pfaff wrote: >> >>> On Tue, Feb 11, 2014 at 12:00:46AM +, Pritesh Kothari (pritkoth) wrote: any insight into this would b

[ovs-dev] [PATCH] ipfix: fix upcall cookie size checks to support 8 byte cookies

2014-02-11 Thread Romain Lenglet
Commit 96ed775f resizes all userspace metadata to be 8 bytes minimum. Fix the upcall size checks accordingly. Signed-off-by: Romain Lenglet --- ofproto/ofproto-dpif-upcall.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofp

Re: [ovs-dev] [PATCH] tunnel: Support all combinations of flow-based and specific tunnel matches.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 06:48:33PM +, Pritesh Kothari (pritkoth) wrote: > > On Feb 11, 2014, at 8:05 AM, Ben Pfaff wrote: > > > On Tue, Feb 11, 2014 at 12:00:46AM +, Pritesh Kothari (pritkoth) wrote: > >> any insight into this would be greatly appreciated, alternatively i was > >> think

Re: [ovs-dev] [PATCH] tunnel: Support all combinations of flow-based and specific tunnel matches.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 06:48:30PM +, Pritesh Kothari (pritkoth) wrote: > looks good to me. > > Acked-by: pritesh Thanks, applied to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

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

2014-02-11 Thread Ben Pfaff
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 behavior change. The need to always match on recirc_id makes it differe

[ovs-dev] [PATCH] upcall: Allow max_idle be configured through ovs-vsctl.

2014-02-11 Thread Joe Stringer
Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c |8 +--- ofproto/ofproto-provider.h|4 ofproto/ofproto.c |9 + ofproto/ofproto.h |2 ++ vswitchd/bridge.c |2 ++ vswitchd/vswitch.ovsschema|8 ++--

[ovs-dev] [PATCH 2/5] upcall: Defer ukey deletion until after pushing stats.

2014-02-11 Thread Joe Stringer
It is possible for a datapath to dump the same flow twice, for instance if the flow is the last in a batch of flows to be dumped, then a new flow is inserted into the same bucket before the flow dumper fetches another batch. In this case, datapath flow stats may be duplicated: The revalidator reco

[ovs-dev] [PATCH 3/5] upcall: Refactor ukey creation and dump handling

2014-02-11 Thread Joe Stringer
This splits out functions for re-use by later patches, and compacts the udump revalidation code. Co-authored-by: Ethan Jackson Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 134 - 1 file changed, 78 insertions(+), 56 deletions(-) diff

[ovs-dev] [PATCH 5/5] upcall: Remove datapath flows when setting n-threads.

2014-02-11 Thread Joe Stringer
Previously, we would delete all ukeys when changing the number of threads, but leave all flows in the datapath. This would cause double-counting of stats for any flows that remain in the datapath. This patch fixes the issue by ensuring that all flows are deleted from the datapath before changing th

[ovs-dev] [PATCH 4/5] upcall: Delete flows that were not recently dumped.

2014-02-11 Thread Joe Stringer
Previously, we would clean up the ukeys whose flow was not seen in the most recent dump, while leaving the flow in the datapath. In the unlikely case that the datapath fails to dump a flow that still exists in the datapath, this would cause double-counting of those flow stats. This is currently ve

[ovs-dev] [PATCH 1/5] ofproto-dpif: Test flow stats reporting.

2014-02-11 Thread Joe Stringer
Basic test to check that the datapath reports the correct number of packets seen, after a delay of 1 second. Signed-off-by: Joe Stringer --- tests/ofproto-dpif.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 8dcd

[ovs-dev] [netdev-dummy V3 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Andy Zhou
The netdev-dummy unit test ran into the reconnect condition on Jarno's machine. With his test environment, we found and fixed the bugs in handling reconnect. Co-authored-by: Jarno Rajahalme Signed-off-by: Jarno Rajahalme Signed-off-by: Andy Zhou --- lib/netdev-dummy.c | 43 ++

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

2014-02-11 Thread Andy Zhou
netdev-dummy will mostly be used for testing and debugging over fairly reliable connection. Reduce reconnect back off timeout in case the first connect attempt failed. Signed-off-by: Andy Zhou --- lib/netdev-dummy.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netde

Re: [ovs-dev] [netdev-dummy V2 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Andy Zhou
Thanks. Will send out V3 soon. I dropped the list by mistake. On Tue, Feb 11, 2014 at 1:37 PM, Ben Pfaff wrote: > I guess you (or I?) dropped the list by mistake, so I'm adding it back. > > Definitely. With very few exceptions, we basically don't block anywhere > in vswitchd. If you do, it

Re: [ovs-dev] [netdev-dummy V2 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Ben Pfaff
Thanks. Sorry to be unclear earlier. On Tue, Feb 11, 2014 at 01:41:23PM -0800, Andy Zhou wrote: > Thanks. Will send out V3 soon. I dropped the list by mistake. > > > On Tue, Feb 11, 2014 at 1:37 PM, Ben Pfaff wrote: > > > I guess you (or I?) dropped the list by mistake, so I'm adding it bac

Re: [ovs-dev] [netdev-dummy V2 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Ben Pfaff
I guess you (or I?) dropped the list by mistake, so I'm adding it back. Definitely. With very few exceptions, we basically don't block anywhere in vswitchd. If you do, it can delay everything else happening in that thread. On Tue, Feb 11, 2014 at 01:31:29PM -0800, Andy Zhou wrote: > Do you mean

Re: [ovs-dev] test 683 intermittently failing

2014-02-11 Thread Ben Pfaff
Can't hurt at least, thanks. On Tue, Feb 11, 2014 at 01:29:33PM -0800, Joe Stringer wrote: > I'm about to post a few stats duplication bugfixes, but it's hard to say > whether they fix this particular issue. > > > On 11 February 2014 13:14, Ben Pfaff wrote: > > > I've noticed that test 683 (of

Re: [ovs-dev] test 683 intermittently failing

2014-02-11 Thread Joe Stringer
I'm about to post a few stats duplication bugfixes, but it's hard to say whether they fix this particular issue. On 11 February 2014 13:14, Ben Pfaff wrote: > I've noticed that test 683 (ofproto-dpif - controller) fails > intermittently for me. The failure report is always something like > thi

Re: [ovs-dev] [netdev-dummy V2 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 01:15:01PM -0800, Andy Zhou wrote: > The netdev-dummy unit test ran into the reconnect condition on Jarno's > machine. With his test environment, we found and fixed the bugs in > handling reconnect. > > Co-authored-by: Jarno Rajahalme > Signed-off-by: Jarno Rajahalme > Si

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

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 01:15:02PM -0800, Andy Zhou wrote: > netdev-dummy will mostly be used for testing and debugging over fairly > reliable connection. Reduce reconnect back off timeout in case the first > connect attempt failed. > > Signed-off-by: Andy Zhou Acked-by: Ben Pfaff _

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

2014-02-11 Thread Andy Zhou
netdev-dummy will mostly be used for testing and debugging over fairly reliable connection. Reduce reconnect back off timeout in case the first connect attempt failed. Signed-off-by: Andy Zhou --- lib/netdev-dummy.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netde

[ovs-dev] test 683 intermittently failing

2014-02-11 Thread Ben Pfaff
I've noticed that test 683 (ofproto-dpif - controller) fails intermittently for me. The failure report is always something like this: ../../tests/ofproto-dpif.at:893: cat ofctl_monitor.log ../../tests/ofproto-dpif.at:922: ovs-ofctl dump-flows br0 | ofctl_strip | sort --- - 2014-02-11 12:45:41.1

[ovs-dev] [netdev-dummy V2 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Andy Zhou
The netdev-dummy unit test ran into the reconnect condition on Jarno's machine. With his test environment, we found and fixed the bugs in handling reconnect. Co-authored-by: Jarno Rajahalme Signed-off-by: Jarno Rajahalme Signed-off-by: Andy Zhou --- lib/netdev-dummy.c | 55 ++

Re: [ovs-dev] [PATCH] ofproto: fix interactions between flow monitors and barriers

2014-02-11 Thread Ben Pfaff
On Wed, Feb 05, 2014 at 07:04:05PM +0900, YAMAMOTO Takashi wrote: > Following OpenFlow 1.4 semantics, make barriers wait for > flow monitor replies. This should fix a race in > "ofproto - flow monitoring pause and resume" test. > > Signed-off-by: YAMAMOTO Takashi I still don't understand this.

Re: [ovs-dev] [netdev dummy 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Andy Zhou
I see. Let me restructure this patch to avoid blocking in the main loop. On Tue, Feb 11, 2014 at 11:55 AM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 11:41:49AM -0800, Andy Zhou wrote: > > The netdev-dummy unit test ran into the reconnect condition on Jarno's > > machine. With his test environm

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

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 11:41:50AM -0800, Andy Zhou wrote: > netdev-dummy will mostly be used for testing and debugging over fairly > reliable connection. Reduce reconnect back off timeout in case the first > connect attempt failed. > > Signed-off-by: Andy Zhou Acked-by: Ben Pfaff _

Re: [ovs-dev] [netdev dummy 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 11:41:49AM -0800, Andy Zhou wrote: > The netdev-dummy unit test ran into the reconnect condition on Jarno's > machine. With his test environment, we found and fixed the bugs in > handling reconnect. > > Co-authored-by: Jarno Rajahalme > Signed-off-by: Jarno Rajahalme > Si

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

2014-02-11 Thread Andy Zhou
netdev-dummy will mostly be used for testing and debugging over fairly reliable connection. Reduce reconnect back off timeout in case the first connect attempt failed. Signed-off-by: Andy Zhou --- lib/netdev-dummy.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netde

[ovs-dev] [netdev dummy 1/2] netdev-dummy: Fix reconnecting.

2014-02-11 Thread Andy Zhou
The netdev-dummy unit test ran into the reconnect condition on Jarno's machine. With his test environment, we found and fixed the bugs in handling reconnect. Co-authored-by: Jarno Rajahalme Signed-off-by: Jarno Rajahalme Signed-off-by: Andy Zhou --- lib/netdev-dummy.c | 58 ++

Re: [ovs-dev] [PATCH V2] bond: Change the way of assigning bond slave for unassigned bond entry.

2014-02-11 Thread Alex Wang
Thanks for the improvement, this looks much better. I should keep reminding myself about using the thread-safety annotations. In the V2 patch, the writer of 'enabled_slaves' does not grab the mutex. I add the following change to comply with the comments and will apply it soon, diff --git a/ofp

Re: [ovs-dev] [PATCH] tunnel: Support all combinations of flow-based and specific tunnel matches.

2014-02-11 Thread Pritesh Kothari (pritkoth)
On Feb 11, 2014, at 8:05 AM, Ben Pfaff wrote: > On Tue, Feb 11, 2014 at 12:00:46AM +, Pritesh Kothari (pritkoth) wrote: >> Hi Ben, >> >>> -static const struct tnl_match_pattern patterns[] = { >>> -{ false, false, IP_SRC_CFG }, /* remote_ip, local_ip, in_key. */ >>> -{ f

Re: [ovs-dev] [PATCH] tunnel: Support all combinations of flow-based and specific tunnel matches.

2014-02-11 Thread Pritesh Kothari (pritkoth)
looks good to me. Acked-by: pritesh On Feb 4, 2014, at 1:19 PM, Ben Pfaff wrote: > There are 12 possible ways to specify a tunnel (2 * 2 * 3 == 12): > >- Specific in_key or flow-based (2 choices). > >- Specific ip_dst or flow-based (2 choices). > >- Specific ip_src, wildcarded,

Re: [ovs-dev] [PATCH 4/4] tests: Add MPLS push on MPLS test.

2014-02-11 Thread Joe Stringer
On 11 February 2014 10:05, Ben Pfaff wrote: > On Fri, Feb 07, 2014 at 04:39:55PM -0800, Joe Stringer wrote: > > Signed-off-by: Joe Stringer > > --- > > This test currently fails, and for some reason we're seeing a VLAN > > tagged packet arrive at the monitor. The expected result is not 100% > >

Re: [ovs-dev] [PATCH 3/4] tests: Fix MPLS test cases.

2014-02-11 Thread Joe Stringer
On 11 February 2014 10:01, Ben Pfaff wrote: > On Fri, Feb 07, 2014 at 04:39:54PM -0800, Joe Stringer wrote: > > The "userspace" MPLS test case was checking the same things as the > > "drop" test case, rather than checking to see that packets were being > > sent to userspace. This patch makes the

Re: [ovs-dev] [PATCH V2] bond: Change the way of assigning bond slave for unassigned bond entry.

2014-02-11 Thread Ben Pfaff
On Fri, Feb 07, 2014 at 10:46:41AM -0800, Alex Wang wrote: > Before this commit, ovs randomly selects a slave for unassigned > bond entry. If the selected slave is not enabled, the active slave > is chosen instead. In this commit, the slave is selected from the > list of all enabled slaves in a r

Re: [ovs-dev] [PATCH 4/4] tests: Add MPLS push on MPLS test.

2014-02-11 Thread Ben Pfaff
On Fri, Feb 07, 2014 at 04:39:55PM -0800, Joe Stringer wrote: > Signed-off-by: Joe Stringer > --- > This test currently fails, and for some reason we're seeing a VLAN > tagged packet arrive at the monitor. The expected result is not 100% > correct, but it's a lot closer than what OVS is currently

Re: [ovs-dev] [PATCH 3/4] tests: Fix MPLS test cases.

2014-02-11 Thread Ben Pfaff
On Fri, Feb 07, 2014 at 04:39:54PM -0800, Joe Stringer wrote: > The "userspace" MPLS test case was checking the same things as the > "drop" test case, rather than checking to see that packets were being > sent to userspace. This patch makes the testsuite consistent with itself. > > Signed-off-by:

Re: [ovs-dev] [PATCH] tests: Add missing banner.

2014-02-11 Thread Ben Pfaff
Applied to master, thanks. On Tue, Feb 11, 2014 at 10:42:43AM +0530, Arun Sharma wrote: > Verified & looks good. Thanks Ben. > > On 11/02/14 12:54 AM, "Ben Pfaff" wrote: > > >Reported-by: Arun Sharma > >Signed-off-by: Ben Pfaff > >--- > > tests/ovsdb-server.at |2 ++ > > 1 file changed, 2

Re: [ovs-dev] [PATCH v3 3/3] stream-ssl: Add support for windows platform.

2014-02-11 Thread Gurucharan Shetty
On Tue, Feb 11, 2014 at 8:17 AM, Ben Pfaff wrote: > On Mon, Feb 10, 2014 at 03:25:38PM -0800, Gurucharan Shetty wrote: >> This commit creates events and through poll_fd_wait_event() >> associates them with socket file descriptors to get woken up >> from poll_block(). >> >> Some other changes: >> >

Re: [ovs-dev] [PATCH v3 1/3] poll-loop: Make poll_fd_wait_event() cross-platform.

2014-02-11 Thread Gurucharan Shetty
On Tue, Feb 11, 2014 at 8:07 AM, Ben Pfaff wrote: > On Mon, Feb 10, 2014 at 03:25:36PM -0800, Gurucharan Shetty wrote: >> This is helpful if we want to wait either on 'fd' for POSIX or >> events for Windows. >> >> For Windows, if both 'fd' and 'wevent' is specified, we associate >> that event with

Re: [ovs-dev] [PATCH v3 3/3] stream-ssl: Add support for windows platform.

2014-02-11 Thread Ben Pfaff
On Mon, Feb 10, 2014 at 03:25:38PM -0800, Gurucharan Shetty wrote: > This commit creates events and through poll_fd_wait_event() > associates them with socket file descriptors to get woken up > from poll_block(). > > Some other changes: > > * Windows does not have sys/fcntl.h but has a fcntl.h >

Re: [ovs-dev] [PATCH v3 2/3] socket-util: error number to string for sockets.

2014-02-11 Thread Ben Pfaff
On Mon, Feb 10, 2014 at 03:25:37PM -0800, Gurucharan Shetty wrote: > For winsock2 functions, error number has to be converted to string > using FormatMessage(). > > Signed-off-by: Gurucharan Shetty The ovs_strerror() comment is particularly helpful. Thanks. Acked-by: Ben Pfaff ___

Re: [ovs-dev] [PATCH v3 1/3] poll-loop: Make poll_fd_wait_event() cross-platform.

2014-02-11 Thread Ben Pfaff
On Mon, Feb 10, 2014 at 03:25:36PM -0800, Gurucharan Shetty wrote: > This is helpful if we want to wait either on 'fd' for POSIX or > events for Windows. > > For Windows, if both 'fd' and 'wevent' is specified, we associate > that event with the 'fd' using WSAEventSelect() in poll_block(). > So an

Re: [ovs-dev] [PATCH] tunnel: Support all combinations of flow-based and specific tunnel matches.

2014-02-11 Thread Ben Pfaff
On Tue, Feb 11, 2014 at 12:00:46AM +, Pritesh Kothari (pritkoth) wrote: > Hi Ben, > > > -static const struct tnl_match_pattern patterns[] = { > > -{ false, false, IP_SRC_CFG }, /* remote_ip, local_ip, in_key. */ > > -{ false, false, IP_SRC_ANY }, /* remote_ip, in_key. */

Re: [ovs-dev] [PATCH] pcap-file: Allow capturing TCP streams where the SYN is not seen.

2014-02-11 Thread Ben Pfaff
Applied to master, thanks! On Wed, Feb 05, 2014 at 12:38:10PM -0500, Vasu Dasari wrote: > Ben, > > The code looks good to me and it also works for me. > > -Vasu > > > On Tue, Feb 4, 2014 at 12:05 PM, Ben Pfaff wrote: > > > Until now, the tcp_stream() code has ignored any TCP packets that don