[ovs-dev] [PATCH v8] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-07-25 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- v2: Fix race condition found during perf test v3: Addressed Daniele's comments v4: Addressed Ben's style comments, added packet batching v5: Rebase v

Re: [ovs-dev] [PATCH v7] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-07-24 Thread Ryan Wilson
act that exec_upcalls calls dpif_print_packet() is a bit weird, > feels like a layering violation. I'm conflicted though, what do you > think? > > Not sure why this would be since we call dpif_recv in ofproto-upcall. > Ethan > > On Sun, Jul 20, 2014 at 3:37 PM, Ryan Wils

[ovs-dev] [PATCH v7] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-07-20 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- v2: Fix race condition found during perf test v3: Addressed Daniele's comments v4: Addressed Ben's style comments, added packet batching v5: Rebase v

[ovs-dev] [valgrind PATCH] ovsdb: Frees database memory on ovsdb process cleanup.

2014-07-02 Thread Ryan Wilson
This fixes valgrind errors. Signed-off-by: Ryan Wilson --- ovsdb/ovsdb-server.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index a85a672..0a1be0f 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb

[ovs-dev] [PATCH v5] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-30 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- v2: Fix race condition found during perf test v3: Addressed Daniele's comments v4: Addressed Ben's style comments, added packet batching v5: Rebase -

Re: [ovs-dev] [PATCH v2 5/5] netdev-dpdk: Add OVS_UNLIKELY annotations in dpdk_do_tx_copy().

2014-06-30 Thread Ryan Wilson 76511
you decide to commit it). Ryan On 6/30/14 11:15 AM, "Pravin Shelar" wrote: >On Thu, Jun 26, 2014 at 6:16 PM, Ryan Wilson wrote: >> Since dropped packets due to large packet size or lack of memory >> are unlikely, it is best to add OVS_UNLIKELY annotations to these >&

Re: [ovs-dev] [PATCH v2 1/5] netdev-dpdk: Refactor dpdk_queue_flush().

2014-06-30 Thread Ryan Wilson 76511
GTM > >Daniele > >On Jun 26, 2014, at 6:16 PM, Ryan Wilson wrote: > >> This patch refactors dpdk_queue_flush() to reuse code in >> dpdk_queue_pkts(). >> >> Signed-off-by: Ryan Wilson >> --- >> lib/netdev-dpdk.c | 37

Re: [ovs-dev] [PATCH v2 4/5] netdev-dpdk: Remove inline from static function dpdk_queue_pkts().

2014-06-27 Thread Ryan Wilson 76511
Sorry about this, I should've been more mindful of that. Please ignore this patch. Ryan On 6/27/14 2:04 PM, "Ben Pfaff" wrote: >On Fri, Jun 27, 2014 at 1:58 PM, Pravin Shelar wrote: >> On Thu, Jun 26, 2014 at 6:16 PM, Ryan Wilson wrote: >>> Per style requirem

Re: [ovs-dev] [PATCH v2 5/5] netdev-dpdk: Add OVS_UNLIKELY annotations in dpdk_do_tx_copy().

2014-06-26 Thread Ryan Wilson 76511
tests. Ryan From: Ben Pfaff mailto:b...@nicira.com>> Date: Thursday, June 26, 2014 6:26 PM To: Ryan Wilson mailto:wr...@vmware.com>> Cc: Ryan Wilson mailto:wr...@nicira.com>>, "dev@openvswitch.org<mailto:dev@openvswitch.org>" mailto:dev@openvswitch.org>>

Re: [ovs-dev] [PATCH v2 5/5] netdev-dpdk: Add OVS_UNLIKELY annotations in dpdk_do_tx_copy().

