[ovs-dev] [PATCHv11] ofproto-dpif-upcall: Remove the flow_dumper thread.

2014-04-18 Thread Joe Stringer
code. One thread, the "leader", is responsible for beginning and ending each flow dump, maintaining the flow_limit, and checking whether the revalidator threads need to exit. All revalidator threads dump, revalidate, delete datapath flows and garbage collect ukeys. Co-authored-by: Jo

[ovs-dev] [PATCHv12] ofproto-dpif-upcall: Remove the flow_dumper thread.

2014-04-21 Thread Joe Stringer
code. One thread, the "leader", is responsible for beginning and ending each flow dump, maintaining the flow_limit, and checking whether the revalidator threads need to exit. All revalidator threads dump, revalidate, delete datapath flows and garbage collect ukeys. Co-authored-by: Jo

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix logic error in handler/revalidator threads creation and deletion.

2014-04-21 Thread Joe Stringer
Thanks for patching this. I'll hold off on rebasing until this is pushed. On 22 April 2014 15:28, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > > On Mon, Apr 21, 2014 at 8:25 PM, Alex Wang wrote: > > Commit 1f8675481e (ofproto-dpif-upcall: Fix ovs-vswitchd crash.) > > directly copied the

[ovs-dev] [PATCHv13] ofproto-dpif-upcall: Remove the flow_dumper thread.

2014-04-21 Thread Joe Stringer
code. One thread, the "leader", is responsible for beginning and ending each flow dump, maintaining the flow_limit, and checking whether the revalidator threads need to exit. All revalidator threads dump, revalidate, delete datapath flows and garbage collect ukeys. Co-authored-by: Jo

Re: [ovs-dev] [PATCH] TODO: Add the project list from the hackathon.

2014-04-22 Thread Joe Stringer
org/pipermail/dev/2014-January/036107.html If this involves resubmit_stats, then it would also need a new xc_type. The xlate_group_bucket() code would add an entry to ctx->xin->xcache if it is nonnull. This would also need to follow the code in xlate_push_stats() and xlate_cache_clear

[ovs-dev] [PATCH] revalidator: Prevent handling the same flow twice.

2014-04-22 Thread Joe Stringer
f it has already been handled, we skip handling the flow again. We also defer ukey cleanup for flows that fail revalidation, so that the ukey will still exist if the same flow is dumped twice. This allows the above logic to work in this case. Signed-off-by: Joe Stringer --- ofproto/ofproto-dp

[ovs-dev] [PATCHv2] revalidator: Prevent handling the same flow twice.

2014-04-22 Thread Joe Stringer
f it has already been handled, we skip handling the flow again. We also defer ukey cleanup for flows that fail revalidation, so that the ukey will still exist if the same flow is dumped twice. This allows the above logic to work in this case. Signed-off-by: Joe Stringer --- v2: Didn't squas

Re: [ovs-dev] [PATCHv2] revalidator: Prevent handling the same flow twice.

2014-04-23 Thread Joe Stringer
On 24 April 2014 04:56, Alex Wang wrote: > > On Tue, Apr 22, 2014 at 10:24 PM, Alex Wang wrote: > >> diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c >>> index 416cfdc..906bf17 100644 >>> --- a/ofproto/ofproto-dpif-upcall.c >>> +++ b/ofproto/ofproto-dpif-upcall.c >>> @@

Re: [ovs-dev] [PATCHv2] revalidator: Prevent handling the same flow twice.

2014-04-23 Thread Joe Stringer
Pushed to master and branch-2.1. On 24 April 2014 11:06, Joe Stringer wrote: > On 24 April 2014 04:56, Alex Wang wrote: > >> >> On Tue, Apr 22, 2014 at 10:24 PM, Alex Wang wrote: >> >>> diff --git a/ofproto/ofproto-dpif-upcall.c >>>> b/ofp

Re: [ovs-dev] [PATCHv13] ofproto-dpif-upcall: Remove the flow_dumper thread.

2014-04-23 Thread Joe Stringer
Thanks, I tidied up the comments, added threadsafety annotations for xcache and pushed. On 24 April 2014 06:38, Ben Pfaff wrote: > On Tue, Apr 22, 2014 at 04:54:24PM +1200, Joe Stringer wrote: > > From: Ethan Jackson > > > > Previously, we had a separate flow_dumper thre

Re: [ovs-dev] [PATCH V4 1/3] bfd/cfm: Check status change before update status to database.

2014-04-24 Thread Joe Stringer
Acked-by: Joe Stringer On 18 April 2014 08:32, Alex Wang wrote: > This commit adds boolean flag in bfd/cfm module for checking > status change. If there is no status change, the current > update to OVS database will skip the bfd/cfm session. > > In the experiment with 5K bfd

Re: [ovs-dev] [PATCH V4 2/3] ofproto-dpif: Use sequence number to wake up main thread for packet-in I/O.

2014-04-24 Thread Joe Stringer
Good to see this as a separate change. Acked-by: Joe Stringer On 18 April 2014 08:32, Alex Wang wrote: > This commit adds per 'struct ofproto_dpif' sequence number for > packet-in I/O. Whenever a packet-in is inserted into the 'pins' > queue, the inserting th

