[ovs-dev] [PATCH] netdev-dpdk: Use different constant for ring size

2014-07-29 Thread Daniele Di Proietto
DPDK rings must have a power-of-two size. Signed-off-by: Daniele Di Proietto --- lib/netdev-dpdk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index b45e367..c1b644a 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c

Re: [ovs-dev] [PATCH] netdev-dpdk: Use different constant for ring size

2014-07-30 Thread Daniele Di Proietto
On 7/30/14, 8:29 AM, "Ben Pfaff" wrote: >On Tue, Jul 29, 2014 at 04:21:32PM -0700, Daniele Di Proietto wrote: >> DPDK rings must have a power-of-two size. >> >> Signed-off-by: Daniele Di Proietto >> --- >> lib/netdev-dpdk.c | 5 +++-- >&

[ovs-dev] [PATCH v2] netdev-dpdk: Use different constant for ring size

2014-07-30 Thread Daniele Di Proietto
DPDK rings must have a power-of-two size. Signed-off-by: Daniele Di Proietto --- lib/netdev-dpdk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index b45e367..a779833 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c

Re: [ovs-dev] [PATCH v2] dpctl: add ovs-appctl dpctl/* commands to talk to dpif-netdev

2014-08-05 Thread Daniele Di Proietto
Thanks for the review and for the fixes! Daniele On 8/4/14, 2:31 PM, "Ben Pfaff" wrote: >On Thu, Jul 17, 2014 at 05:26:00PM -0700, Daniele Di Proietto wrote: >> This commit introduces multiple appctl commands (dpctl/*) >> >> They are needed to interact with u

[ovs-dev] [PATCH] test-atomic: Fix warnings for GCC4.9 and sparse

2014-08-06 Thread Daniele Di Proietto
There's no reason for the local variable 'old_count' to be atomic. In fact, if it is atomic it triggers a GCC4.9 warning (Wunused-value) The global variables 'a' and 'paux' could be static, according to sparse. Signed-off-by: Daniele Di Proietto --- Ther

Re: [ovs-dev] [PATCH] test-atomic: Fix warnings for GCC4.9 and sparse

2014-08-06 Thread Daniele Di Proietto
, > > Jarno > >On Aug 6, 2014, at 10:35 AM, Daniele Di Proietto >wrote: > >> There's no reason for the local variable 'old_count' to be atomic. In >>fact, if >> it is atomic it triggers a GCC4.9 warning (Wunused-value) >> The global variab

Re: [ovs-dev] [PATCH v2] netdev-dpdk: Use different constant for ring size

2014-08-06 Thread Daniele Di Proietto
On 8/6/14, 3:30 PM, "Pravin Shelar" wrote: >On Wed, Jul 30, 2014 at 8:51 AM, Daniele Di Proietto > wrote: >> DPDK rings must have a power-of-two size. >> >> Signed-off-by: Daniele Di Proietto >> --- >> lib/netdev-dpdk.c | 6 -- &g

[ovs-dev] [PATCH 2/3] Add BUILD_MESSAGE() macro

2014-08-07 Thread Daniele Di Proietto
This commit introduces the BUILD_MESSAGE() macro. It uses _Pragma("message"), with compilers that support that, to output a warning-like compile-time message without blocking the compilation. Used by next commit. Signed-off-by: Daniele Di Proietto --- configure.ac | 1 + lib/

[ovs-dev] [PATCH 3/3] lib/flow: Use BUILD_MESSAGE() to warn if BUILD_SEQ is not updated

2014-08-07 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/flow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/flow.c b/lib/flow.c index 2e5ca0a..78b132e 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -123,6 +123,9 @@ struct mf_ctx { #if (FLOW_WC_SEQ != 27) #define MINIFLOW_ASSERT(X) ovs_assert(X

[ovs-dev] [PATCH 1/3] lib/flow: Update FLOW_WC_SEQ to skip assertions on miniflow_extract()

2014-08-07 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 5e04015..2e5ca0a 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -118,10 +118,10 @@ struct mf_ctx { /* miniflow_push_* macros allow filling in a

[ovs-dev] [PATCH 0/3] Update FLOW_WC_SEQ in lib/flow.c and add "warning"

2014-08-07 Thread Daniele Di Proietto
testing of miniflow_extract() with run-time assertions. Daniele Di Proietto (3): lib/flow: Update FLOW_WC_SEQ to skip assertions on miniflow_extract() Add BUILD_MESSAGE() macro lib/flow: Use BUILD_MESSAGE() to warn if BUILD_SEQ is not updated configure.ac | 1 + lib/compiler.h| 10

Re: [ovs-dev] [PATCH] datapath: Avoid NULL mask check while building mask

2014-08-08 Thread Daniele Di Proietto
Hi Pravin, couple of comments: - I would remove also the check for match->mask in update_range__(). - I think braces are not necessary for if/else statements in the macros. Of course I would wait for review by Jesse or Andy, but other than that, LGTM. Acked-by: Daniele Di Proietto On 8/7

Re: [ovs-dev] [PATCH 1/3] lib/flow: Update FLOW_WC_SEQ to skip assertions on miniflow_extract()

2014-08-08 Thread Daniele Di Proietto
halme wrote: > >> Acked-by: Jarno Rajahalme >> >>> On Aug 7, 2014, at 6:15 PM, Daniele Di Proietto >>> wrote: >>> >>> Signed-off-by: Daniele Di Proietto >>> --- >>> lib/flow.c | 4 ++-- >>> 1 file changed, 2 insertions(

Re: [ovs-dev] [PATCH] datapath: Avoid NULL mask check while building mask

2014-08-08 Thread Daniele Di Proietto
-2). > >The main issue is that this logic does not handle genuine multiple >level of nested attributes. For example, encap within tunnel. OVS >does not support ittoday but Geneve does allow for outer header to >have a vlan tag. > >If the issue is to handle variable len

[ovs-dev] [PATCH 1/2] netdev-dpdk: Move to DPDK 1.7.0

2014-08-12 Thread Daniele Di Proietto
With this commit we move our DPDK support to 1.7.0. DPDK binaries (starting with dpdk 1.7.0) should be linked with --whole-archive to include pmd drivers Signed-off-by: Daniele Di Proietto --- INSTALL.DPDK | 12 ++-- acinclude.m4 | 13 - lib

[ovs-dev] [PATCH 2/2] netdev-dpdk: Keep calling rte_eth_tx_burst() until it returns 0

2014-08-12 Thread Daniele Di Proietto
only if rte_eth_tx_burst returns 0. Signed-off-by: Daniele Di Proietto --- lib/netdev-dpdk.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index f2202b4..97206e6 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-d

Re: [ovs-dev] [v2] datapath: Distinguish between nested and variable length attributes

2014-08-12 Thread Daniele Di Proietto
Hi Andy, Two comments inline Other than those, LGTM, but review by others might be useful :) Acked-by: Daniele Di Proietto On 8/12/14, 1:45 PM, "Andy Zhou" wrote: >-1 was used to indicate both nested and variable length attributes. >This patch introduces OVS_KE

Re: [ovs-dev] [PATCH 2/2] netdev-dpdk: Keep calling rte_eth_tx_burst() until it returns 0

2014-08-13 Thread Daniele Di Proietto
On 8/12/14, 5:40 PM, "Pravin Shelar" wrote: >On Tue, Aug 12, 2014 at 10:43 AM, Daniele Di Proietto > wrote: >> rte_eth_tx_burst() _should_ transmit every packet that it is passed >>unless the >> queue is full. Nontheless some implementation of rte_eth_tx_

Re: [ovs-dev] [PATCH 2/4] dpif-netdev: Reintroduce ref_cnt for dp_netdev_flow

2014-08-13 Thread Daniele Di Proietto
On 8/12/14, 5:41 PM, "Pravin Shelar" wrote: >On Tue, Jul 22, 2014 at 5:06 PM, Daniele Di Proietto > wrote: >> struct dp_netdev_flow used to have a reference counter. It has been >>replaced by >> RCU. Unfortunately RCU is not enough if we plan to hold a referenc

Re: [ovs-dev] [PATCH 3/4] ofpbuf: Add ofpbuf_rss()

2014-08-13 Thread Daniele Di Proietto
On 8/12/14, 5:42 PM, "Pravin Shelar" wrote: >On Tue, Jul 22, 2014 at 5:06 PM, Daniele Di Proietto > wrote: >> ofpbuf_rss() is introduced to get the RSS hash from the NIC. It works >>only for >> packets received by DPDK (otherwise it returns 0, which tells the

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

2014-08-13 Thread Daniele Di Proietto
On 8/12/14, 5:39 PM, "Pravin Shelar" wrote: >On Tue, Aug 12, 2014 at 10:43 AM, Daniele Di Proietto > wrote: >> With this commit we move our DPDK support to 1.7.0. >> DPDK binaries (starting with dpdk 1.7.0) should be linked with >>--whole-archive >&

Re: [ovs-dev] [PATCH 3/4] ofpbuf: Add ofpbuf_rss()

2014-08-13 Thread Daniele Di Proietto
On 8/13/14, 3:28 PM, "Pravin Shelar" wrote: >On Wed, Aug 13, 2014 at 8:49 AM, Daniele Di Proietto > wrote: >> >> >> On 8/12/14, 5:42 PM, "Pravin Shelar" wrote: >> >>>On Tue, Jul 22, 2014 at 5:06 PM, Daniele Di Proietto >>> wro

[ovs-dev] [PATCH v2 0/3] DPDK performance improvement: exact match cache

2014-08-15 Thread Daniele Di Proietto
cache processing - Use variable length arrays to reduce cache footprint - Rebased Daniele Di Proietto (3): ofpbuf: Add ofpbuf_rss() dpif-netdev: Add dp_netdev_packet_rss() dpif-netdev: Exact match cache lib/dpif-netdev.c | 451 +- l

[ovs-dev] [PATCH v2 1/3] ofpbuf: Add ofpbuf_rss()

2014-08-15 Thread Daniele Di Proietto
Di Proietto --- lib/netdev-dpdk.c | 3 ++- lib/ofpbuf.h | 14 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index a8f041b..23cf410 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -96,7 +96,8 @@ static const

[ovs-dev] [PATCH v2 3/3] dpif-netdev: Exact match cache

2014-08-15 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 --- lib/dpif-netdev.c | 422 +- 1 file changed, 357

[ovs-dev] [PATCH v2 2/3] dpif-netdev: Add dp_netdev_packet_rss()

2014-08-15 Thread Daniele Di Proietto
This new function uses ofpbuf_rss(), or hashes the packet 5-tuple, to get the hash of a packet. Used by OVS_ACTION_ATTR_HASH and future commits. Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff

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

2014-08-15 Thread Daniele Di Proietto
On 8/15/14, 2:13 PM, "Gurucharan Shetty" wrote: >On Tue, Aug 12, 2014 at 5:39 PM, Pravin Shelar wrote: >> On Tue, Aug 12, 2014 at 10:43 AM, Daniele Di Proietto >> wrote: >>> With this commit we move our DPDK support to 1.7.0. >>> DPDK binaries (star

[ovs-dev] [PATCH] acinclude.m4: Do not set vswitchd_ovs_vswitchd_LDFLAGS

2014-08-18 Thread Daniele Di Proietto
Pfaff Signed-off-by: Daniele Di Proietto --- Guru, does this properly address the issue? We could also put the extra line in vswitchd/automake.mk inside an "if DPDK_NETDEV" block. What do you guys think? --- acinclude.m4 | 4 ++-- vswitchd/automake.mk | 1 + 2 files changed, 3

Re: [ovs-dev] [PATCH 1/2] automake: Add AM_LDFLAGS while linking ovs-vswitchd.

2014-08-18 Thread Daniele Di Proietto
I just sent a patch to the list. Please, let me know if this solves all the issues. Thanks, Daniele On 8/18/14, 10:31 AM, "Ben Pfaff" wrote: >On Mon, Aug 18, 2014 at 10:28:44AM -0700, Gurucharan Shetty wrote: >> On Mon, Aug 18, 2014 at 9:51 AM, Ben Pfaff wrote: >> > On Mon, Aug 18, 2014 at 07

[ovs-dev] [PATCH] fat-rwlock: fat_rwlock_tryrdlock() should never block

2014-08-18 Thread Daniele Di Proietto
fat_rwlock_tryrdlock() used to call fat_rwlock_get_slot__() which could block in the "slow path" case. This commit adds fat_rwlock_try_get_slot__() which does not block, even in the "slow path" case. Signed-off-by: Daniele Di Proietto --- l

Re: [ovs-dev] [PATCH] fat-rwlock: fat_rwlock_tryrdlock() should never block

2014-08-18 Thread Daniele Di Proietto
On 8/18/14, 11:47 AM, "Ben Pfaff" wrote: >On Mon, Aug 18, 2014 at 11:26:22AM -0700, Daniele Di Proietto wrote: >> fat_rwlock_tryrdlock() used to call fat_rwlock_get_slot__() which could >>block >> in the "slow path" case. This commit adds fat_rwlock_t

[ovs-dev] [PATCH v2] fat-rwlock: fat_rwlock_tryrdlock() should never block

2014-08-18 Thread Daniele Di Proietto
upcall handler (e.g. if it is created with dpctl commands), dp_netdev_input() hangs if it does not find a packet's flow in the classifier. Signed-off-by: Daniele Di Proietto --- lib/fat-rwlock.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff -

Re: [ovs-dev] [PATCH v2 1/3] ofpbuf: Add ofpbuf_rss()

2014-08-18 Thread Daniele Di Proietto
Sorry about those, I will send an updated version soon. Thanks, Daniele On 8/18/14, 9:45 AM, "Ben Pfaff" wrote: >On Fri, Aug 15, 2014 at 12:43:35PM -0700, Daniele Di Proietto wrote: >> ofpbuf_rss() is introduced to get the RSS hash from the NIC. It works >>only f

Re: [ovs-dev] [PATCH v2] fat-rwlock: fat_rwlock_tryrdlock() should never block

2014-08-18 Thread Daniele Di Proietto
Thanks! On 8/18/14, 1:23 PM, "Ben Pfaff" wrote: >On Mon, Aug 18, 2014 at 12:57:42PM -0700, Daniele Di Proietto wrote: >> fat_rwlock_tryrdlock() used to call fat_rwlock_get_slot__() which could >>block >> in the "slow path" case. This commit adds fat_rw

[ovs-dev] [PATCH v3 2/3] dpif-netdev: Add dp_netdev_packet_rss()

2014-08-18 Thread Daniele Di Proietto
This new function uses ofpbuf_rss(), or hashes the packet 5-tuple, to get the hash of a packet. Used by OVS_ACTION_ATTR_HASH and future commits. Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff

[ovs-dev] [PATCH v3 1/3] ofpbuf: Add ofpbuf_rss()

2014-08-18 Thread Daniele Di Proietto
Di Proietto --- lib/netdev-dpdk.c | 3 ++- lib/ofpbuf.h | 14 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index a8f041b..23cf410 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -96,7 +96,8 @@ static const

[ovs-dev] [PATCH v3 3/3] dpif-netdev: Exact match cache

2014-08-18 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 --- lib/dpif-netdev.c | 422 +- 1 file changed, 357

[ovs-dev] [PATCH v3 0/3] DPDK performance improvement: exact match cache

2014-08-18 Thread Daniele Di Proietto
Split dp_netdev_input() in two functions to save memory in exact match cache processing - Use variable length arrays to reduce cache footprint - Rebased Daniele Di Proietto (3): ofpbuf: Add ofpbuf_rss() dpif-netdev: Add dp_netdev_packet_rss() dpif-netdev: Exact match cache lib/dpif-netd

Re: [ovs-dev] [PATCH v3 1/3] ofpbuf: Add ofpbuf_rss()

2014-08-19 Thread Daniele Di Proietto
On 8/18/14, 11:06 PM, "Pravin Shelar" wrote: >On Mon, Aug 18, 2014 at 1:29 PM, Daniele Di Proietto > wrote: >> ofpbuf_rss() is introduced to get the RSS hash from the NIC. It works >>only for >> packets received by DPDK (otherwise it returns 0, which tells t

Re: [ovs-dev] [PATCH v3 3/3] dpif-netdev: Exact match cache

2014-08-19 Thread Daniele Di Proietto
Thanks for the detailed and fast review. I applied all your suggestions and I'll post a v4 soon On 8/18/14, 11:06 PM, "Pravin Shelar" wrote: >On Mon, Aug 18, 2014 at 1:29 PM, Daniele Di Proietto > wrote: >> Since lookups in the classifier can be pretty expensive, we

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

2014-08-19 Thread Daniele Di Proietto
struct dpif_packet's 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 --- lib/dpif-netdev.c | 2 +- lib/netdev-bsd.c | 1 + li

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

2014-08-19 Thread Daniele Di Proietto
s: + fixed several coding style issues v2: - Implemented Pravin suggestions: + dp_netdev_rss() + reverse order of batch lookup in dp_netdev_queue_batches() - Split dp_netdev_input() in two functions to save memory in exact match cache processing - Use variable lengt

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

2014-08-19 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 --- lib/dpif-netdev.c | 431 +- 1 file changed, 358

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

2014-08-29 Thread Daniele Di Proietto
ow it is needed. I will post a v5 soon. Thanks, Daniele On 8/29/14, 1:41 PM, "Pravin Shelar" wrote: >On Tue, Aug 19, 2014 at 5:11 PM, Daniele Di Proietto > wrote: >> Since lookups in the classifier can be pretty expensive, we introduce >>this >> (thread local) ca

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

2014-08-29 Thread Daniele Di Proietto
() - Split dp_netdev_input() in two functions to save memory in exact match 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-n

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

2014-08-29 Thread Daniele Di Proietto
struct dpif_packet's 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 --- lib/dpif-netdev.c | 2 +- lib/netdev-bsd.c | 1 + li

[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 --- lib/dpif-netdev.c | 447 +- 1 file changed, 374

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" wrote: >On Fri, Aug 29, 2014 at 4:06 PM, Daniele Di Proietto > wrote: >> This series introduces in dpif-netdev an exact match cache for >>frequently >> used flows. It uses the RSS hash (currently implemented only for >&g

[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 'dp->upcall_rwl

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" wrote: >On Fri, Aug 29, 2014 at 4:52 PM, Daniele Di Proietto > wrote: >> dp_netdev_free() must free 'dp->upcall_rwlock', but when upcalls are >>disabled >> (if the datapath is being freed upcalls should be

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

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

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" wrote: >On Tue, Sep 2, 2014 at 2:44 PM, Daniele Di Proietto > wrote: >> On 9/2/14, 1:39 PM, "Pravin Shelar" wrote: >> >>>On Fri, Aug 29, 2014 at 4:52 PM, Daniele Di Proietto >>> wrote: >>>&

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

2014-09-05 Thread Daniele Di Proietto
r the specific CPU Signed-off-by: Daniele Di Proietto --- 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-netdev.c b/lib

[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 On 9/9/14, 8:20 AM, "Jarno Rajahalme" wrote: >Here¹s the updated description: > >lib/dpif-netdev: Make emc_mutex recursive. > >dpif_netdev_execute may be called while doing upcall processing. >

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

2014-09-09 Thread Daniele Di Proietto
should use dpif_packet_get_dp_hash() to get each packet private hash. This commit fixes the build with DPDK Signed-off-by: Daniele Di Proietto --- 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..78b1f

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" wrote: >Pushed to master, > > Jarno > >On Sep 9, 2014, at 2:15 PM, Jarno Rajahalme wrote: > >> Acked-by: Jarno Rajahalme >> >> On Sep 9, 2014, at 1:32 PM, Daniele Di Proietto >> wro

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

2014-09-09 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- 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/.trav

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

2014-09-09 Thread Daniele Di Proietto
On 9/9/14, 3:40 PM, "Ben Pfaff" wrote: >On Tue, Sep 09, 2014 at 03:17:00PM -0700, Daniele Di Proietto wrote: >> Signed-off-by: Daniele Di Proietto >> --- >> I didn't test the fix. If it works "netdev-dpdk.o" should appear in the >>travis

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

2014-09-10 Thread Daniele Di Proietto
On 9/10/14, 7:54 AM, "Thomas Graf" 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

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 i

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

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

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

2014-09-11 Thread Daniele Di Proietto
it aligned. > >I¹d like to see 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? > &g

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 On 9/5/14, 2:20 PM, "Ethan Jackson" wrote: >They have slightly different support characteristics, so it's nice to >easily switch between them for testing. > >Signed-off-by: Ethan Jackson >--- > utilities/ovs-dev.py | 18 ++

[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 --- 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..869d89e 100755 --- a

[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 --- utilities/ovs-dev.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-dev.py b/utili

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 On 9/15/14, 1:34 PM, "Alex Wang" 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 On 9/15/14, 2:18 PM, "Alex Wang" 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 wou

[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 Signed-off-by: Daniele Di Proietto --- lib/compiler.h | 2 +- 1

Re: [ovs-dev] [PATCH v5] acinclude: Autodetect DPDK location when configuring OVS

2016-04-15 Thread Daniele Di Proietto
On 14/04/2016 14:51, "Ben Pfaff" wrote: >On Tue, Apr 12, 2016 at 11:44:15AM +0100, Bhanuprakash Bodireddy wrote: >> When using DPDK datapath, the OVS configure script requires the DPDK >> build directory passed on --with-dpdk. This can be avoided if DPDK >> library, headers are in standard comp

Re: [ovs-dev] [PATCH v3] Update relevant artifacts to add support for DPDK 16.04.

2016-04-15 Thread Daniele Di Proietto
Thanks for the patch! I pushed this to master 2016-04-14 9:40 GMT-07:00 mweglicx : > Following changes are applied: > - INSTALL.DPDK.md: CONFIG_RTE_BUILD_COMBINE_LIBS step has been >removed because it is no longer present in DPDK configuration >(combined library is created by default), >

Re: [ovs-dev] [PATCH v7 09/16] hmap: Use struct for hmap_at_position().

2016-04-15 Thread Daniele Di Proietto
Hi Mark, On 14/04/2016 05:36, "Kavanagh, Mark B" wrote: >Hi Daniele, > >One minor comment inline. > >Cheers, >Mark > >> >>The interface will be more similar to the cmap. >> >>Signed-off-by: Daniele Di Proietto >>--- >> l

Re: [ovs-dev] [PATCH v7 11/16] ovs-thread: Do not quiesce in ovs_mutex_cond_wait().

2016-04-15 Thread Daniele Di Proietto
t, I removed the reference to ovs_mutex_cond_wait() there. Thanks for noticing this! > >> >>In system_stats_thread_func() the code relied on ovs_mutex_cond_wait() >>to introduce a quiescent state, so explicit calls to >>ovsrcu_quiesce_start() and ovsrcu_quiesce_end() a

Re: [ovs-dev] [PATCH v7 16/16] netdev-dpdk: Use ->reconfigure() call to change rx/tx queues.

2016-04-15 Thread Daniele Di Proietto
;This mechanism can also be used to: >>* Automatically match the number of rxq with the one provided by qemu >> via the new_device callback. >>* Provide a way to change the MTU of dpdk devices at runtime. >>* Move a DPDK vhost device to the proper NUMA socket.

[ovs-dev] [PATCH v2 00/15] Userspace (DPDK) connection tracker

2016-04-15 Thread Daniele Di Proietto
hing strategy in conntrack_execute() to allow a newly created connection to be picked up by packets in the same batch. * Added an ovs-test module to throw pcap files at the connection tracker. * Added a workaround for the userspace testsuite on new kernels and a tcp non-conntrack test. Daniel

[ovs-dev] [PATCH v2 02/15] flow: Export parse_ipv6_ext_hdrs().

2016-04-15 Thread Daniele Di Proietto
This will be used by a future commit. Signed-off-by: Daniele Di Proietto --- lib/flow.c | 140 ++--- lib/flow.h | 3 ++ 2 files changed, 81 insertions(+), 62 deletions(-) diff --git a/lib/flow.c b/lib/flow.c index 560a90f..972a996

[ovs-dev] [PATCH v2 03/15] flow: Introduce parse_dl_type().

2016-04-15 Thread Daniele Di Proietto
The function simply returns the ethernet type of the packet (after eventually discarding the VLAN tag). It will be used by a following commit. Signed-off-by: Daniele Di Proietto --- lib/flow.c | 14 -- lib/flow.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git

[ovs-dev] [PATCH v2 07/15] conntrack: Implement flush function.

2016-04-15 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/conntrack.c | 21 + lib/conntrack.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/lib/conntrack.c b/lib/conntrack.c index 840335b..7913e76 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -849,3 +849,24 @@ delete_conn

[ovs-dev] [PATCH v2 10/15] dpif-netdev: Implement conntrack dump functions.

2016-04-15 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 60 --- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 436359a..5ac2bf3 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif

[ovs-dev] [PATCH v2 01/15] packets: Define ICMP types.

2016-04-15 Thread Daniele Di Proietto
Linux and FreeBSD have slightly different names for these constants. Windows doesn't define them. It is simpler to redefine them from scratch for OVS. The new names are different than those used in Linux and FreeBSD. These definitions will be used by a future commit. Signed-off-by: Danie

[ovs-dev] [PATCH v2 05/15] tests: Add very simple conntrack benchmark.

2016-04-15 Thread Daniele Di Proietto
different batching and locking strategies. E.g. the line: `./test/ovstest test-conntrack benchmark 1 1488 32` starts 1 thread that will send 1488 packets to the connection tracker, 32 at a time. It will print the time taken to process them. Signed-off-by: Daniele Di Proietto --- tests

[ovs-dev] [PATCH v2 11/15] dpif-netdev: Implement conntrack flush interface.

2016-04-15 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 5ac2bf3..995cbc0 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3991,6 +3991,14

[ovs-dev] [PATCH v2 09/15] dpif-netdev: Execute conntrack action.

2016-04-15 Thread Daniele Di Proietto
This commit implements the OVS_ACTION_ATTR_CT action in dpif-netdev. To allow ofproto-dpif to detect the conntrack feature, flow_put will not discard anymore flows with ct_* fields set. We still shouldn't allow flows with NAT bits set, since there is no support for NAT. Signed-off-by: Danie

[ovs-dev] [PATCH v2 06/15] tests: Add test-conntrack pcap test.

2016-04-15 Thread Daniele Di Proietto
g. Signed-off-by: Daniele Di Proietto --- tests/test-conntrack.c | 65 ++ 1 file changed, 65 insertions(+) diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c index 414d7dc..5292320 100644 --- a/tests/test-conntrack.c +++ b/tests/test-c

[ovs-dev] [PATCH v2 14/15] system-tests: Add tcp simple test.

2016-04-15 Thread Daniele Di Proietto
Useful to test the datapath ability to forward tcp packets without the complexity of connection tracking. Signed-off-by: Daniele Di Proietto --- tests/system-traffic.at | 20 1 file changed, 20 insertions(+) diff --git a/tests/system-traffic.at b/tests/system-traffic.at

[ovs-dev] [PATCH v2 12/15] tests: Add conntrack ofproto-dpif tests.

2016-04-15 Thread Daniele Di Proietto
While the system testsuite already has connection tracking tests, it will be still useful to add some to the standard testsuite because: * They're run more often by developers. * Some of them are more interesting for the userspace datapath. Signed-off-by: Daniele Di Proietto --- tests/of

[ovs-dev] [PATCH v2 08/15] conntrack: Implement dumping to ct_entry.

2016-04-15 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/conntrack-private.h | 3 ++ lib/conntrack-tcp.c | 34 + lib/conntrack.c | 125 lib/conntrack.h | 16 +++ 4 files changed, 178 insertions(+) diff --git a/lib

[ovs-dev] [PATCH v2 13/15] system-tests: Disable offloads in userspace tests.

2016-04-15 Thread Daniele Di Proietto
a workaround. Signed-off-by: Daniele Di Proietto --- tests/system-common-macros.at| 1 + tests/system-kmod-macros.at | 7 +++ tests/system-userspace-macros.at | 18 ++ 3 files changed, 26 insertions(+) diff --git a/tests/system-common-macros.at b/tests/system-c

[ovs-dev] [PATCH v2 15/15] system-tests: Run conntrack tests with userspace

2016-04-15 Thread Daniele Di Proietto
ff-by: Daniele Di Proietto --- tests/system-kmod-macros.at | 28 +++ tests/system-traffic.at | 49 ++-- tests/system-userspace-macros.at | 45 +--- 3 files changed, 107 insertions(+), 15 deletions(-)

[ovs-dev] [PATCH v2 04/15] conntrack: New userspace connection tracker.

2016-04-15 Thread Daniele Di Proietto
ding style and to allow the pickup of already established connections. Signed-off-by: Daniele Di Proietto --- COPYING | 1 + debian/copyright.in | 4 + lib/automake.mk | 5 + lib/conntrack-other.c | 91 ++ lib/conntrack-private.h | 77 + lib/connt

[ovs-dev] [PATCH] datapath-windows: Fix bug in OvsTcpGetWscale().

2016-04-15 Thread Daniele Di Proietto
instead of 'unsigned' for 'len', since the value can be negative. CC: Sairam Venugopal Signed-off-by: Daniele Di Proietto --- I tested a similar fix on the userspace connection tracker, but I didn't compile this for the windows datapath. --- datapath-windows/ovsext/Conntrack-

[ovs-dev] [PATCH] checkpatch: Accept form feeds.

2016-04-18 Thread Daniele Di Proietto
W(199): Line has trailing whitespace + This commit suppresses the two warnings for lines with form feeds as the only character. Signed-off-by: Daniele Di Proietto --- utilities/checkpatch.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utilities/checkpatch.py b/uti

Re: [ovs-dev] [PATCH v2 00/15] Userspace (DPDK) connection tracker

2016-04-18 Thread Daniele Di Proietto
ch_size must be between 1 and >NETDEV_MAX_BURST(%u)", You're right there are several genuine errors reported by checkpatch.py. I'll fix them. > >patches 7/15 and 8/15, 10/15, 11/15 - as there's no comment into the >patch, maybe >they just need an empty line bef

Re: [ovs-dev] [PATCH v7 08/16] dpif-netdev: Add pmd thread local port cache for transmission.

2016-04-18 Thread Daniele Di Proietto
On 18/04/2016 07:50, "Ilya Maximets" wrote: >On 08.04.2016 06:13, Daniele Di Proietto wrote: >> Signed-off-by: Daniele Di Proietto >> --- >> lib/dpif-netdev.c | 243 >>+++--- >> 1 file changed, 175

Re: [ovs-dev] [PATCH] checkpatch: Accept form feeds.

2016-04-18 Thread Daniele Di Proietto
On 18/04/2016 14:26, "Ben Pfaff" wrote: >On Mon, Apr 18, 2016 at 02:02:37PM -0700, Daniele Di Proietto wrote: >> CodingStyle.md says: >> >> "Use form feeds (control+L) to divide long source files into logical >> pieces. A form feed sho

[ovs-dev] [PATCH v8 00/16] Reconfigure netdev at runtime

2016-04-19 Thread Daniele Di Proietto
now accessed while holding the appropriate mutex. * Fixed some outdated comments about rx queue configuration. Daniele Di Proietto (16): dpif-netdev: Destroy 'port_mutex' in dp_netdev_free(). dpif-netdev: Remove unused 'index' in dp_netdev_pmd_thread. dpif-netdev: F

[ovs-dev] [PATCH v8 02/16] dpif-netdev: Remove unused 'index' in dp_netdev_pmd_thread.

2016-04-19 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- lib/dpif-netdev.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 24717cc..060f5e0 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -430,8 +430,6 @@ struct

  1   2   3   4   5   6   7   8   9   10   >