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 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 3/3] netdev: Warn on opening netdev as unexpected type.

2014-05-05 Thread Ryan Wilson
eated with a new type. I tested out the fix and it works with my patch as well. Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 4, 2014, at 4:18 PM, Joe Stringer wrote: > On 3 May 2014 02:56, Ben Pfaf

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

2014-05-06 Thread Ryan Wilson
Hey Joe, This looks good to me and fixes the root cause which is even better. I'm fairly new to OVS, so my ack likely doesn't mean much :) Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 5, 201

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

2014-05-06 Thread Ryan Wilson
This patch also adds a ref/unref structure for ofgroup, so handler and revalidator threads can update group / bucket stats via the xlate cache. See the following thread for more information: http://openvswitch.org/pipermail/dev/2014-January/036107.html Signed-off-by: Ryan Wilson --- lib/ofp

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

2014-05-06 Thread Ryan Wilson
. This patch also frees netdev with ovsrcu_postpone. This is because if RCU reader threads take a ref to the netdev, the netdev cannot be deleted and re-created with different types. Signed-off-by: Ryan Wilson --- lib/netdev.c | 37 +-- lib/ovs-rcu.h|2

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

2014-05-06 Thread Ryan Wilson
This patch also adds a ref/unref structure for ofgroup, so handler and revalidator threads can update group / bucket stats via the xlate cache. 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 com

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

2014-05-07 Thread Ryan Wilson
is no need for this hash map. This patch removes this hash map and each packet has its own upcall. Signed-off-by: Ryan Wilson --- ofproto/ofproto-dpif-upcall.c | 280 + 1 file changed, 89 insertions(+), 191 deletions(-) diff --git a/ofproto/ofproto-dpif

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

2014-05-09 Thread Ryan Wilson
y commit. After re-reading my commit, I totally agree. I'll resubmit the patch split into 2 with a more clear description. Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 9, 2014, at 9:59 AM, Alex Wan

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

2014-05-09 Thread Ryan Wilson
. Signed-off-by: Ryan Wilson --- 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 ofproto-dpif-xlate. --- ofproto/ofproto-dpif

[ovs-dev] [PATCH 2/3] ovs-rcu: Add OVSRCU_TYPE_INITIALIZER which initializes OVSRCU_TYPE variables to NULL.

2014-05-09 Thread Ryan Wilson
--- lib/ovs-rcu.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ovs-rcu.h b/lib/ovs-rcu.h index 4b451b2..8327517 100644 --- a/lib/ovs-rcu.h +++ b/lib/ovs-rcu.h @@ -129,6 +129,7 @@ */ #if __GNUC__ #define OVSRCU_TYPE(TYPE) struct { ATOMIC(TYPE) p; } +#define OVSRCU_TYPE_INITIALIZ

[ovs-dev] [PATCH 1/3] netdev: Free netdev with ovsrcu_postpone.

2014-05-09 Thread Ryan Wilson
properties while the main thread is not blocked from making netdev configuration changes. Note that any RCU reader threads reading netdev should not call netdev_ref or netdev_close. Signed-off-by: Ryan Wilson --- lib/netdev.c | 37 +++-- 1 file changed, 23

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

2014-05-09 Thread Ryan Wilson
r the memory overhead of allocating a hash map and this would outweigh the negative effect of possibly re-processing a packet from the same flow. Since userspace forwarding has gotten so much faster, this wouldn't be so bad. Obviously, I need perf numbers to justify these claims; I will post

[ovs-dev] [PATCH] netdev: Remove netdev from global shash when the user is changing interface configuration.

2014-05-15 Thread Ryan Wilson
When the user changes port type (i.e. changing p0 from type 'internal' to 'gre'), the netdev must first be deleted, then re-created with the new type. Deleting the netdev requires there exist no more references to the netdev. However, the xlate cache holds references to netdevs and the cache is onl

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

2014-05-15 Thread Ryan Wilson
this and if this sounds good, I'll resubmit my RCU locking patch corrected for this change. Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 9, 2014, at 11:48 AM, Alex Wang wrote: > Great to see this s

