Re: [ovs-dev] [PATCH v4 2/2] dpif-netdev: Exact match cache

2014-08-29 Thread Daniele Di Proietto
. I will post a v5 soon. Thanks, Daniele On 8/29/14, 1:41 PM, Pravin Shelar pshe...@nicira.com wrote: On Tue, Aug 19, 2014 at 5:11 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: Since lookups in the classifier can be pretty expensive, we introduce this (thread local) cache which simply

[ovs-dev] [PATCH v5 0/2] DPDK performance improvement: exact match cache

2014-08-29 Thread Daniele Di Proietto
cache processing - Use variable length arrays to reduce cache footprint - Rebased Daniele Di Proietto (2): packet-dpif: Add dpif_packet_{get,set}_hash() dpif-netdev: Exact match cache lib/dpif-netdev.c | 449 - lib/netdev-bsd.c

[ovs-dev] [PATCH v5 1/2] packet-dpif: Add dpif_packet_{get, set}_hash()

2014-08-29 Thread Daniele Di Proietto
member 'dp_hash' is removed and 'pkt.hash.rss' from DPDK mbuf is used This commit also configure DPDK devices to compute RSS hash for UDP and IPv6 packets Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 2 +- lib/netdev-bsd.c | 1 + lib/netdev-dpdk.c | 3

[ovs-dev] [PATCH v5 2/2] dpif-netdev: Exact match cache

2014-08-29 Thread Daniele Di Proietto
Since lookups in the classifier can be pretty expensive, we introduce this (thread local) cache which simply compares the miniflows of the packets Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 447 +- 1 file

Re: [ovs-dev] [PATCH v5 0/2] DPDK performance improvement: exact match cache

2014-08-29 Thread Daniele Di Proietto
On 8/29/14, 4:33 PM, Pravin Shelar pshe...@nicira.com wrote: On Fri, Aug 29, 2014 at 4:06 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: This series introduces in dpif-netdev an exact match cache for frequently used flows. It uses the RSS hash (currently implemented only for netdev

[ovs-dev] [PATCH] dpif-netdev: fix dp_netdev_free()

2014-08-29 Thread Daniele Di Proietto
dp_netdev_free() must free 'dp-upcall_rwlock', but when upcalls are disabled (if the datapath is being freed upcalls should be disabled) 'dp-upcall_rwlock' is taken and freeing it causes an assertion to fail. This commit takes makes sure that the upcalls are disabled and releases

Re: [ovs-dev] [PATCH] dpif-netdev: fix dp_netdev_free()

2014-09-02 Thread Daniele Di Proietto
On 9/2/14, 1:39 PM, Pravin Shelar pshe...@nicira.com wrote: On Fri, Aug 29, 2014 at 4:52 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: dp_netdev_free() must free 'dp-upcall_rwlock', but when upcalls are disabled (if the datapath is being freed upcalls should be disabled) 'dp

[ovs-dev] [PATCH v2] dpif-netdev: fix dp_netdev_free()

2014-09-02 Thread Daniele Di Proietto
-upcall_rwlock' before freeing it. A simple testcase is added to detect the failure. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c| 17 - tests/dpif-netdev.at | 8 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b

Re: [ovs-dev] [PATCH] dpif-netdev: fix dp_netdev_free()

2014-09-02 Thread Daniele Di Proietto
On 9/2/14, 3:28 PM, Pravin Shelar pshe...@nicira.com wrote: On Tue, Sep 2, 2014 at 2:44 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: On 9/2/14, 1:39 PM, Pravin Shelar pshe...@nicira.com wrote: On Fri, Aug 29, 2014 at 4:52 PM, Daniele Di Proietto ddiproie...@vmware.com wrote

[ovs-dev] [PATCH 2/2] dpif-netdev: Store miniflow length in exact match cache

2014-09-05 Thread Daniele Di Proietto
for the specific CPU Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- This commit improves 1-flow UDP 64-bytes packets test throughput by 6% (compiled without -march=native) --- lib/dpif-netdev.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/dpif

[ovs-dev] [PATCH 1/2] dpif-netdev: Introduce netdev_flow_key_* functions

2014-09-05 Thread Daniele Di Proietto
(performance related) benefits: - Because of (1) the functions can be inlined. - Because of (2) and (3) the netdev_flow_key can be treated as POD. Specifically, because of (3), we can do comparisons with memcmp, since if the map is different the miniflow must be different. Signed-off-by: Daniele Di

Re: [ovs-dev] [PATCH] lib/dpif-netdev: Remove recursive use of emc_mutex.

2014-09-08 Thread Daniele Di Proietto
Hi Jarno, Thanks for figuring out this bug. I erroneously thought that since commit 623540e4617e (dpif-netdev: Streamline miss handling.) dpif_netdev_execute() could not be called anymore inside a dp_netdev_input() frame. I added the exact match cache on the non pmd-thread path for two reasons:

Re: [ovs-dev] [PATCH v2] lib/dpif-netdev: Remove recursive use of emc_mutex.

2014-09-09 Thread Daniele Di Proietto
Thanks for the fix, Jarno Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/9/14, 8:20 AM, Jarno Rajahalme jrajaha...@nicira.com wrote: Here¹s the updated description: lib/dpif-netdev: Make emc_mutex recursive. dpif_netdev_execute may be called while doing upcall

[ovs-dev] [PATCH] lib/odp-execute: Use dpif_packet_set_dp_hash() instead of -dp_hash

2014-09-09 Thread Daniele Di Proietto
each packet private hash. This commit fixes the build with DPDK Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/odp-execute.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/odp-execute.c b/lib/odp-execute.c index e4bee18..78b1f24 100644 --- a/lib/odp

Re: [ovs-dev] [PATCH] lib/odp-execute: Use dpif_packet_set_dp_hash() instead of -dp_hash

2014-09-09 Thread Daniele Di Proietto
Thanks, Daniele On 9/9/14, 2:22 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: Pushed to master, Jarno On Sep 9, 2014, at 2:15 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: Acked-by: Jarno Rajahalme jrajaha...@nicira.com On Sep 9, 2014, at 1:32 PM, Daniele Di Proietto ddiproie

[ovs-dev] [PATCH] travis: fix DPDK build

2014-09-09 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- I didn't test the fix. If it works netdev-dpdk.o should appear in the travis output (on master it doesn't) Thanks, Daniele --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml

Re: [ovs-dev] [PATCH] travis: fix DPDK build

2014-09-09 Thread Daniele Di Proietto
On 9/9/14, 3:40 PM, Ben Pfaff b...@nicira.com wrote: On Tue, Sep 09, 2014 at 03:17:00PM -0700, Daniele Di Proietto wrote: Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- I didn't test the fix. If it works netdev-dpdk.o should appear in the travis output (on master it doesn't

Re: [ovs-dev] [PATCH] travis: fix DPDK build

2014-09-10 Thread Daniele Di Proietto
On 9/10/14, 7:54 AM, Thomas Graf tg...@noironetworks.com wrote: On 09/09/14 at 10:45pm, Daniele Di Proietto wrote: I¹ll try to figure out what¹s wrong an post another patch. Daniele, I have a patchset to properly enable the DPDK build, fix CFLAGS and disable some errors to make -Werror work

Re: [ovs-dev] [PATCH 0/2] Fix DPDK build

2014-09-11 Thread Daniele Di Proietto
Hi Thomas, I finally managed to care of the issue. With the following incremental on the top of your series OVS DPDK builds properly on travis: diff --git a/.travis/build.sh b/.travis/build.sh index c096eaf..b96181f 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -23,9 +23,8 @@ function

Re: [ovs-dev] [RFC PATCH] lib/odp-util: Relax expectations when parsing a masked key.

2014-09-11 Thread Daniele Di Proietto
, like this: ovs-appctl dpctl/add-flow dummy@br0 in_port(1),eth_type(0x0800),ipv4(frag=no)² 2 Tested-by: Daniele Di Proietto ddiproie...@vmware.com On 9/11/14, 11:25 AM, Jarno Rajahalme jrajaha...@nicira.com wrote: On Sep 11, 2014, at 11:11 AM, Ben Pfaff b...@nicira.com wrote: On Thu, Sep 11

Re: [ovs-dev] [PATCH 2/2] dpif-netdev: Store miniflow length in exact match cache

2014-09-11 Thread Daniele Di Proietto
if we could generalize the inlining benefits, e.g., by defining special ³inline only² functions in lib/flow.h, if necessary. So, maybe you could take a look and consider if you could build on those two in the direction you proposed here? Jarno On Sep 5, 2014, at 5:10 PM, Daniele Di Proietto

Re: [ovs-dev] [ovs-dev 2/3] ovs-dev.py: Support additional optimization flags.

2014-09-12 Thread Daniele Di Proietto
There¹s a minor issue with this patch: not every option is supported by every compiler (for example, on my system, clang doesn¹t support -Og). In this case ovs-dev.py fails to generate a Makefile. I think we can address this in a separate commit. In the meantime: Acked-by: Daniele Di Proietto

Re: [ovs-dev] [ovs-dev 3/3] ovs-dev.py: Support running the clang binaries.