Re: [ovs-dev] [PATCH V4 3/3] bridge: Remove the 'Instant' stats.

2014-04-24 Thread Joe Stringer
There's a few comments inline. On 18 April 2014 08:32, Alex Wang wrote: > This commit removes the 'Instant' stats related logic in bridge.c. > Instead, the corresponding status is updated immediately after the > global connectivity sequence number changes. > Could you update the commit message

[ovs-dev] [PATCH] tests: Fix race condition waiting for monitor thread.

2014-04-24 Thread Joe Stringer
nt of logs already, then checking for the expected messages. Signed-off-by: Joe Stringer --- tests/ofproto-dpif.at |3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 89c8ad7..77656db 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofpro

Re: [ovs-dev] [PATCH] tests: Fix race condition waiting for monitor thread.

2014-04-24 Thread Joe Stringer
Looking again, it's probably better to change the lines which look for "monitor thread created" and "..terminated" to be OVS_WAIT_UNTIL. I plan to send a fresh version. On 25 April 2014 12:34, Joe Stringer wrote: > Occasionally, test #770 "ofproto-dpif - ofp

[ovs-dev] [PATCH] revalidator: Fix ukey stats cache updating.

2014-04-24 Thread Joe Stringer
ose stats would be lost. This caused intermittent testsuite failures on "learning action - self-modifying flow with idle_timeout". Introduced by 698ffe3623f1b630ae "revalidator: Only revalidate high-throughput flows." Bug #1238927. Signed-off-by: Joe Stringer --- ofproto/ofprot

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a bug.

2014-04-25 Thread Joe Stringer
Thanks for fixing this, Alex. I think there was a bit of mixup the last time I rebased. On 26 April 2014 07:33, Alex Wang wrote: > Applied, thx a lot, > > Now, let's fix the build (unittest) issue~~~ > > > On Fri, Apr 25, 2014 at 11:31 AM, Gurucharan Shetty wrote: > >> On Fri, Apr 25, 2014 at 1

Re: [ovs-dev] [PATCH] revalidator: Fix ukey stats cache updating.

2014-04-27 Thread Joe Stringer
bytes=840, drop=0, errs=0, coll=0 >> >> >> On Thu, Apr 24, 2014 at 10:34 PM, Alex Wang wrote: >> >>> i'll kick an overnight run on "learning action - self-modifying flow >>> with idle_timeout".~ (seq 1). if it survives, tmr morning, >>

[ovs-dev] [PATCHv2] tests: Fix race condition waiting for monitor thread.

2014-04-27 Thread Joe Stringer
r creation/termination of threads to wait until they see the messages instead. Signed-off-by: Joe Stringer --- v2: Fix multiple races. --- tests/ofproto-dpif.at | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpi

Re: [ovs-dev] [PATCH V5 2/2] bridge: Refactor the 'Instant' stats logic.

2014-04-27 Thread Joe Stringer
bove it too. I think it's useful to have the context that these are treated separately because we want to keep them as up-to-date as possible (with the performance tradeoff that this can't be done at large scale). Otherwise, looks good. Acked-by: Joe Stringer

Re: [ovs-dev] [RFC 0/9] Cache the modules affected by xlate_actions().

2014-04-27 Thread Joe Stringer
On 19 March 2014 04:50, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 03:45:01PM +1300, Joe Stringer wrote: > > Regarding the testsuite failures, the problem is that we wait a certain > > amount of time and check the datapath flows to ensure that they are as > > expected. Patch

[ovs-dev] [PATCH] datapath: Check for backported skb_orphan_frags().

2014-04-27 Thread Joe Stringer
This was causing build failures on debian wheezy. Check for the feature rather than the version. Signed-off-by: Joe Stringer --- acinclude.m4 |1 + datapath/linux/compat/include/linux/skbuff.h |4 ++-- 2 files changed, 3 insertions(+), 2 deletions

Re: [ovs-dev] [PATCHv2] tests: Fix race condition waiting for monitor thread.

2014-04-27 Thread Joe Stringer
checked before vswitchd was able to spawn the > > thread. > > > > This patch fixes the race by modifying the commands that check for > > creation/termination of threads to wait until they see the messages > > instead. > > &g

Re: [ovs-dev] [PATCH] datapath: Check for backported skb_orphan_frags().

2014-04-28 Thread Joe Stringer
Thanks, applied. On 29 April 2014 09:27, Jesse Gross wrote: > On Sun, Apr 27, 2014 at 7:07 PM, Joe Stringer > wrote: > > This was causing build failures on debian wheezy. Check for the feature > > rather than the version. > > > > Signed-off-by: Joe Strin

Re: [ovs-dev] [PATCH 1/2] Prepare 2.1.1 release.

2014-04-28 Thread Joe Stringer
Will you push a tag for this too? On 29 April 2014 10:31, Ben Pfaff wrote: > On Mon, Apr 28, 2014 at 02:57:17PM -0700, Justin Pettit wrote: > > Signed-off-by: Justin Pettit > > For both: > Acked-by: Ben Pfaff > ___ > dev mailing list > dev@openvswit

Re: [ovs-dev] [PATCH] datapath: Check for backported skb_orphan_frags().