[ovs-dev] [PATCH v2] netdev: Remove netdev from global shash when the user is changing interface configuration.

2014-05-16 Thread Ryan Wilson
nges port type. This ensures that the new netdev can always be created while handler and revalidator threads can retain references to the old netdev until they are finished. Signed-off-by: Ryan Wilson Acked-by: Ben Pfaff --- v2: Clarified comments for netdev_remove based on Alex Wa

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

2014-05-16 Thread Ryan Wilson
It appears this patch will be pushed, so I'll send out v3 of the xlate RCU locking patch. Cheers, Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 15, 2014, at 11:16 AM, Ryan Wilson wrote: > H

[ovs-dev] [PATCH v3 1/2] ovs-rcu: Add OVSRCU_TYPE_INITIALIZER which initializes OVSRCU_TYPE variables to NULL.

2014-05-16 Thread Ryan Wilson
--- lib/ovs-rcu.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ovs-rcu.h b/lib/ovs-rcu.h index 4b451b2..8327517 100644 --- a/lib/ovs-rcu.h +++ b/lib/ovs-rcu.h @@ -129,6 +129,7 @@ */ #if __GNUC__ #define OVSRCU_TYPE(TYPE) struct { ATOMIC(TYPE) p; } +#define OVSRCU_TYPE_INITIALIZ

[ovs-dev] [PATCH v3 2/2] ofproto-dpif-xlate: Implement RCU locking in ofproto-dpif-xlate.

2014-05-16 Thread Ryan Wilson
. Signed-off-by: Ryan Wilson --- 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 ofproto-dpif-xlate. v3: Separate netdev patch

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

2014-05-16 Thread Ryan Wilson
. Signed-off-by: Ryan Wilson Acked-by: Alex Wang --- 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 ofproto-dpif-xlate. v3

[ovs-dev] [PATCH] ovs-rcu: Add OVSRCU_TYPE_INITIALIZER which initializes OVSRCU_TYPE variables to NULL.

2014-05-19 Thread Ryan Wilson
Signed-off-by: Ryan Wilson Acked-by: Alex Wang --- lib/ovs-rcu.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ovs-rcu.h b/lib/ovs-rcu.h index 4b451b2..8327517 100644 --- a/lib/ovs-rcu.h +++ b/lib/ovs-rcu.h @@ -129,6 +129,7 @@ */ #if __GNUC__ #define OVSRCU_TYPE(TYPE) struct

Re: [ovs-dev] [PATCH v3 1/2] ovs-rcu: Add OVSRCU_TYPE_INITIALIZER which initializes OVSRCU_TYPE variables to NULL.

2014-05-19 Thread Ryan Wilson
Shoot, total brain fart on my part. Just sent out another version of the patch with the signed off by. Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 19, 2014, at 7:59 AM, Ben Pfaff wrote: > Looks g

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

2014-05-19 Thread Ryan Wilson
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 Andy Zhou's test patch

[ovs-dev] [PATCH v3 2/3] ofproto: Add support for Openflow group and bucket stats.

2014-05-19 Thread Ryan Wilson
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 ref/unref, support for group and bucket stats, and Andy Zhou's tests into 3 patches. --- lib/

[ovs-dev] [PATCH v3 3/3] tests: Add tests for Openflow group stats

2014-05-19 Thread Ryan Wilson
From: Andy Zhou Signed-off-by: Andy Zhou Signed-off-by: Ryan Wilson --- tests/ofproto-dpif.at | 44 1 file changed, 44 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index fad8f2c..b87f735 100644 --- a/tests/ofproto

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

2014-05-19 Thread Ryan Wilson
duplicate flow additions. With hash map in upcall: NUM RESULTS: 23944 MEAN: 150.843937 MEDIAN: 150.66 Without hash map in up call: NUM RESULTS: 24736 MEAN: 147.618262 MEDIAN: 147.300000 Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Offi

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

2014-05-19 Thread Ryan Wilson
real 1m28.357s Deleting ports: real1m33.277s Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1511 Office 916.588.7783 Mobile On May 19, 2014, at 8:56 AM, Ben Pfaff wrote: > On Fri, May 16, 2014 at 06:59:02AM -0700, Ryan Wils

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