2014-09-12 Thread Daniele Di Proietto
Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/5/14, 2:20 PM, Ethan Jackson et...@nicira.com wrote: They have slightly different support characteristics, so it's nice to easily switch between them for testing. Signed-off-by: Ethan Jackson et...@nicira.com --- utilities/ovs-dev.py

[ovs-dev] [PATCH 1/2] ovs-dev.py: do not pass --enable-dummy to ovsdb

2014-09-12 Thread Daniele Di Proietto
--enable-dummy was useless anyway for ovsdb-server. Now it is an error to pass it. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- utilities/ovs-dev.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 5cf4771

[ovs-dev] [PATCH 2/2] ovs-dev.py: skip clang if configure fails

2014-09-12 Thread Daniele Di Proietto
If 'configure' with clang fails (this can happen for example if it doesn't support all the cflags), simply skip it Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- utilities/ovs-dev.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-dev.py

Re: [ovs-dev] [PATCH 1/2] netdev-dpdk: Make get_config() report correct queue info.

2014-09-15 Thread Daniele Di Proietto
Thanks for the fix! Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/15/14, 1:34 PM, Alex Wang al...@nicira.com wrote: With the separation of tx queue and rx queue configuration in netdev-dpdk module, the netdev_dpdk_get_config() can no longer report 'n_rxq' as tx queue configuration

Re: [ovs-dev] [PATCH V2 2/2] netdev-dpdk: Fix thread-safety breach.

2014-09-15 Thread Daniele Di Proietto
Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/15/14, 2:18 PM, Alex Wang al...@nicira.com wrote: dpdk_eth_dev_init() must be called with dpdk_mutex. However, netdev_dpdk_set_multiq() fails to follow this rule. This commit fixes this breach. Found by clang. Signed-off-by: Alex

Re: [ovs-dev] BUILD_MESSAGE on GCC

2014-09-16 Thread Daniele Di Proietto
Hi Ben, I tested it on GCC 4.9.1 (debian testing) and GCC 4.8.2 (ubuntu 14.04.1) and it works. I think the errors you are experiencing come from sparse. My guess is that sparse does not support _Pragma(message()), but since GCC supports it, HAVE_PRAGMA_MESSAGE is 1. I think the best solution

[ovs-dev] [PATCH] compiler.h: disable BUILD_MESSAGE for sparse

2014-09-16 Thread Daniele Di Proietto
Since sparse doesn't support _Pragma(message()), but uses the same defines as GCC, the BUILD_MESSAGE macro will cause sparse errors. This commit simply disables BUILD_MESSAGE if __CHECKER__ is defined Reported-by: Ben Pfaff b...@nicira.com Signed-off-by: Daniele Di Proietto ddiproie

[ovs-dev] [PATCH] ofproto-dpif-xlate: Wildcard skb_priority if QoS is disabled

2014-09-17 Thread Daniele Di Proietto
This optimization should give a small performance benefit to the userspace datapath. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- ofproto/ofproto-dpif-xlate.c | 25 ++-- tests/classifier.at | 20 +++ tests/dpif-netdev.at | 16 ++--- tests/ofproto

Re: [ovs-dev] [PATCH 2/2] dpif-netdev: Store miniflow length in exact match cache

2014-09-17 Thread Daniele Di Proietto
Thanks! On 9/17/14, 3:19 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: Looks good, thanks again! Acked-by: Jarno Rajahalme jrajaha...@nicira.com pushed to master, Jarno On Sep 5, 2014, at 5:10 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: This optimization is done to avoid

Re: [ovs-dev] [PATCH] netdev-dpdk: Pass queue id to dpdk_do_tx_copy().

2014-09-18 Thread Daniele Di Proietto
Thanks for the fix Alex! Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/18/14, 5:09 PM, Alex Wang al...@nicira.com wrote: Since dpdk_do_tx_copy() will be called by both pmd and non-pmd thread, it should take the queue id as input. The current ovs always uses NON_PMD_THREAD_TX_QUEUE

Re: [ovs-dev] [PATCH 1/2] netdev-dpdk: Fix a typo.

2014-09-19 Thread Daniele Di Proietto
Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/19/14, 10:57 AM, Alex Wang al...@nicira.com wrote: Signed-off-by: Alex Wang al...@nicira.com --- lib/netdev-dpdk.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index

Re: [ovs-dev] [PATCH 2/2] netdev-dpdk: Fix a bug in netdev_dpdk_set_multiq().

2014-09-19 Thread Daniele Di Proietto
How about changing Œnetdev_dpdk_set_txq()¹ to 'netdev_dpdk_alloc_txq()¹? IMHO it is more clear that it is allocating memory without freeing it. Otherwise, LGTM. Thanks for the fix Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/19/14, 10:57 AM, Alex Wang al...@nicira.com wrote

[ovs-dev] [PATCH] dpif-netdev: Fix (packet) memory leaks in the slow path.

2014-09-19 Thread Daniele Di Proietto
() if the upcalls are disabled * passing may_steal==true to dp_netdev_execute_actions() during normal upcall processing Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions

Re: [ovs-dev] [PATCH] dpif-netdev: Fix (packet) memory leaks in the slow path.

2014-09-19 Thread Daniele Di Proietto
Thanks for the reviews, I¹m about to send a v2 On 9/19/14, 3:49 PM, Pravin Shelar pshe...@nicira.com wrote: On Fri, Sep 19, 2014 at 1:28 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: If a packet didn't match a rule in the fast path classifier its memory was never freed. The issue

[ovs-dev] [PATCH v2] dpif-netdev: Fix (packet) memory leaks in the slow path.

2014-09-19 Thread Daniele Di Proietto
() if the upcalls are disabled * passing may_steal==true to dp_netdev_execute_actions() during normal upcall processing Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- v2: * (Pravin's suggestion) restructured dp_execute_cb to return immediately if successful and free packets at the end

[ovs-dev] [RFC 1/2] u64-stats-lock: Introduce u64_stats_lock

2014-09-20 Thread Daniele Di Proietto
are reading a consistent 64-bit value. Therefore, 'u64_stats_lock' is introduced, which maps to a noop for 64-bits architecture and to a mutex for other architetures. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/automake.mk | 1 + lib/u64-stats-lock.h | 65

[ovs-dev] [RFC 2/2] dpif-netdev: Use per pmdthread datapath statistics

2014-09-20 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 70 ++- 1 file changed, 23 insertions(+), 47 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 90fe01c..e5f2aa0 100644 --- a/lib/dpif-netdev.c

Re: [ovs-dev] RFC: A plan for stats.

2014-09-20 Thread Daniele Di Proietto
Hi Ethan, As you know I¹ve been working on similar problems for the userspace datapath. Also, I¹m about to post a patch series to reduce the overhead of counting (global, not per-flow) stats in dpif-netdev.c. Here are some thoughts : * I definitely think it¹s a good idea to use ovsthread_stats

Re: [ovs-dev] RFC: A plan for stats.

2014-09-20 Thread Daniele Di Proietto
On 9/20/14, 12:31 PM, Ben Pfaff b...@nicira.com wrote: On Sat, Sep 20, 2014 at 07:23:30PM +, Daniele Di Proietto wrote: * Most importantly, many implementation of thread local storage (e.g. C11) do not allow cross-thread access (there?s a big comment in lib/ovs-thread.h). That's what

Re: [ovs-dev] [PATCH] netdev: Fix a typo.

2014-09-25 Thread Daniele Di Proietto
Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/25/14, 11:45 AM, Alex Wang al...@nicira.com wrote: Reported-by: Daniel Badea daniel.ba...@windriver.com Signed-off-by: Alex Wang al...@nicira.com --- lib/netdev.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib

Re: [ovs-dev] [PATCH] netdev-dpdk: Fix crash when there is no pci numa info.

2014-09-25 Thread Daniele Di Proietto
Thanks for the fix! Acked-by: Daniele Di Proietto ddiproie...@vmware.com On 9/25/14, 1:28 PM, Alex Wang al...@nicira.com wrote: When kernel cannot obtain the pci numa info, the numa_node file in corresponding pci directory in sysfs will show -1. Then the rte_eth_dev_socket_id() function

Re: [ovs-dev] dpdk options in ovs-vswitchd

2014-09-30 Thread Daniele Di Proietto
The options you are using should be correct. It looks like you didn't really enable DPDK support while compiling. Make sure to pass the appropriate option to ./configure On 9/30/14, 8:35 AM, Vinod, Chegu chegu_vi...@hp.com wrote: Hello, 'had git cloned the OVS tree and was trying out the

Re: [ovs-dev] [patch V2] INSTALL.DPDK: Update DPDK related documentation.

2014-09-30 Thread Daniele Di Proietto
On 9/29/14, 3:29 PM, Alex Wang al...@nicira.com wrote: This commit updates the DPDK related documentation to reflect the pmd thread multi-threading work. Signed-off-by: Alex Wang al...@nicira.com Acked-by: Daniele Di Proietto ddiproie...@vmware.com

Re: [ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Daniele Di Proietto
it. However, in each case any options following --dpdk were not ignored, and since --dpdk is normally followed by additional DPDK-specific options, this caused even more confusing trouble. Signed-off-by: Ben Pfaff b...@nicira.com Acked-by: Daniele Di Proietto ddiproie...@vmware.com

Re: [ovs-dev] [PATCH] ovs-vswitchd: Better diagnose errors in DPDK command-line options.

2014-09-30 Thread Daniele Di Proietto
Yes, I tested with and without DPDK. It didn't cause any problem for me Thanks, Daniele On 9/30/14, 11:10 AM, Ben Pfaff b...@nicira.com wrote: On Tue, Sep 30, 2014 at 05:11:10PM +, Daniele Di Proietto wrote: On 9/30/14, 9:57 AM, Ben Pfaff b...@nicira.com wrote: With DPDK compiled

[ovs-dev] [PATCH 2/6] timeval: Fix seq memory leak

2014-10-03 Thread Daniele Di Proietto
'timewarp_seq' should be initialized only once, while init_clock() is called multiple times. Found by valgrind Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/timeval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timeval.c b/lib/timeval.c index

[ovs-dev] [PATCH 1/6] dpif-netdev: fix dp_netdev_free()

2014-10-03 Thread Daniele Di Proietto
-upcall_rwlock' before freeing it. A simple testcase is added to detect the failure. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c| 16 +++- tests/dpif-netdev.at | 8 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b

[ovs-dev] [PATCH 3/6] dpif-netdev: Destroy pmd_thread cmap at exit

2014-10-03 Thread Daniele Di Proietto
Found by valgrind Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 6029d3f..9c61a21 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -643,6 +643,7

[ovs-dev] [PATCH 6/6] odp-execute: Refactor odp_execute_{actions, sample}()

2014-10-03 Thread Daniele Di Proietto
. This also fixes a memory leak in odp_execute_sample(), when the subactions are not executed Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/odp-execute.c | 65 +-- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git

[ovs-dev] [PATCH 5/6] odp-execute: Fix memory leak on recirc action

2014-10-03 Thread Daniele Di Proietto
If odp_execute_actions() has been called with 'steal' set to true and OVS_ACTION_ATTR_RECIRC as last action, it should allow dp_execute_cb() to steal the packet. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/odp-execute.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

Re: [ovs-dev] [PATCH 1/6] dpif-netdev: fix dp_netdev_free()

2014-10-03 Thread Daniele Di Proietto
Thanks for the prompt review Jarno! Daniele On 10/3/14, 3:18 PM, Jarno Rajahalme jrajaha...@nicira.com wrote: Thanks Daniele! For the series: Acked-by: Jarno Rajahalme jrajaha...@nicira.com and pushed to master. Jarno On Oct 3, 2014, at 9:15 AM, Daniele Di Proietto ddiproie...@vmware.com

[ovs-dev] [RFC 00/10] Thread local statistics updates

2014-10-08 Thread Daniele Di Proietto
that is clearing while another thread is reading stats. Jarno helped me a lot with the RCU mechanisms and data structures Daniele Di Proietto (10): dpif-netdev: Group statistics updates in the slow path ovs-rcu: Introduce ovsrcu_compare_exchange() ovs-rcu: Allow static pointer non-NULL initialization

[ovs-dev] [RFC 03/10] ovs-rcu: Allow static pointer non-NULL initialization

2014-10-08 Thread Daniele Di Proietto
OVSRCU_TYPE_INITIALIZER now accepts a parameter (the initial value of the RCU protected pointer). Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/ovs-rcu.h| 6 -- ofproto/ofproto-dpif-xlate.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff

[ovs-dev] [RFC 01/10] dpif-netdev: Group statistics updates in the slow path

2014-10-08 Thread Daniele Di Proietto
This also fixes a memory leak if an upcall fails Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index a1db620..11aacc3 100644 --- a/lib/dpif

[ovs-dev] [RFC 04/10] rcu-slist: Introduce RCU-protected singly linked list

2014-10-08 Thread Daniele Di Proietto
An rcu-slist can be read and written without explicit locking: it uses RCU protected pointers and compare-exchange operations. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/automake.mk | 1 + lib/rcu-slist.h | 84 + 2

[ovs-dev] [RFC 05/10] ovs-thread-stats: New truly per-thread stats module

2014-10-08 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/automake.mk| 2 + lib/ovs-thread-stats.c | 393 + lib/ovs-thread-stats.h | 236 + lib/ovs-thread.c | 8 +- 4 files changed, 638

[ovs-dev] [RFC 07/10] dpif-netdev: Use new ovs-thread-stats for flow statistics

2014-10-08 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 97 +-- 1 file changed, 36 insertions(+), 61 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 11aacc3..a798c86 100644 --- a/lib/dpif-netdev.c

[ovs-dev] [RFC 08/10] ofproto-dpif: Use new ovs-thread-stats for rule_dpif stats

2014-10-08 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- ofproto/ofproto-dpif.c | 103 +++-- 1 file changed, 75 insertions(+), 28 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index d965d38..915b8c2 100644 --- a/ofproto

[ovs-dev] [RFC 09/10] dpif-netdev: Use new ovs-thread-stats for datapath stats

2014-10-08 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c | 71 +++ 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index a798c86..9880027 100644 --- a/lib/dpif-netdev.c

[ovs-dev] [RFC 06/10] ovs-thread-stats: Added simple testcase

2014-10-08 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- tests/automake.mk| 2 + tests/test-stats.c | 162 +++ tests/testsuite.at | 1 + tests/threadstats.at | 4 ++ 4 files changed, 169 insertions(+) create mode 100644 tests

[ovs-dev] [RFC 10/10] ovs-thread: Removed old unused ovsthread_stats

2014-10-08 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/ovs-thread.c | 48 lib/ovs-thread.h | 32 2 files changed, 80 deletions(-) diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index ac014f5..83ade11

[ovs-dev] [RFC 02/10] ovs-rcu: Introduce ovsrcu_compare_exchange()

2014-10-08 Thread Daniele Di Proietto
ovsrcu_compare_exchange() can be used to write to RCU pointers without explicit locking. It maybe useful to implement lists and other simple data structures. Following commits make use of this Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/ovs-rcu.h | 81

Re: [ovs-dev] [RFC 01/10] dpif-netdev: Group statistics updates in the slow path

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 8:47 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:47PM -0700, Daniele Di Proietto wrote: This also fixes a memory leak if an upcall fails Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com Thanks for the all the reviews, Ben! I generally prefer

Re: [ovs-dev] [RFC 03/10] ovs-rcu: Allow static pointer non-NULL initialization

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 8:53 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:49PM -0700, Daniele Di Proietto wrote: OVSRCU_TYPE_INITIALIZER now accepts a parameter (the initial value of the RCU protected pointer). Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com Good idea

Re: [ovs-dev] [RFC 04/10] rcu-slist: Introduce RCU-protected singly linked list

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 9:13 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:50PM -0700, Daniele Di Proietto wrote: An rcu-slist can be read and written without explicit locking: it uses RCU protected pointers and compare-exchange operations. Signed-off-by: Daniele Di Proietto

Re: [ovs-dev] [RFC 05/10] ovs-thread-stats: New truly per-thread stats module

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 9:35 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:51PM -0700, Daniele Di Proietto wrote: Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com This looks very useful! Thank you. I am not sure that we need the ovs prefix on all the names. I included

Re: [ovs-dev] [RFC 05/10] ovs-thread-stats: New truly per-thread stats module

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 9:42 AM, Ben Pfaff b...@nicira.com wrote: I thought of another question. I think that there's a hard limit, with this mechanism, on the maximum size of the client's statistics data structure. Without looking at the patch again, I think it's 64 - 8 = 56 bytes. Is there anything

Re: [ovs-dev] [RFC 06/10] ovs-thread-stats: Added simple testcase

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 9:37 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:52PM -0700, Daniele Di Proietto wrote: Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com I would fold this into the previous patch. It makes me more confident about the module's correctness. Thanks

Re: [ovs-dev] [RFC 07/10] dpif-netdev: Use new ovs-thread-stats for flow statistics

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 9:40 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:53PM -0700, Daniele Di Proietto wrote: Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com Can you estimate the additional memory overhead per-datapath flow that this adds? Our recent review

Re: [ovs-dev] [RFC 08/10] ofproto-dpif: Use new ovs-thread-stats for rule_dpif stats

2014-10-10 Thread Daniele Di Proietto
On 10/10/14, 9:47 AM, Ben Pfaff b...@nicira.com wrote: On Wed, Oct 08, 2014 at 02:09:54PM -0700, Daniele Di Proietto wrote: Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com Do you have any ideas on how to make the new thread stats code a little more flexible, so that the awkward

Re: [ovs-dev] [PATCH] lib/dpif-netdev: Fix EMC lookup.

2014-10-17 Thread Daniele Di Proietto
Thanks for fixing this Jarno! I've tested the patch and it fixes the problem. Would you mind adding a comment on struct netdev_flow_key that 'len' accounts for the length of the miniflow only (including the map)? Other comments inline, otherwise: Acked-by: Daniele Di Proietto ddiproie

Re: [ovs-dev] [PATCH 1/1] netdev-dpdk: Move to DPDK 1.7.1

2014-10-17 Thread Daniele Di Proietto
Thanks for the patch. Acked-by: Daniele Di Proietto ddiproie...@vmware.com Pravin, would you mind pushing this? I suggest one minor change, inline. On 10/13/14, 7:17 AM, maryam.tahhan maryam.tah...@intel.com wrote: This patch updates the documentation to reflect that DPDK 1.7.1 is supported

[ovs-dev] [PATCH] INSTALL.DPDK: improve documentation

2014-10-17 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- INSTALL.DPDK | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/INSTALL.DPDK b/INSTALL.DPDK index 7484b4b..0d19012 100644 --- a/INSTALL.DPDK +++ b/INSTALL.DPDK @@ -11,6 +11,8

[ovs-dev] [PATCH v4 2/3] netdev: netdev_send accepts multiple packets

2014-06-09 Thread Daniele Di Proietto
The netdev_send function has been modified to accept multiple packets, to allow netdev providers to amortize locking and queuing costs. This is especially true for netdev-dpdk. Later commits exploit the new API. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c

[ovs-dev] [PATCH v4 0/3] DPDK batch packet processing

2014-06-09 Thread Daniele Di Proietto
Changes from v3: struct dpif_packet has its own header removed many dpif_packet functions (using ofpbuf directly instead) avoided copying in dpif_execute() Changes from v2: introduce struct dpif_packet for storing non-shared packet metadata Daniele Di Proietto (3): dpif-netdev: use

[ovs-dev] [PATCH v4 3/3] dpif-netdev: batch packet processing

2014-06-09 Thread Daniele Di Proietto
This change in dpif-netdev allows faster packet processing for devices which implement batching (netdev-dpdk currently). Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c| 352 +++ lib/dpif.c

[ovs-dev] [PATCH v4 1/3] dpif-netdev: use dpif_packet structure for packets

2014-06-09 Thread Daniele Di Proietto
This commit introduces a new data structure used for receiving packets from netdevs and passing them to dpifs. The purpose of this change is to allow storing some private data for each packet. The subsequent commits make use of it. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com

[ovs-dev] [PATCH] dpif-netdev: enumerate dpif belonging to the right class

2014-06-12 Thread Daniele Di Proietto
-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-linux.c| 3 ++- lib/dpif-netdev.c | 8 +++- lib/dpif-provider.h | 9 + lib/dpif.c | 4 +++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 63e66f3..afe9340

Re: [ovs-dev] [PATCH v3 2/3] netdev: netdev_send accepts multiple packets

2014-06-13 Thread Daniele Di Proietto
Thanks for the suggestions Ben. I posted a v4 few days later, but since I need to apply this change I’ll post a v5 as soon as possible. Daniele On Jun 13, 2014, at 9:10 AM, Ben Pfaff b...@nicira.com wrote: On Fri, Jun 06, 2014 at 05:13:14PM -0700, Daniele Di Proietto wrote: The netdev_send

[ovs-dev] [PATCH v5 0/3] DPDK batch packet processing

2014-06-13 Thread Daniele Di Proietto
in dpif_execute() Changes from v2: introduce struct dpif_packet for storing non-shared packet metadata Daniele Di Proietto (3): dpif-netdev: use dpif_packet structure for packets netdev: netdev_send accepts multiple packets dpif-netdev: batch packet processing lib/automake.mk | 2 + lib

[ovs-dev] [PATCH v5 3/3] dpif-netdev: batch packet processing

2014-06-13 Thread Daniele Di Proietto
This change in dpif-netdev allows faster packet processing for devices which implement batching (netdev-dpdk currently). Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c| 354 +++ lib/dpif.c

[ovs-dev] [PATCH v5 1/3] dpif-netdev: use dpif_packet structure for packets

2014-06-13 Thread Daniele Di Proietto
This commit introduces a new data structure used for receiving packets from netdevs and passing them to dpifs. The purpose of this change is to allow storing some private data for each packet. The subsequent commits make use of it. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com

[ovs-dev] [PATCH v5 2/3] netdev: netdev_send accepts multiple packets

2014-06-13 Thread Daniele Di Proietto
The netdev_send function has been modified to accept multiple packets, to allow netdev providers to amortize locking and queuing costs. This is especially true for netdev-dpdk. Later commits exploit the new API. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c

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

2014-06-16 Thread Daniele Di Proietto
rte_eal_init() returns the number of parsed dpdk arguments to skip. dpdk_init() should add 1 to that number, because it has already skipped the --dpdk argument itself Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/netdev-dpdk.c | 3 ++- 1 file changed, 2 insertions(+), 1

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

2014-06-18 Thread Daniele Di Proietto
Hi Ryan, some quick thoughts about the code: diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 6c281fe..626b3e6 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -15,8 +15,6 @@ */ #include config.h -#include dpif.h - #include ctype.h #include errno.h #include

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

2014-06-19 Thread Daniele Di Proietto
/14 9:46 AM, Daniele Di Proietto ddiproie...@vmware.com wrote: rte_eal_init() returns the number of parsed dpdk arguments to skip. dpdk_init() should add 1 to that number, because it has already skipped the --dpdk argument itself Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com

[ovs-dev] [PATCH v6 0/3] DPDK batch packet processing

2014-06-20 Thread Daniele Di Proietto
for storing non-shared packet metadata Daniele Di Proietto (3): dpif-netdev: use dpif_packet structure for packets netdev: netdev_send accepts multiple packets dpif-netdev: batch packet processing lib/automake.mk | 2 + lib/dpif-netdev.c| 327

[ovs-dev] [PATCH v6 2/3] netdev: netdev_send accepts multiple packets

2014-06-20 Thread Daniele Di Proietto
The netdev_send function has been modified to accept multiple packets, to allow netdev providers to amortize locking and queuing costs. This is especially true for netdev-dpdk. Later commits exploit the new API. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c

[ovs-dev] [PATCH v6 3/3] dpif-netdev: batch packet processing

2014-06-20 Thread Daniele Di Proietto
This change in dpif-netdev allows faster packet processing for devices which implement batching (netdev-dpdk currently). Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c| 325 +-- lib/dpif.c

[ovs-dev] [PATCH v6 1/3] dpif-netdev: use dpif_packet structure for packets

2014-06-20 Thread Daniele Di Proietto
This commit introduces a new data structure used for receiving packets from netdevs and passing them to dpifs. The purpose of this change is to allow storing some private data for each packet. The subsequent commits make use of it. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com

[ovs-dev] [PATCH] Makefile.am: fix printf-check in out-of-tree build

2014-06-22 Thread Daniele Di Proietto
the pathnames to be relative to the OVS root directory. This commit fixes the problem by changing the directory before executing any commands, like we do elsewhere in Makefile.am Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- Makefile.am | 12 +++- 1 file changed, 7 insertions(+), 5

[ovs-dev] [PATCH v7 0/3] DPDK batch packet processing

2014-06-22 Thread Daniele Di Proietto
removed many dpif_packet functions (using ofpbuf directly instead) avoided copying in dpif_execute() Changes from v2: introduce struct dpif_packet for storing non-shared packet metadata *** BLURB HERE *** Daniele Di Proietto (3): dpif-netdev: use dpif_packet structure for packets netdev

[ovs-dev] [PATCH v7 2/3] netdev: netdev_send accepts multiple packets

2014-06-22 Thread Daniele Di Proietto
The netdev_send function has been modified to accept multiple packets, to allow netdev providers to amortize locking and queuing costs. This is especially true for netdev-dpdk. Later commits exploit the new API. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c

[ovs-dev] [PATCH v7 3/3] dpif-netdev: batch packet processing

2014-06-22 Thread Daniele Di Proietto
This change in dpif-netdev allows faster packet processing for devices which implement batching (netdev-dpdk currently). Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- lib/dpif-netdev.c| 325 +-- lib/dpif.c

[ovs-dev] [PATCH v7 1/3] dpif-netdev: use dpif_packet structure for packets

2014-06-22 Thread Daniele Di Proietto
This commit introduces a new data structure used for receiving packets from netdevs and passing them to dpifs. The purpose of this change is to allow storing some private data for each packet. The subsequent commits make use of it. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com

[ovs-dev] [PATCH] test-classifier: add ovs_assert to prevent warning

2014-06-23 Thread Daniele Di Proietto
GCC 4.9.0 triggers a warning (array-bounds) while compiling test-classifier.c This commit introduces an assertion that suppresses the warning. Signed-off-by: Daniele Di Proietto ddiproie...@vmware.com --- While I feel that this is a GCC problem, this simple (IMHO harmful) assertion fixes

Re: [ovs-dev] [PATCH v7 1/3] dpif-netdev: use dpif_packet structure for packets

2014-06-23 Thread Daniele Di Proietto
On Jun 23, 2014, at 10:35 AM, Pravin Shelar pshe...@nicira.com wrote: On Sun, Jun 22, 2014 at 5:30 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: This commit introduces a new data structure used for receiving packets from netdevs and passing them to dpifs. The purpose of this change

Re: [ovs-dev] [PATCH v7 3/3] dpif-netdev: batch packet processing

2014-06-23 Thread Daniele Di Proietto
On Jun 23, 2014, at 10:36 AM, Pravin Shelar pshe...@nicira.com wrote: On Sun, Jun 22, 2014 at 5:30 PM, Daniele Di Proietto ddiproie...@vmware.com wrote: This change in dpif-netdev allows faster packet processing for devices which implement batching (netdev-dpdk currently). Signed-off

  1   2   3   4   5   6   7   8   9   10   >