2014-04-28 Thread Joe Stringer
Applied to branch-2.1 as well. On 29 April 2014 10:21, Joe Stringer wrote: > Thanks, applied. > > > On 29 April 2014 09:27, Jesse Gross wrote: > >> On Sun, Apr 27, 2014 at 7:07 PM, Joe Stringer >> wrote: >> > This was causing build failures on debian wheez

Re: [ovs-dev] [PATCH] bridge: Allow users to configure statistics update to OVSDB.

2014-04-29 Thread Joe Stringer
On 30 April 2014 05:29, Alex Wang wrote: > > +dnl disable the stats update, the following 'recv' should not be updated. > +AT_CHECK([ovs-vsctl set O . other_config:stats-update-interval=1000]) > +for i in `seq 0 10`; do ovs-appctl time/warp 1000; done > +for i in `seq 1 5`; do > +AT_CHECK(

[ovs-dev] [PATCH] bridge: Remove traces of flow-eviction-threshold.

2014-04-30 Thread Joe Stringer
This configuration option was shifted in 2.0, then removed in 2.1. Remove the misleading log message. Signed-off-by: Joe Stringer --- vswitchd/bridge.c |7 --- 1 file changed, 7 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 84e9ab8..12852b4 100644 --- a/vswitchd

Re: [ovs-dev] [PATCH] bridge: Remove traces of flow-eviction-threshold.

2014-04-30 Thread Joe Stringer
Pushed to master and branch-2.2. On 1 May 2014 09:59, Ethan Jackson wrote: > Acked-by: Ethan Jackson > > > On Wed, Apr 30, 2014 at 2:57 PM, Joe Stringer > wrote: > > This configuration option was shifted in 2.0, then removed in 2.1. > > Remove the misleading log

[ovs-dev] [PATCH 1/3] netdev: Reuse netdev_ref() in netdev_rxq_open().

2014-05-01 Thread Joe Stringer
netdev_rxq_open() open-codes much of netdev_ref(), so re-use that function instead. Signed-off-by: Joe Stringer --- lib/netdev.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/netdev.c b/lib/netdev.c index 2fc1834..6f997fd 100644 --- a/lib/netdev.c +++ b/lib

[ovs-dev] [PATCH 2/3] netdev: Safely increment refcount in netdev_open().

2014-05-01 Thread Joe Stringer
netdev_open() would previously increment a netdev's refcount without holding a lock for it. This commit shifts the locking to protect it. Found by inspection. Signed-off-by: Joe Stringer --- lib/netdev.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net

[ovs-dev] [PATCH 3/3] netdev: Warn on opening netdev as unexpected type.

2014-05-01 Thread Joe Stringer
netdev_open() and logging a warning message. Bug #1198386. Signed-off-by: Joe Stringer --- I'm not sure if this case is meant to be possible, but I've observed it, and this patch makes the error more obvious in the logs. --- lib/netdev.c |4 1 file changed, 4 insertions(+) di

Re: [ovs-dev] [PATCH V2] bridge: Allow users to configure statistics update to OVSDB.

2014-05-01 Thread Joe Stringer
of statistics update to database, in milliseconds. > Perhaps a bit more natural to say "Interval for updating statistics to the database, in milliseconds". +Key-value pairs that report port statistics. The update period > +is controlled by + key=&qu

Re: [ovs-dev] [PATCH V2] bridge: Allow users to configure statistics update to OVSDB.

2014-05-02 Thread Joe Stringer
> Sorry, this was wrong. I mean this (as you suggested): > > +OVS_VSCTL_CHECK_RX_PKT([p1], [1]) > dnl advance the clock by 100K ms, the previous 'recv' should be updated. > -for i in `seq 0 100`; do ovs-appctl time/warp 1000; done > +for i in `seq 0 99`; do ovs-appctl time/warp 1000; done > OVS

[ovs-dev] [PATCH] netdev: Open devices as the type specified.

2014-05-04 Thread Joe Stringer
attempting to configure the port with the same gre settings as p0, despite the command specifying the type as internal. This patch catches this case in netdev_open(), removes the old device from the netdev shash and ensures that one with the new type is created. Bug #1198386. Signed-off-by: Joe Stringer

Re: [ovs-dev] [PATCH 3/3] netdev: Warn on opening netdev as unexpected type.

2014-05-04 Thread Joe Stringer
On 3 May 2014 02:56, Ben Pfaff wrote: > On Fri, May 02, 2014 at 01:13:43PM +1200, Joe Stringer wrote: > > Previously, it was possible to open a netdevice as one type, then > > proceed to open it as a different type without first closing it. The > > bridge code would expect i

Re: [ovs-dev] [PATCH 1/3] netdev: Reuse netdev_ref() in netdev_rxq_open().

2014-05-04 Thread Joe Stringer
Thanks for review, pushed to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

[ovs-dev] [PATCH-branch-2.1] netdev: Safely increment refcount in netdev_open().

2014-05-04 Thread Joe Stringer
netdev_open() would previously increment a netdev's refcount without holding a lock for it. This commit shifts the locking to protect it. Found by inspection. Signed-off-by: Joe Stringer --- lib/netdev.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net

Re: [ovs-dev] [PATCH 2/3] netdev: Safely increment refcount in netdev_open().

2014-05-04 Thread Joe Stringer
Thanks for review, pushed to master and branch-2.2. Backport for 2.1 and 2.0 is here: http://openvswitch.org/pipermail/dev/2014-May/039761.html On 3 May 2014 02:52, Ben Pfaff wrote: > On Fri, May 02, 2014 at 01:13:42PM +1200, Joe Stringer wrote: > > netdev_open() would previously in

Re: [ovs-dev] [PATCH-branch-2.1] netdev: Safely increment refcount in netdev_open().

2014-05-04 Thread Joe Stringer
On 5 May 2014 12:19, YAMAMOTO Takashi wrote: > > netdev_open() would previously increment a netdev's refcount without > > holding a lock for it. This commit shifts the locking to protect it. > > > > Found by inspection. > > > > Signed-off-by: Joe

[ovs-dev] [PATCH] tunnel: Fix bug where misconfiguration persists.

2014-05-05 Thread Joe Stringer
the failure case of tnl_port_add__(), and ensures that the tnl_port structure is freed in that case as well. Bug #1198386. Signed-off-by: Joe Stringer --- This is a follow up to "netdev: Open devices as the type specified." - Fixed root cause instead of avoiding symptoms. - Removed a t

Re: [ovs-dev] [PATCH 3/3] netdev: Warn on opening netdev as unexpected type.

2014-05-05 Thread Joe Stringer
Thanks for taking a look Ryan. That sounds exactly like the issue I encountered. Looking at your assessment made me take a look at it again, and I found a much better solution. Do you mind taking a look at that one? http://openvswitch.org/pipermail/dev/2014-May/039790.html On 6 May 2014 09:18,

Re: [ovs-dev] [PATCH 1/5] lib/flow: Introduce miniflow_extract().

2014-05-06 Thread Joe Stringer
Hi Jarno, Quick question.. On 18 April 2014 13:36, Jarno Rajahalme wrote: > miniflow_extract() extracts packet headers directly to a miniflow, > which is a compressed form of the struct flow. This does not require > a large struct to be cleared to begin with, and accesses less memory. > These

Re: [ovs-dev] [PATCH] tunnel: Fix bug where misconfiguration persists.

2014-05-07 Thread Joe Stringer
Thanks Alex, applied to master and backported 2.0-2.2. I can also backport to 1.10 and 1.11 if necessary. I'll follow up on the warn patch in the other thread. On 7 May 2014 19:58, Alex Wang wrote: > Hey Joe, > > Sorry for the delayed review, > > Good to see this simpler version and fix of mem

Re: [ovs-dev] [PATCH] netdev: Open devices as the type specified.

2014-05-08 Thread Joe Stringer
te: > >> On Mon, May 05, 2014 at 11:17:23AM +1200, Joe Stringer wrote: >> > Previously, it was possible to open a netdevice as one type, then >> > proceed to open it as a different type without first closing it. This >> > would result in the original devic

[ovs-dev] [PATCH] dpif-netdev: Always serialise recirc_id to upcall key.

2014-05-08 Thread Joe Stringer
This was causing a mismatch between the odp flow key in an upcall compared to the odp flow key that is serialised upon flow_dump. Signed-off-by: Joe Stringer --- lib/dpif-netdev.c | 21 +++-- tests/ofproto-dpif.at | 116 - 2 files

Re: [ovs-dev] [PATCH] dpif-netdev: Always serialise recirc_id to upcall key.

2014-05-11 Thread Joe Stringer
On 10 May 2014 03:14, Ben Pfaff wrote: > On Fri, May 09, 2014 at 02:35:44PM +1200, Joe Stringer wrote: > > This was causing a mismatch between the odp flow key in an upcall > > compared to the odp flow key that is serialised upon flow_dump. > > > > Signed-off-by: Joe

Re: [ovs-dev] [PATCH 1/7] ofproto-dpif.at: Fix some races

2014-05-12 Thread Joe Stringer
Is there any general principles behind fixing these? I'm wondering if there's a way I can prevent these in future. For example, always sleep after sending packets if no flow exists in the datapath. ___ dev mailing list dev@openvswitch.org http://openvswi

Re: [ovs-dev] [bond megaflow v4 3/4] dpif-netdev: user space datapath recirculation

2014-05-12 Thread Joe Stringer
On 25 March 2014 14:58, Andy Zhou wrote: > > /* Metadata. */ > +if (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_RECIRC_ID)) { > +flow->recirc_id = nl_attr_get_u32(attrs[OVS_KEY_ATTR_RECIRC_ID]); > +expected_attrs |= UINT64_C(1) << OVS_KEY_ATTR_RECIRC_ID; > +} else if