2014-05-19 Thread Ryan Wilson
Sorry Gurucharan, totally forgot to answer your question! After interspersing these tests with random calls to reload the kernel module, it doesn't appear to affect time in any significant way. Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alt

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

2014-05-19 Thread Ryan Wilson
/s): RCU: Mean: 84.591932 Median: 83.405000 Master: Mean: 78.528627 Median: 70.55 Its not huge, but if we add more ovs-vsctl commands, I'd imagine we'd see more improvement. Not sure if this is a valid use case, but these are my findings so far. Ryan Wilson Member of Technical St

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

2014-05-19 Thread Ryan Wilson
,in_port(4),skb_mark(0),eth(src=a0:36:9f:33:3a:c0,dst=a2:2e:02:45:b6:14),eth_type(0x0800),ipv4(src=1.1.1.110,dst=1.1.1.30,proto=6,tos=0,ttl=64,frag=no),tcp(src=54622,dst=41606),tcp_flags(0x010) Ryan Wilson Member of Technical Staff wr...@vmware.com 3401 Hillview Avenue, Palo Alto, CA 650.427.1

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

2014-05-19 Thread Ryan Wilson
is no need for this hash map. This patch removes this hash map and each packet has its own upcall. Signed-off-by: Ryan Wilson --- v2: Addressed Alex's comments --- ofproto/ofproto-dpif-upcall.c | 283 + 1 file changed, 91 insertions(+), 192 dele

[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

[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

[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

[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 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

[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

[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] 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-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

[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

[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] 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

[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 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] 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 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 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

[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 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] [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 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] [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] 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] 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

[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 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 ++

[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

[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:

[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

[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 --

[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 --

[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 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

[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 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 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

[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] 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

[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.

[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 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(+

[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.

[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

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

[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 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

[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

[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 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 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

[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 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 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 -

[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 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] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ryan Wilson 76511
in ovsdb's Interface table likely indicates that ovs-vswitchd has been restarted or killed. Signed-off-by: Ryan Wilson --- diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 9d8e67f..ea2e59c 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -40,6 +

Re: [ovs-dev] [PATCH] netdev: Add random tag to struct netdev.

2014-04-22 Thread Ryan Wilson 76511
be tied to netdevs to take account of the case when a tunnel is removed and re-added for whatever reason. Does that make sense? If so, an explanation of the sort should be added to the commit message. Ethan > > On Apr 22, 2014 4:09 PM, "Ryan Wilson 76511" < wr...@vmware.co

Re: [ovs-dev] [PATCH] netdev: Remove netdev from global shash when the user is changing interface configuration.

2014-05-16 Thread Ryan Wilson 76511
ve in iface_destroy__ (which Alex recommended). - Original Message - From: "Ben Pfaff" To: "Ryan Wilson" Cc: dev@openvswitch.org Sent: Friday, May 16, 2014 7:52:19 AM Subject: Re: [ovs-dev] [PATCH] netdev: Remove netdev from global shash when the user is changing interface co

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

2014-05-19 Thread Ryan Wilson 76511
We should use Andy's patch for the tests since I didn't write the tests: http://patchwork.openvswitch.org/patch/3626/ I'll split the group RCU and the crediting stats parts of this commit on my next version. Ryan - Original Message - From: "Alex Wang"

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

2014-05-20 Thread Ryan Wilson 76511
e, meaning 1000 copies of the configuration in memory. This should stress memory usage. I ran a test in my previous email that details this behavior more specifically, but I know I've sent a lot of emails so here's the gist of it. Ryan From: Ryan Wilson mailto:wr...@vmware.com>

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

2014-05-20 Thread Ryan Wilson 76511
e lock annotation may be lacking around group >functions. It would >be nice to add them. I'll add these annotations in my next patch. Thanks for the review, Ryan > >On Mon, May 19, 2014 at 6:20 AM, Ryan Wilson wrote: >> Signed-off-by: Ryan Wilson >> >> --

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

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

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
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
>> >> 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

  1   2   >