2014-06-26 Thread Ryan Wilson 76511
annotations for code consistency as well. Ryan From: Ben Pfaff mailto:b...@nicira.com>> Date: Thursday, June 26, 2014 6:20 PM To: Ryan Wilson mailto:wr...@nicira.com>> Cc: "dev@openvswitch.org<mailto:dev@openvswitch.org>" mailto:dev@openvswitch.org>> Subject: Re: [o

[ovs-dev] [PATCH v2 1/5] netdev-dpdk: Refactor dpdk_queue_flush().

2014-06-26 Thread Ryan Wilson
This patch refactors dpdk_queue_flush() to reuse code in dpdk_queue_pkts(). Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 72add87..084e8cd

[ovs-dev] [PATCH v2 5/5] netdev-dpdk: Add OVS_UNLIKELY annotations in dpdk_do_tx_copy().

2014-06-26 Thread Ryan Wilson
Since dropped packets due to large packet size or lack of memory are unlikely, it is best to add OVS_UNLIKELY annotations to these conditions. With DPDK fast path forwarding test, this increased throughtput from 4.12 to 4.16 million packets per second. Signed-off-by: Ryan Wilson --- lib/netdev

[ovs-dev] [PATCH v2 3/5] netdev-dpdk: Fix memory leak in dpdk_do_tx_copy().

2014-06-26 Thread Ryan Wilson
when multiple packets are dropped in dpdk_do_tx_copy(). Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 6e1d293..dfa7d77 100644 --- a/lib/netdev-dpdk.c +++ b/lib/n

[ovs-dev] [PATCH v2 2/5] netdev-dpdk: Set current timestamp when flushing TX queue.

2014-06-26 Thread Ryan Wilson
The current timestamp should be set every time the queue is flushed. Thus, if DRAIN_TSC timer cycles have passed since the last timestamp, the send queue should be flushed again. Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions

[ovs-dev] [PATCH v2 4/5] netdev-dpdk: Remove inline from static function dpdk_queue_pkts().

2014-06-26 Thread Ryan Wilson
Per style requirements, functions local to a module should not be inlined. Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index dfa7d77..0aee14e 100644 --- a/lib/netdev-dpdk.c +++ b

Re: [ovs-dev] [PATCH 3/3] netdev-dpdk: Fix performance issues / bugs in dpdk_do_tx_copy().

2014-06-26 Thread Ryan Wilson 76511
fail >> and packets which succeeded to allocate memory with rte_pktmbuf_alloc() >> would not be sent and leak memory. >> >> This patch also adds OVS_UNLIKELY annotations. > >These sound like three separate patches. > >How much if at all does each t

[ovs-dev] [PATCH 3/3] netdev-dpdk: Fix performance issues / bugs in dpdk_do_tx_copy().

2014-06-26 Thread Ryan Wilson
would not be sent and leak memory. This patch also adds OVS_UNLIKELY annotations. Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 6e1d293..03f1e02 100644

[ovs-dev] [PATCH 2/3] netdev-dpdk: Set current timestamp when flushing TX queue.

2014-06-26 Thread Ryan Wilson
The current timestamp should be set every time the queue is flushed. Thus, if DRAIN_TSC timer cycles have passed since the last timestamp, the send queue should be flushed again. Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions

[ovs-dev] [PATCH 1/3] netdev-dpdk: Refactor dpdk_queue_flush().

2014-06-26 Thread Ryan Wilson
This patch refactors dpdk_queue_flush() to reuse code in dpdk_queue_pkts(). Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 72add87..084e8cd

[ovs-dev] [PATCH] dpif-netdev: Fix memory leak in dpif_netdev_flow_put()

2014-06-25 Thread Ryan Wilson
miniflow_destroy() needs to be called after using miniflow_init(). Otherwise, if the miniflow mallocs data, then a memory leak may occur. Found by inspection. Signed-off-by: Ryan Wilson --- lib/dpif-netdev.c |1 + 1 file changed, 1 insertion(+) diff --git a/lib/dpif-netdev.c b/lib/dpif

Re: [ovs-dev] [PATCH v4] dpif-netdev: Implement batched flow dumping.

2014-06-25 Thread Ryan Wilson
> > > Thanks Ryan! > > I folded in this change to ensure that the caller could specify any > 'max_flows' that it likes. It doesn't make sense for the caller to > have to be aware of the implementation's limitations: > > I was debating between either using an assert or using the min of max_flows an

Re: [ovs-dev] [PATCH v3] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-24 Thread Ryan Wilson 76511
x27;s an obvious solution here I'm not seeing. Ryan On 6/24/14 2:14 PM, "Ben Pfaff" wrote: >On Tue, Jun 24, 2014 at 01:41:13PM -0700, Ryan Wilson wrote: >> On Tue, Jun 24, 2014 at 8:44 AM, Ben Pfaff wrote: >> > I'm surprised that dpif_netdev_disable_upcall(

[ovs-dev] [PATCH v4] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-24 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- v2: Fix race condition found during perf test v3: Addressed Daniele's comments v4: Addressed Ben's style comments, added packet batching -

Re: [ovs-dev] [PATCH v3] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-24 Thread Ryan Wilson
Just one comment below. Otherwise, all other issues will be addressed in the next patch. Thanks! On Tue, Jun 24, 2014 at 8:44 AM, Ben Pfaff wrote: > On Wed, Jun 18, 2014 at 11:07:12AM -0700, Ryan Wilson wrote: > > Typically, kernel datapath threads send upcalls to userspace where &g

Re: [ovs-dev] [PATCH] vswitchd: skip right number of arguments in dpdk_init()

2014-06-23 Thread Ryan Wilson 76511
Sent out a new version of the patch with the correct commit message and signed-off-bys. Ryan On 6/23/14 1:57 PM, "Pravin Shelar" wrote: >I like this better, If you send me signed off line I will merge it. > > >On Thu, Jun 19, 2014 at 5:27 PM, Ryan Wilson 76511 >wrot

[ovs-dev] [PATCH] vswitchd: skip right number of arguments in dpdk_init()

2014-06-23 Thread Ryan Wilson
title_init(). Signed-off-by: Daniele Di Proietto Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index fbdb6b3..fb8d953 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c

[ovs-dev] [PATCH v4] dpif-netdev: Implement batched flow dumping.

2014-06-23 Thread Ryan Wilson
dev'. Signed-off-by: Ryan Wilson --- v2: Addressed Joe's comments, split into 2 patches v3: Optimized patch by allocating memory in 1 malloc call instead of 3, reducing time spent in locked state. Need to only use 1 patch now. v4: Minor fixes.

Re: [ovs-dev] [PATCH] dpif-netdev: Implement batched flow dumping.

2014-06-20 Thread Ryan Wilson 76511
Ok just kidding, I actually just sent a v3 of the patch since the other optimizations may take me a bit longer. Sorry for the spam, have a good weekend! Ryan From: Ryan Wilson mailto:wr...@vmware.com>> Date: Friday, June 20, 2014 4:15 PM To: Ryan Wilson mailto:wr...@nicira.com>>,

[ovs-dev] [PATCH v3] dpif-netdev: Implement batched flow dumping.

2014-06-20 Thread Ryan Wilson
dev'. Signed-off-by: Ryan Wilson --- v2: Addressed Joe's comments, split into 2 patches v3: Optimized patch by allocating memory on stack, reducing time spent in locked state. --- lib/dpif-netdev.c | 106 + 1 file changed, 59 insertions(+

Re: [ovs-dev] [PATCH] dpif-netdev: Implement batched flow dumping.

2014-06-20 Thread Ryan Wilson 76511
Hey Joe, Not sure if you were looking at this patch, but I believe I found a more efficient way to do this. I will likely send this out as a larger series of revalidator optimizations for dpif-netdev. Ryan From: Ryan Wilson mailto:wr...@nicira.com>> Date: Thursday, June 19, 2014 5:49

[ovs-dev] [PATCH v2 1/2] dpif: Add max flows field to flow dump threads struct.

2014-06-19 Thread Ryan Wilson
This is needed to add flow dump batching to dpif-netdev, specifically for malloc-ing 'max_flows' key and mask buffers. Signed-off-by: Ryan Wilson --- v2: Addressed Joe's comments, split into 2 patches --- lib/dpif-linux.c |4 ++-- lib/dpif-netdev.c |

[ovs-dev] [PATCH v2 2/2] dpif-netdev: Implement batched flow dumping.

2014-06-19 Thread Ryan Wilson
dev'. Signed-off-by: Ryan Wilson --- v2: Addressed Joe's comments, split into 2 patches --- lib/dpif-netdev.c | 82 + 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 805af9a.

Re: [ovs-dev] [PATCH] dpif-netdev: Implement batched flow dumping.

2014-06-19 Thread Ryan Wilson
e just assert that it is <= thread_->max_flows. > > The comment above dpif_flow_dump_next() may also need to be updated. > Sure I'll add the max_flows argument back to dpif_flow_dump_next() and add an assert. I shouldn't need to change the dpif_flow_dump_next() comment though b

Re: [ovs-dev] [PATCH] vswitchd: skip right number of arguments in dpdk_init()

2014-06-19 Thread Ryan Wilson 76511
196,10 @@ dpdk_init(int argc, char **argv) rte_memzone_dump(); rte_eal_init_ret = 0; -return result; +if (argc > result) + argv[result] = argv[0]; + +return result + 1; } void From: Daniele Di Proietto mailto:ddiproie...@vmware.com>> Date: Thursday,

Re: [ovs-dev] [PATCH] vswitchd: skip right number of arguments in dpdk_init()

2014-06-19 Thread Ryan Wilson 76511
the code always skips by default the first of the remaining arguments. With DPDK, its "--" but without DPDK, its the program name. So dpdk_init() actually does skip the program name, I believe. Anyways it doesn't really matter as long as this works. Ryan On 6/19/14 2:14 PM, "Pr

Re: [ovs-dev] [PATCH] vswitchd: skip right number of arguments in dpdk_init()

2014-06-18 Thread Ryan Wilson 76511
e itself */ +return result + 1; } void Otherwise, LGTM. Acked-by: Ryan Wilson Can someone else review this and if they have no qualms, push it? This is necessary for DPDK to work properly. On 6/16/14 9:46 AM, "Daniele Di Proietto" wrote: >rte_eal_init() returns the number of p

[ovs-dev] [PATCH] dpif-netdev: Implement batched flow dumping.

2014-06-18 Thread Ryan Wilson
dev'. Signed-off-by: Ryan Wilson --- lib/dpif-linux.c |7 ++-- lib/dpif-netdev.c | 87 +++-- lib/dpif-provider.h |9 +++-- lib/dpif.c| 10 ++--- lib/dpif.h|4 +- ofpr

Re: [ovs-dev] [PATCH v2] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-18 Thread Ryan Wilson 76511
Thanks for the review! I fixed all these things in my next version (v3). Ryan From: Daniele Di Proietto mailto:ddiproie...@vmware.com>> Date: Wednesday, June 18, 2014 9:05 AM To: Ryan Wilson mailto:wr...@nicira.com>> Cc: "dev@openvswitch.org<mailto:dev@openvswit

[ovs-dev] [PATCH v3] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-18 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- v2: Fix race condition found during perf test v3: Addressed Daniele's comments --- lib/dpif-linux.c |3 + lib/dpif-netdev.c

Re: [ovs-dev] [PATCH v2] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-17 Thread Ryan Wilson 76511
articular SMP methods used. > > > >Mike Polehn > > > >-Original Message- > >From: Ethan Jackson [mailto:et...@nicira.com] > >Sent: Tuesday, June 17, 2014 2:22 PM > >To: Polehn, Mike A; Alex Wang > >Cc: Ryan Wilson; dev@openvswitch.org > >Su

[ovs-dev] [PATCH v2] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-16 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- v2: Fix race condition found during perf test --- lib/dpif-netdev.c | 327 +++-- lib/dpif-netdev.h |

[ovs-dev] [PATCH] dpif-netdev: Polling threads directly call ofproto upcall functions.

2014-06-16 Thread Ryan Wilson
upcall functions, eliminating the need for handler threads for datapaths of type 'netdev'. Signed-off-by: Ryan Wilson --- lib/dpif-netdev.c | 332 - lib/dpif-netdev.h |9 ++ lib/dpif.c| 68

[ovs-dev] [PATCH v7] dpif-netdev: Remove an extra memcpy of packet data for TAP and DPDK devices.

2014-06-04 Thread Ryan Wilson
ld to 'struct ofpbuf' when using DPDK. This field holds a pointer to the allocated DPDK buffer in the rte_mempool. Thus, an upcall packet ofpbuf allocated on the stack can now share data and free memory of a rte_mempool allocated ofpbuf. Signed-off-by: Ryan Wilson Acked-by: Jarno Rajahalme Ack

Re: [ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-04 Thread Ryan Wilson 76511
ning b is a >> copy of the header and thus we can free the original header). I figured >> I'd let you check out the patch and see if you had any other ideas. >> > >An assert to this effect would help detect/avoid bugs. > >> Cheers, >> >> Ryan >>

[ovs-dev] [PATCH v6] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-04 Thread Ryan Wilson
ld to 'struct ofpbuf' when using DPDK. This field holds a pointer to the allocated DPDK buffer in the rte_mempool. Thus, an upcall packet ofpbuf allocated on the stack can now share data and free memory of a rte_mempool allocated ofpbuf. Signed-off-by: Ryan Wilson Acked-by: Jarno Rajahalme --

[ovs-dev] [PATCH v5] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-04 Thread Ryan Wilson
x27;struct ofpbuf' when using DPDK. This field holds a pointer to the allocated buffer in the rte_mempool. Thus, an upcall packet ofpbuf allocated on the stack can now share data and free memory of a rte_mempool allocated ofpbuf. Signed-off-by: Ryan Wilson Acked-by: Jarno Rajahalme --

Re: [ovs-dev] [PATCH v2] timeval: Add monotonic time functionality for NetBSD and FreeBSD.

2014-06-04 Thread Ryan Wilson 76511
the > error, which is dangerous. > > This patch ensures Linux, NetBSD and FreeBSD platforms use > clock_gettime with their corresponding correct values and > definitions. All other platforms use time.time(). > > Signed-off-by: Ryan Wilson Acked-by: YAMAMOTO Takashi > > -

Re: [ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson 76511
r and thus we can free the original header). I figured I'd let you check out the patch and see if you had any other ideas. Cheers, Ryan On 6/3/14 5:22 PM, "Pravin Shelar" wrote: >Can you combine it with second patch, otherwise it introduces a bug. > >On Tue, Jun 3,

[ovs-dev] [PATCH v4] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson
x27;struct ofpbuf' when using DPDK. This field holds a pointer to the allocated buffer in the rte_mempool. Thus, an upcall packet ofpbuf allocated on the stack can now share data and free memory of a rte_mempool allocated ofpbuf. Signed-off-by: Ryan Wilson Acked-by: Jarno Rajahalme --

Re: [ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson 76511
I've ran into some unexpected issues while perf testing this, lets hold off on looking at this. I'll submit another patch when I've had all the kinks worked out. Ryan On 6/3/14 2:21 PM, "Ryan Wilson 76511" wrote: >Hey Pravin, > >Thanks for the catch her

[ovs-dev] [PATCH v3 1/2] netdev-dpdk: Free DPDK buffer using mbuf's buffer address.

2014-06-03 Thread Ryan Wilson
ing of the allocated buffer from 'struct rte_mbuf'. This allows ofpbufs to share packet data when using DPDK. Signed-off-by: Ryan Wilson --- lib/netdev-dpdk.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ba41d2e..155c

Re: [ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson 76511
/4375/ Let me know if this patch works. Cheers, Ryan On 6/3/14 10:50 AM, "Pravin Shelar" wrote: >On Tue, Jun 3, 2014 at 10:33 AM, Ryan Wilson wrote: >> When a bridge of datatype type netdev receives a packet, it copies the >> packet from the NIC to a buffer in userspace

[ovs-dev] [PATCH v3 2/2] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson
pcall can directly access the packet data. This patch eliminates this extra copy of the packet data in most cases. In cases where the packet may still be used later by callers of dp_netdev_execute_actions, making a copy of the packet data is still necessary. Signed-off-by: Ryan Wilson Acked-by:

Re: [ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson 76511
jahalme" wrote: >Ryan, > >See comments below. > > Jarno > >On Jun 2, 2014, at 3:54 PM, Ryan Wilson wrote: > >> When a bridge of datatype type netdev receives a packet, it copies the >> packet from the NIC to a buffer in userspace. Currently, when making

[ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-03 Thread Ryan Wilson
pcall can directly access the packet data. This patch eliminates this extra copy of the packet data in most cases. In cases where the packet may still be used later by callers of dp_netdev_execute_actions, making a copy of the packet data is still necessary. Signed-off-by: Ryan Wilson --- v2: Addr

Re: [ovs-dev] [PATCH] timeval: Add monotonic time functionality for NetBSD and FreeBSD.

2014-06-02 Thread Ryan Wilson 76511
Thanks for the fix! Sorry, I don't know too much about the intricacies of NetBSD. My first version seemed to work on my NetBSD instance though, so I wrongly assumed it would work for most versions of NetBSD. I tested this on FreeBSD and it works, but I don't know the intricacies of FreeBSD either.

[ovs-dev] [PATCH v2] timeval: Add monotonic time functionality for NetBSD and FreeBSD.

2014-06-02 Thread Ryan Wilson
ch ensures Linux, NetBSD and FreeBSD platforms use clock_gettime with their corresponding correct values and definitions. All other platforms use time.time(). Signed-off-by: Ryan Wilson --- v2: Added Yamamoto's diff to fix NetBSD case --- python/ovs/timeval.py | 34 ++

Re: [ovs-dev] [PATCH v3] timeval: Use monotonic time in OVS Python timeval library.

2014-06-02 Thread Ryan Wilson 76511
>>>> ovs-xapi-sync, to poll block indefinitely since the time is >>>> unexpectedly negative. >>>> >>>> This patch fixes the issue by using time.monotonic() if Python's >>>> version >= 3.3. Otherwise, the timeval module calls out to t

[ovs-dev] [PATCH] timeval: Add monotonic time functionality for NetBSD and FreeBSD.

2014-06-02 Thread Ryan Wilson
ch ensures Linux, NetBSD and FreeBSD platforms use clock_gettime with their corresponding correct values and definitions. All other platforms use time.time(). Signed-off-by: Ryan Wilson --- python/ovs/timeval.py | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) di

[ovs-dev] [PATCH] dpif-netdev: Remove an extra memcpy of packet data from datapath-upcall interface for bridges with datapath_type=netdev.

2014-06-02 Thread Ryan Wilson
When a bridge of datatype type netdev receives a packet, it copies the packet from the NIC to a buffer in userspace. Currently, when making an upcall, the packet is again copied to the upcall's buffer. However, this extra copy is not necessary when the datapath exists in userspace as the upcall can

Re: [ovs-dev] [PATCH] rtbsd: Make rtbsd module thread-safe.

2014-06-02 Thread Ryan Wilson 76511
Sorry for the delay, I swear I haven't been ignoring this email. Ok finally set up my NetBSD environment and master (with my rtbsd change) compiles and passes all unit tests. Ryan From: Ryan Wilson mailto:wr...@vmware.com>> Date: Thursday, May 29, 2014 10:47 PM To: Ben Pfa

Re: [ovs-dev] [PATCH v3] timeval: Use monotonic time in OVS Python timeval library.

2014-06-02 Thread Ryan Wilson 76511
; version >= 3.3. Otherwise, the timeval module calls out to the >> librt C shared library and uses the clock_gettime function with >> CLOCK_MONOTONIC. >> >> Note this is only enabled on Linux-based platforms. This has been >> tested on Ubuntu 12.04 and Redhat 6.4

[ovs-dev] [PATCH] timeval: Import ctypes Python library within a try statement.

2014-05-30 Thread Ryan Wilson
Older versions of Python do not have ctypes as a default installed package. This patch puts the 'import ctypes' statement inside a try statement. This fixes a bug introduced by commit 8396f (timeval: Use monotonic time in OVS Python timeval library). Signed-off-by: Ryan Wilson ---

[ovs-dev] [PATCH v3] timeval: Use monotonic time in OVS Python timeval library.

2014-05-30 Thread Ryan Wilson
hat 6.4. Bug #1189434 Signed-off-by: Ryan Wilson --- v2: Pre-load librt.so.1 library instead of loading at every function call. Use only CLOCK_MONOTONIC for consistency with OVS C library. v3: Edit commit message, remove if-linux check --- python/ovs/timeval.py | 34

[ovs-dev] [PATCH v2] timeval: Use monotonic time in OVS Python timeval library.

2014-05-30 Thread Ryan Wilson
;s version >= 3.3. Otherwise, the timeval module calls out to the librt C shared library and uses the clock_gettime function with CLOCK_MONOTONIC. Note this is only enabled on Linux-based platforms. This has been tested on Ubuntu 12.04 and Redhat 6.4. Bug #1189434 Signed-off-by: Ryan Wilson ---

[ovs-dev] [branch-2.3] bridge: Resend status changes to database if previous transaction was not successful.

2014-05-30 Thread Ryan Wilson
change again. This could leave the database in an incorrect state for a long period of time. This patch always sends status changes to the database if the last transaction was not successful. Bug #1256577 Signed-off-by: Ryan Wilson --- v2: Addressed Alex's comments, edited commit message

[ovs-dev] [PATCH v4] bridge: Resend status changes to database if previous transaction was not successful.

2014-05-30 Thread Ryan Wilson
change again. This could leave the database in an incorrect state for a long period of time. This patch always sends status changes to the database if the last transaction was not successful. Signed-off-by: Ryan Wilson --- v2: Addressed Alex's comments, edited commit message to be more acc

[ovs-dev] [PATCH v3] bridge: Resend status changes to database if previous transaction was not successful.

2014-05-29 Thread Ryan Wilson
change again. This could leave the database in an incorrect state for a long period of time. This patch always sends status changes to the database if the last transaction was not successful. Signed-off-by: Ryan Wilson --- v2: Addressed Alex's comments, edited commit message to be more acc

[ovs-dev] [PATCH v2] rtbsd: Make rtbsd module thread-safe.

2014-05-29 Thread Ryan Wilson
. Since the rtbsd_notifier_run() is always run by the main thread often, receiving stale notifications from the notifier is unlikely. Bug #1258532 Signed-off-by: Ryan Wilson Acked-by: YAMAMOTO Takashi --- v2: Fix OVS_EXCLUDES/OVS_EXCLUDED typo --- lib/rtbsd.c | 39

Re: [ovs-dev] [PATCH] rtbsd: Make rtbsd module thread-safe.

2014-05-29 Thread Ryan Wilson 76511
Working on setting up a NetBSD environment now, will report back with the results soon. Ryan From: Ben Pfaff mailto:b...@nicira.com>> Date: Thursday, May 29, 2014 10:37 PM To: Alex Wang mailto:al...@nicira.com>> Cc: YAMAMOTO Takashi mailto:yamam...@valinux.co.jp>>, Rya

[ovs-dev] [PATCH v2] bridge: Resend status changes to database if previous transaction was not successful.

2014-05-29 Thread Ryan Wilson
change again. This could leave the database in an incorrect state for a long period of time. This patch always sends status changes to the database if the last transaction was not successful. Signed-off-by: Ryan Wilson --- v2: Addressed Alex's comments, edited commit message to be more acc

[ovs-dev] [PATCH] timeval: Use monotonic time in OVS Python timeval library.

2014-05-29 Thread Ryan Wilson
;s version >= 3.3. Otherwise, the timeval module calls out to the librt C shared library and uses the clock_gettime function with CLOCK_MONOTONIC_*. Note this is only enabled on Linux-based platforms. Bug #1189434 Signed-off-by: Ryan Wilson --- python/ovs/time

[ovs-dev] [PATCH 2/2] ovsdb-idl: Add coverage counters for ovsdb commit return statuses.

2014-05-29 Thread Ryan Wilson
Signed-off-by: Ryan Wilson --- lib/ovsdb-idl.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 7556b7f..d6b9326 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -23,6 +23,7 @@ #include #include

[ovs-dev] [PATCH 1/2] bridge: Resend netdev statistics to database if previous transaction was not successful.

2014-05-29 Thread Ryan Wilson
last transaction was not successful. Signed-off-by: Ryan Wilson --- vswitchd/bridge.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 9764c1f..9137dcd 100644 --- a/vswitchd/bridge.c +++ b

[ovs-dev] [PATCH] rtbsd: Make rtbsd module thread-safe.

2014-05-29 Thread Ryan Wilson
. Since the rtbsd_notifier_run() is always run by the main thread often, receiving stale notifications from the notifier is unlikely. Bug #1258532 Signed-off-by: Ryan Wilson --- lib/rtbsd.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff

Re: [ovs-dev] [PATCH] route-table: Make route-table module thread-safe.

2014-05-29 Thread Ryan Wilson 76511
t;module. I think the answer is to remove it from the header file and >make it static. > >Other than that looks fine. > >Acked-by: Ethan Jackson > > >On Thu, May 29, 2014 at 12:31 PM, Ryan Wilson wrote: >> Due to patch fe83f8 (netdev: Remove netdev from global

[ovs-dev] [PATCH v2] route-table: Make route-table module thread-safe.

2014-05-29 Thread Ryan Wilson
freed. This causes a race condition with the main thread which calls route_table_run periodically to check for routing table updates. This patch makes the route-table module thread-safe via a mutex. Bug #1258532 Signed-off-by: Ryan Wilson Acked-by: Ethan Jackson --- lib/route-table.c | 23

[ovs-dev] [PATCH] route-table: Make route-table module thread-safe.

2014-05-29 Thread Ryan Wilson
freed. This causes a race condition with the main thread which calls route_table_run periodically to check for routing table updates. This patch makes the route-table module thread-safe via a mutex. Bug #1258532 Signed-off-by: Ryan Wilson --- lib/route-table.c | 19 +++ 1 file

Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Mark xcfgp and new_xcfg as static.

2014-05-28 Thread Ryan Wilson 76511
Acked-by: Ryan Wilson On 5/28/14 12:38 PM, "Ben Pfaff" wrote: >Found by sparse. > >Signed-off-by: Ben Pfaff >--- > ofproto/ofproto-dpif-xlate.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/ofproto/ofproto-dpif-xlate.c b/o

Re: [ovs-dev] [PATCH v4] ofproto-dpif-xlate: Implement RCU locking in ofproto-dpif-xlate.

2014-05-27 Thread Ryan Wilson 76511
> >Acked-by: Ethan Jackson > > >On Thu, May 22, 2014 at 7:03 PM, Alex Wang wrote: >> Hey Ben, >> >> Could you review it? Should be all ready, >> >> >> Thanks, >> Alex Wang, >> >> >> On Tue, May 20, 2014 at 11:19 AM, Ben

[ovs-dev] [PATCH v5] ofproto-dpif-xlate: Implement RCU locking in ofproto-dpif-xlate.

2014-05-27 Thread Ryan Wilson
. Signed-off-by: Ryan Wilson Acked-by: Alex Wang Acked-by: Ethan Jackson --- v2: Split 1 commit into 3: - netdev: Free netdev with ovsrcu_postpone. - ovs-rcu: Add OVSRCU_TYPE_INITIALIZER which initializes OVSRCU_TYPE variables to NULL. - ofproto-dpif-xlate: Implement RCU locking in

Re: [ovs-dev] [PATCH v3] Rapid Spanning Protocol Implementation (IEEE 802.1D) + functional tests

2014-05-26 Thread Ryan Wilson 76511
http://patchwork.openvswitch.org/patch/4139/ With this patch, xlate_rwlock will be gone (as xlate will use RCU locking). So this will no longer be an issue. Still waiting on a review for this patch from Ben or Ethan, but hopefully it will be pushed next week. Ryan _

Re: [ovs-dev] [PATCH 1/4] ofproto: Remove ofproto_group_write_lookup()

2014-05-22 Thread Ryan Wilson 76511
This is a much cleaner improvement, thanks! Acked-by: Ryan Wilson On 5/22/14 11:04 AM, "Andy Zhou" wrote: >ofproto_group_write_lookup() slightly different from >ofproto_group_lookup() in handling reference counting. >Currently, it has only one caller: modify_group(). >It

Re: [ovs-dev] [PATCH] ofproto: Add const to immutable members of ofgroup.

2014-05-21 Thread Ryan Wilson 76511
Thanks for this, Andy! Acked-by: Ryan Wilson From: dev on behalf of Andy Zhou Sent: Wednesday, May 21, 2014 9:47 PM To: d...@openvswitch.com Subject: [ovs-dev] [PATCH] ofproto: Add const to immutable members of ofgroup. Signed-off-by: Andy Zhou

[ovs-dev] [PATCH] TODO: Remove "OpenFlow Group Bucket Stats" from TODO list

2014-05-21 Thread Ryan Wilson
Signed-off-by: Ryan Wilson --- TODO | 17 - 1 file changed, 17 deletions(-) diff --git a/TODO b/TODO index dabe49c..e11089a 100644 --- a/TODO +++ b/TODO @@ -52,23 +52,6 @@ These changes might have backward-compatibility implications; one would have to test the behavior of

[ovs-dev] [PATCH v5] ofproto: Add support for Openflow group and bucket stats.

2014-05-21 Thread Ryan Wilson
Signed-off-by: Ryan Wilson Acked-by: Andy Zhou --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group ref/unref, support for group and bucket stats, and Andy Zhou's tests into 3 patche

[ovs-dev] [PATCH v4] ofproto: Add support for Openflow group and bucket stats.

2014-05-21 Thread Ryan Wilson
Signed-off-by: Ryan Wilson Acked-by: Andy Zhou --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group ref/unref, support for group and bucket stats, and Andy Zhou's tests into 3 patche

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

2014-05-21 Thread Ryan Wilson 76511
rrors with the previous one due how much this reference count patch changed. Ryan On 5/21/14 7:05 PM, "Andy Zhou" wrote: >On Wed, May 21, 2014 at 5:12 PM, Ryan Wilson wrote: >> When adding support for OpenFlow group and bucket stats, a group entry >>is added >&g

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

2014-05-21 Thread Ryan Wilson
s the need for ofgroup's lock. Signed-off-by: Ryan Wilson --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group reference count, support for group and bucket stats into 2 patches. Commit An

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

2014-05-21 Thread Ryan Wilson 76511
works for converting constant variables to non-constant variables). Obviously, I could initialize a pointer to the constant variable and overwrite the pointer's value in init_group. But this will make the code somewhat ugly for a minor gain. >On Wed, May 21, 2014 at 2:14 PM, Ryan Wilson wro

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

2014-05-21 Thread Ryan Wilson
o the group. This also eliminates the need for ofgroup's lock as all properties of ofgroup are read-only. Signed-off-by: Ryan Wilson --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group

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

2014-05-21 Thread Ryan Wilson
o the group. This also eliminates the need for ofgroup's lock as all properties of ofgroup are read-only. Signed-off-by: Ryan Wilson --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group

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

2014-05-21 Thread Ryan Wilson 76511
>>>How about we remove the rwlock and only use ref count? >> >> We need the ref count to determine when we can free the group / bucket. >> The rwlock is to serialize access to the ofgroup's properties. For >> example, 2 threads could be accessing ofgroup's properties, but a ref >> count doesn't p

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

2014-05-20 Thread Ryan Wilson 76511
>> >> 1) Use refs for buckets (this seems unnecessarily heavyweight) >> 2) Always try bucket_lookup when adding stats to a bucket via the cache. >> If the bucket is not there in the list, we know its been removed via >> modify_group() and we simply don't update stats. >> 3) Use ofgroup->rw_lock to

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

2014-05-20 Thread Ryan Wilson 76511
uesday, May 20, 2014 7:06 PM To: Ryan Wilson mailto:wr...@vmware.com>> Cc: Alex Wang mailto:al...@nicira.com>>, "dev@openvswitch.org<mailto:dev@openvswitch.org>" mailto:dev@openvswitch.org>>, Ryan Wilson mailto:wr...@nicira.com>> Subject: Re: [ovs-dev] [P

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

2014-05-20 Thread Ryan Wilson 76511
>On Tue, May 20, 2014 at 3:54 PM, Ryan Wilson 76511 >wrote: >> >> Thanks for the review, Joe! I added a more clear description in 'struct >> ofgroup' and the commit message to explain why the refcount is needed. >That's good. Thanks for the improvement.

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

2014-05-20 Thread Ryan Wilson 76511
: Ryan Wilson mailto:wr...@vmware.com>> Cc: "dev@openvswitch.org<mailto:dev@openvswitch.org>" mailto:dev@openvswitch.org>>, Ryan Wilson mailto:wr...@nicira.com>> Subject: Re: [ovs-dev] [PATCH] ofproto: Remove per-flow miss hash table from upcall handler. On Mo

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

2014-05-20 Thread Ryan Wilson
cleared by a revalidator thread. Signed-off-by: Ryan Wilson --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group reference count, support for group and bucket stats into 2 patches. Commit

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

2014-05-20 Thread Ryan Wilson 76511
o.c that seem to be missing some annotations, but those seem unrelated to my patch. So it might be better to do them in a separate patch. Let me know what you think. Ryan From: Joe Stringer mailto:joestrin...@nicira.com>> Date: Tuesday, May 20, 2014 3:33 PM To: Ryan Wilson mailto:wr...@vm

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

2014-05-20 Thread Ryan Wilson
cleared by a revalidator thread. Signed-off-by: Ryan Wilson --- v2: Fixed bug with group stats all buckets, cleaned up ofgroup unref code, added Andy Zhou's test for more complete test coverage v3: Split group reference count, support for group and bucket stats into 2 patches. Commit

  1   2   >