[ovs-dev] [PATCHv2 1/3] odp-util: Fix a comment.

2014-05-12 Thread Joe Stringer
The comment was very specific to one user of the function, but the effect of the case is wider. Signed-off-by: Joe Stringer --- lib/odp-util.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index af464a0..34ac5cd 100644 --- a/lib/odp

[ovs-dev] [PATCHv2 2/3] dpif-netdev: Always serialise recirculation in upcall key.

2014-05-12 Thread Joe Stringer
flow key in an upcall compared to the one that is serialised upon flow_dump. This patch ensures that dp_hash is always matched for datapaths that support it, and brings the userspace datapath behaviour back in line with the kernel datapath. Signed-off-by: Joe Stringer --- lib/dpif-netdev.c

[ovs-dev] [PATCHv2 3/3] ofproto-dpif.at: Check odp_actions consistency.

2014-05-12 Thread Joe Stringer
Ensure that upcall key matches flow install and flow_dump for userspace datapath. This was previously assumed, but not tested. This makes the assumption more explicit. Signed-off-by: Joe Stringer --- tests/ofproto-dpif.at | 78 + 1 file changed

Re: [ovs-dev] [PATCHv2 3/3] ofproto-dpif.at: Check odp_actions consistency.

2014-05-12 Thread Joe Stringer
AM +1200, Joe Stringer wrote: > > Ensure that upcall key matches flow install and flow_dump for userspace > > datapath. This was previously assumed, but not tested. This makes the > > assumption more explicit. > > > > Signed-off-by: Joe Stringer > > Do you thi

Re: [ovs-dev] [PATCHv2 2/3] dpif-netdev: Always serialise recirculation in upcall key.

2014-05-12 Thread Joe Stringer
Thanks for the review, I plan to push these soon (and backport this patch to 2.2) On 13 May 2014 13:02, Ben Pfaff wrote: > On Tue, May 13, 2014 at 11:20:31AM +1200, Joe Stringer wrote: > > The userspace and kernel datapaths previously differed on their > > treatment of th

[ovs-dev] [PATCH 1/3] tests: Remove duplicate STRIP_USED definition.

2014-05-12 Thread Joe Stringer
Signed-off-by: Joe Stringer --- tests/ofproto-dpif.at |3 --- 1 file changed, 3 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 3757318..dd5f4fd 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -2,9 +2,6 @@ AT_BANNER([ofproto-dpif]) # Strips

[ovs-dev] [PATCH 3/3] tests: Check dpif-netdev odp_actions consistency.

2014-05-12 Thread Joe Stringer
Ensure that upcall key matches flow install and flow_dump for userspace datapath. This was previously assumed, but not tested. This makes the assumption more explicit. Signed-off-by: Joe Stringer --- v2: Shift to dpif-netdev.at. Depends on "dpif-netdev: Always serialise recirculation in u

[ovs-dev] [PATCH 2/3] tests: Create dpif-netdev.at.

2014-05-12 Thread Joe Stringer
Shift datapath flow test macros and "ofproto-dpif - dummy interface" out into a separate file. Signed-off-by: Joe Stringer --- tests/automake.mk |1 + tests/dpif-netdev.at | 53 + tests/ofproto-dpif

Re: [ovs-dev] [PATCHv2 2/3] dpif-netdev: Always serialise recirculation in upcall key.

2014-05-12 Thread Joe Stringer
On 13 May 2014 16:44, Andy Zhou wrote: > > > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > > index 926f3d6..bb16e7b 100644 > > --- a/ofproto/ofproto-dpif.c > > +++ b/ofproto/ofproto-dpif.c > > @@ -3211,10 +3211,11 @@ rule_dpif_lookup(struct ofproto_dpif *ofproto, > struct flow *f

Re: [ovs-dev] [bond megaflow v4 3/4] dpif-netdev: user space datapath recirculation

2014-05-13 Thread Joe Stringer
sh, may be we can drop the else if (is_mask) case > for recirc_id? > > On Mon, May 12, 2014 at 4:00 PM, Joe Stringer wrote: > > On 25 March 2014 14:58, Andy Zhou wrote: > >> > >> /* Metadata. */ > >> +if (present_attrs & (UINT64_C

Re: [ovs-dev] [PATCHv2 1/3] odp-util: Fix a comment.

2014-05-14 Thread Joe Stringer
Thanks, applied to master. On 13 May 2014 13:00, Ben Pfaff wrote: > On Tue, May 13, 2014 at 11:20:30AM +1200, Joe Stringer wrote: > > The comment was very specific to one user of the function, but the > > effect of the case is wider. > > Fixes a spelling error too. &g

Re: [ovs-dev] [PATCHv2 2/3] dpif-netdev: Always serialise recirculation in upcall key.

2014-05-14 Thread Joe Stringer
On 13 May 2014 17:43, Joe Stringer wrote: > On 13 May 2014 16:44, Andy Zhou wrote: >> >> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c >> > index 926f3d6..bb16e7b 100644 >> > --- a/ofproto/ofproto-dpif.c >> > +++ b/ofp

[ovs-dev] [PATCHv3 1/6] odp-util: Improve formatting of ND export to odp.

2014-05-14 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v3: First post. --- lib/odp-util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 34ac5cd..6cff2f1 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2643,11 +2643,11

[ovs-dev] [PATCHv3 5/6] tests: Create dpif-netdev.at.

2014-05-14 Thread Joe Stringer
Shift datapath flow test macros and "ofproto-dpif - dummy interface" out into a separate file. Signed-off-by: Joe Stringer --- v3: No change. --- tests/automake.mk |1 + tests/dpif-netdev.at | 53 + tests/ofproto-dpif

[ovs-dev] [PATCHv3 4/6] tests: Remove duplicate STRIP_USED definition.

2014-05-14 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v3: No change. --- tests/ofproto-dpif.at |3 --- 1 file changed, 3 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 0487122..9e387c1 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -2,9 +2,6 @@ AT_BANNER([ofproto

[ovs-dev] [PATCHv3 2/6] odp-util: Specify export features when serialising flows.

2014-05-14 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v3: First post. --- lib/odp-util.c | 41 + 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 6cff2f1..ff3cb7e 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2482,16

[ovs-dev] [PATCHv3 6/6] tests: Check dpif-netdev odp_actions consistency.

2014-05-15 Thread Joe Stringer
Ensure that upcall key matches flow install and flow_dump for userspace datapath. This was previously assumed, but not tested. This makes the assumption more explicit. Signed-off-by: Joe Stringer --- v3: No change. v2: Shift to dpif-netdev.at. --- tests/dpif-netdev.at | 70

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Avoid use-after-free in revalidate() corner cases.

2014-05-15 Thread Joe Stringer
Acked-by: Joe Stringer On 16 May 2014 10:36, Ben Pfaff wrote: > The loop in revalidate() needs to ensure that any data obtained from > dpif_flow_dump_next() is used before it is destroyed, as indicated by > dpif_flow_dump_next_may_destroy_keys(). In the common case, where >

Re: [ovs-dev] [PATCHv3 2/6] odp-util: Specify export features when serialising flows.

2014-05-15 Thread Joe Stringer
On 16 May 2014 15:11, Andy Zhou wrote: > On Wed, May 14, 2014 at 11:57 PM, Joe Stringer > wrote: > > Signed-off-by: Joe Stringer > > --- > > v3: First post. > > --- > > lib/odp-util.c | 41 + > > 1 fi

Re: [ovs-dev] [PATCHv3 2/6] odp-util: Specify export features when serialising flows.

2014-05-15 Thread Joe Stringer
On 16 May 2014 15:38, Andy Zhou wrote: > On Thu, May 15, 2014 at 8:34 PM, Joe Stringer > wrote: > > On 16 May 2014 15:11, Andy Zhou wrote: > >> > >> On Wed, May 14, 2014 at 11:57 PM, Joe Stringer > >> wrote: > >> > Signed-off

Re: [ovs-dev] [PATCHv4] odp-util: Always serialise recirculation in upcall key.

2014-05-18 Thread Joe Stringer
On 19 May 2014 13:05, Andy Zhou wrote: > On Thu, May 15, 2014 at 9:52 PM, Joe Stringer > wrote: > > The userspace and kernel datapaths previously differed on their > > treatment of the recirc_id and dp_hash fields when sending upcalls. > > While the kernel datapath woul

Re: [ovs-dev] [PATCH] dpif: Refactor flow dumping interface to make better sense for batching.

2014-05-18 Thread Joe Stringer
This looks much tidier, I like it. Particularly given the elimination of 4 goto statements :-). Comments inline. On 17 May 2014 11:28, Ben Pfaff wrote: > > + * Notes > + * - > + * > + * All error reporting is deferred to the call to > dpif_flow_dump_destroy(). > + * > + * Previous versions o

[ovs-dev] [PATCH 1/2] ovs-dev.py: Add option to specify which tests to run.

2014-05-18 Thread Joe Stringer
Signed-off-by: Joe Stringer --- utilities/ovs-dev.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 7a4425f..97fab6c 100755 --- a/utilities/ovs-dev.py +++ b/utilities/ovs-dev.py @@ -144,6 +144,10 @@ commands.append(make

[ovs-dev] [PATCH 2/2] ovs-dev.py: Run tests in parallel.

2014-05-18 Thread Joe Stringer
Signed-off-by: Joe Stringer --- utilities/ovs-dev.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 97fab6c..d979afd 100755 --- a/utilities/ovs-dev.py +++ b/utilities/ovs-dev.py @@ -144,7 +144,7 @@ commands.append(make

Re: [ovs-dev] [PATCHv4] odp-util: Always serialise recirculation in upcall key.

2014-05-18 Thread Joe Stringer
m the patch. On 19 May 2014 13:51, Joe Stringer wrote: > On 19 May 2014 13:05, Andy Zhou wrote: > >> On Thu, May 15, 2014 at 9:52 PM, Joe Stringer >> wrote: >> > The userspace and kernel datapaths previously differed on their >> > treatment of the recirc_i

Re: [ovs-dev] [PATCHv4] odp-util: Always serialise recirculation in upcall key.

2014-05-18 Thread Joe Stringer
Pushed to master with the following incremental: diff --git a/lib/odp-util.c b/lib/odp-util.c index 37ec2be..280e8a6 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -2483,8 +2483,7 @@ ovs_to_odp_frag_mask(uint8_t nw_frag_mask) static void odp_flow_key_from_flow__(struct ofpbuf *buf, const st

Re: [ovs-dev] [PATCHv3 6/6] tests: Check dpif-netdev odp_actions consistency.

2014-05-18 Thread Joe Stringer
Thanks for the review. Applied patches 1, 4, 5, 6 to master. On 19 May 2014 13:26, Andy Zhou wrote: > On Wed, May 14, 2014 at 11:57 PM, Joe Stringer > wrote: > > Ensure that upcall key matches flow install and flow_dump for userspace > > datapath. This was previously assum

Re: [ovs-dev] [PATCH 2/2] ovs-dev.py: Run tests in parallel.

2014-05-19 Thread Joe Stringer
On 19 May 2014 19:53, Lori Jakab wrote: > On 5/19/14, 10:13 AM, YAMAMOTO Takashi wrote: > >> Signed-off-by: Joe Stringer >>> --- >>> utilities/ovs-dev.py |2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --gi

[ovs-dev] [PATCH] revalidator: Replace ukey->mark with reval_seq.

2014-05-19 Thread Joe Stringer
Rather than setting and resetting the 'mark' field in the ukey, this patch introduces a seq to track whether a flow has been seen during the most recent dump. This tidies the code and simplifies the logic for detecting when flows are duplicated from the datapath. Signed-off-by: Jo

[ovs-dev] [PATCHv2] ovs-dev.py: Add option to run tests in parallel.

2014-05-19 Thread Joe Stringer
Signed-off-by: Joe Stringer --- v2: Make it configurable. --- utilities/ovs-dev.py |4 1 file changed, 4 insertions(+) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 97fab6c..d08ef39 100755 --- a/utilities/ovs-dev.py +++ b/utilities/ovs-dev.py @@ -145,6 +145,8

[ovs-dev] [PATCH] tests: Fix an ofproto test.

2014-05-19 Thread Joe Stringer
This was previously logging that there was no such function, but passing the test anyway. Signed-off-by: Joe Stringer --- tests/ofproto.at |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ofproto.at b/tests/ofproto.at index dde715e..2f1df2d 100644 --- a/tests

Re: [ovs-dev] [PATCH 3/3] tests: Check dpif-netdev odp_actions consistency.

2014-05-20 Thread Joe Stringer
Ah, sorry I should have replied to this series; Andy looked through a separate posting of them and I applied them. I'll prepare a patch to remove the "-A" from the grepping in these tests. On 21 May 2014 07:56, Ben Pfaff wrote: > On Tue, May 13, 2014 at 03:45:50PM +1200,

Re: [ovs-dev] [PATCH] dpif: Refactor flow dumping interface to make better sense for batching.

2014-05-20 Thread Joe Stringer
On 21 May 2014 06:40, Ben Pfaff wrote: > > > I'm not sure whether you would want it in this in a separate patch, but > it > > appears that we only try to detect "already_dumped" for flows that > haven't > > been used before. Flows which have been used before and are duplicated > will > > execute

Re: [ovs-dev] [PATCH v3 1/3] ofproto: Add reference count for Openflow groups.

2014-05-20 Thread Joe Stringer
On 21 May 2014 10:05, Ryan Wilson 76511 wrote: > Hey Andy, > > >At a high level, ofgroup struct current has rwlock that essentially > >solving > >the same problem as the ref count proposed in this patch. It would be > >better > >it seems confusing if we use both method together. > > > >Looking a

Re: [ovs-dev] [PATCH 3/3] tests: Check dpif-netdev odp_actions consistency.

2014-05-20 Thread Joe Stringer
On 21 May 2014 10:57, Ben Pfaff wrote: > On Wed, May 21, 2014 at 09:43:22AM +1200, Joe Stringer wrote: > > Ah, sorry I should have replied to this series; Andy looked through a > > separate posting of them and I applied them. > > > > I'll prepare a patch to remo

Re: [ovs-dev] [PATCH v3 1/3] ofproto: Add reference count for Openflow groups.

2014-05-20 Thread Joe Stringer
On 21 May 2014 10:33, Joe Stringer wrote: > On 21 May 2014 10:05, Ryan Wilson 76511 wrote: > > Hey Andy, >> >> >At a high level, ofgroup struct current has rwlock that essentially >> >solving >> >the same problem as the ref count proposed in this

Re: [ovs-dev] [PATCH v4] ofproto: Add reference count for Openflow groups.

2014-05-20 Thread Joe Stringer
On 21 May 2014 02:52, Ryan Wilson wrote: > When adding support for Openflow group and bucket stats, a group entry is > added > to the xlate cache. If the group is removed from ofproto configuration, we > need > to guarantee the group exists in the case where stats are attributed to the > group by

Re: [ovs-dev] [PATCH] ofproto: Remove per-flow miss hash table from upcall handler.

2014-05-20 Thread Joe Stringer
On 20 May 2014 17:25, Ryan Wilson wrote: > Ok turns out my Openflow rules weren't totally correct (they were flooding > all ports like a hub instead of forwarding properly). After adjusting them, > I achieved equivalent performance with and without my upcall patch (both > achieved 161-162 trans/s

Re: [ovs-dev] [PATCH v3 1/3] ofproto: Add reference count for Openflow groups.

2014-05-20 Thread Joe Stringer
On 21 May 2014 14:25, Andy Zhou wrote: > On Tue, May 20, 2014 at 5:27 PM, Joe Stringer > wrote: > > On 21 May 2014 10:33, Joe Stringer wrote: > >> > >> On 21 May 2014 10:05, Ryan Wilson 76511 wrote: > >> > >>> Hey Andy, > >>>

Re: [ovs-dev] [PATCH] revalidator: Replace ukey->mark with reval_seq.

2014-05-20 Thread Joe Stringer
This no longer applies. I plan to send a fresh version. On 20 May 2014 09:12, Joe Stringer wrote: > Rather than setting and resetting the 'mark' field in the ukey, this > patch introduces a seq to track whether a flow has been seen during the > most recent dump. This

[ovs-dev] [PATCH 3/3] revalidator: Replace ukey->mark with reval_seq.

2014-05-20 Thread Joe Stringer
Rather than setting and resetting the 'mark' field in the ukey, this patch introduces a seq to track whether a flow has been seen during the most recent dump. This tidies the code and simplifies the logic for detecting when flows are duplicated from the datapath. Signed-off-by: Jo

[ovs-dev] [PATCH 1/3] revalidator: Re-fix a flow duplication bug.

2014-05-20 Thread Joe Stringer
"failed to flow_get (No such file or directory) skb_priority(0),..." "failed to flow_del (No such file or directory) skb_priority(0),..." This patch fixes the issue again. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c |6 -- 1 file changed, 4 insert

[ovs-dev] [PATCH 2/3] revalidator: Use xcache when revalidation is required.

2014-05-20 Thread Joe Stringer
xlate_cache to attribute stats when full revalidation is required. Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-upcall.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 3e8dda5

Re: [ovs-dev] [PATCH] ofproto: Remove per-flow miss hash table from upcall handler.

2014-05-20 Thread Joe Stringer
; with HEAD = 5a87054c2d832d0e10b30a1f223707acb8efbeb7. This commit is from > yesterday, so it includes your fix > (73a3c4757e596ff156d40f41496a0264373e5bc4). > > Ryan > > From: Joe Stringer > Date: Tuesday, May 20, 2014 7:06 PM > To: Ryan Wilson > Cc: Ale

Re: [ovs-dev] [PATCH] tests: Fix an ofproto test.

2014-05-21 Thread Joe Stringer
On 22 May 2014 06:12, Ben Pfaff wrote: > On Tue, May 20, 2014 at 12:49:09PM +1200, Joe Stringer wrote: > > This was previously logging that there was no such function, but passing > > the test anyway. > > > > Signed-off-by: Joe Stringer > > Good catch. >

Re: [ovs-dev] [PATCH 1/3] revalidator: Re-fix a flow duplication bug.

2014-05-21 Thread Joe Stringer
Thanks, I applied this to master and branch-2.3. On 21 May 2014 18:14, Alex Wang wrote: > Tested, and no more flow_del warning, > > > Acked-by: Alex Wang > > > On Tue, May 20, 2014 at 8:45 PM, Joe Stringer wrote: > >> Commit 73a3c4757e59 (revalidator: Preven

Re: [ovs-dev] [PATCH 2/3] revalidator: Use xcache when revalidation is required.

2014-05-21 Thread Joe Stringer
gt; And this change deserves further discussion~. > > > On Tue, May 20, 2014 at 8:45 PM, Joe Stringer wrote: > >> One of the reasons that xlate_cache was introduced was to ensure that >> statistics were attributed to the correct rules and interfaces according >> to

Re: [ovs-dev] [PATCH] ofproto-dpif-upcall: Fix additional use-after-free in revalidate().

2014-05-21 Thread Joe Stringer
So just to make sure I'm understanding correctly, 1) revalidator calls dpif_flow_dump_next_may_destroy_keys(), which indicates that it will not destroy the buffer. 2) revalidator calls dpif_flow_dump_next(), which dumps a flow without actions. The most likely case is that this is the last flow in

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix a bug.

2014-05-21 Thread Joe Stringer
Acked-by: Joe Stringer On 22 May 2014 12:27, Alex Wang wrote: > Commit b256dc525c8 (ofproto-dpif-xlate: Cache xlate_actions() effects.) > caches the variables needed for refreshing mac-learning table in > xlate_normal(). Wherein, the cache entry always records reference to >

Re: [ovs-dev] [branch-2.3 v2] ofproto-dpif-upcall: Fix additional use-after-free in revalidate().

2014-05-21 Thread Joe Stringer
ested briefly, didn't check it fixes the original bug. Acked-by: Joe Stringer On 22 May 2014 11:26, Ben Pfaff wrote: > Commit 1340ce0c175 (ofproto-dpif-upcall: Avoid use-after-free in > revalidate() corner cases.) fixed one use-after-free error in revalidate(), > but missed one more su

[ovs-dev] [PATCH] xcache: Remove unused field xc_entry.u.learn.ofproto.

2014-05-22 Thread Joe Stringer
Signed-off-by: Joe Stringer --- ofproto/ofproto-dpif-xlate.c |2 -- 1 file changed, 2 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index a87db54..e0b10cb 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -266,7 +266,6

<    3   4   5   6   7   8   9   10   11   12   >