[ovs-dev] VLAN QinQ (802.1AD ) support in OpenvSwitch

2014-03-19 Thread Deba Prasad Das
Hi All This is regarding the VLAN QinQ (802.1AD ) support in OpenvSwitch . We are planning to work on VLAN QinQ support in Openvswitch. Please let us know whether if some people are already working on this feature. Could anyone please let me know your pointers about this feature. Thanks,Deba

[ovs-dev] [PATCH] socket-util: Fix an inverted use of LINUX

2014-03-19 Thread YAMAMOTO Takashi
Fix a regression introduced by commit fce314cd. ("socket-util: Fix definition of LINUX.") Signed-off-by: YAMAMOTO Takashi --- lib/socket-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/socket-util.c b/lib/socket-util.c index 5e1be3f..aa0c719 100644 --- a/lib/socket

Re: [ovs-dev] [PATCH v2.55] datapath: Add basic MPLS support to kernel

2014-03-19 Thread Simon Horman
On Fri, Mar 14, 2014 at 04:12:39PM +0900, Simon Horman wrote: > Hi Pravin, Hi Jesse, Hi All, > > I have updated this patch so that: > > * The datapath rejects push MPLS actions in the presence of VLAN tags. > > I have done this by white-listing the following: > - ETH_P_IP (0x0800) > - ETH_

Re: [ovs-dev] Support for Linux kernels >= 3.12 with the out of tree kernel module

2014-03-19 Thread Jesse Gross
On Mon, Mar 10, 2014 at 12:32 PM, Pravin Shelar wrote: > On Thu, Mar 6, 2014 at 1:57 PM, Kyle Mestery > wrote: >> On Thu, Feb 27, 2014 at 3:28 PM, Pravin Shelar wrote: >>> >>> On Thu, Feb 27, 2014 at 12:41 PM, Kyle Mestery >>> wrote: >>> > On Wed, Feb 26, 2014 at 5:07 PM, Pravin Shelar >>> >

Re: [ovs-dev] [PATCH] datapath: Correctly report flow used times for first 5 minutes after boot.

2014-03-19 Thread Jesse Gross
On Fri, Feb 28, 2014 at 1:14 PM, Ben Pfaff wrote: > diff --git a/datapath/flow.c b/datapath/flow.c > index c3e3fcb..e9a2a27 100644 > --- a/datapath/flow.c > +++ b/datapath/flow.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (c) 2007-2013 Nicira, Inc. > + * Copyright (c) 2007-2014 Nicira, Inc. > * >

[ovs-dev] [PATCH 2/2] cfm: Add test for the update of CFM status to OVSDB.

2014-03-19 Thread Alex Wang
Since daemons can use the cfm status from OVSDB, it is useful to add a test to guarantee that the update is in time. Signed-off-by: Alex Wang --- tests/cfm.at | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/cfm.at b/tests/cfm.at index 7ab4354..

[ovs-dev] [PATCH 1/2] cfm: Define old_cfm_fault as 'enum cfm_fault_reason'.

2014-03-19 Thread Alex Wang
CFM fault variable type has been changed to 'enum cfm_fault_reason' for long time. However, inside cfm_run(), the old_cfm_fault is still defined as boolean. This commit fixes the issue. Found by inspection. Signed-off-by: Alex Wang --- lib/cfm.c |4 ++-- 1 file changed, 2 insertions(+), 2

Re: [ovs-dev] [PATCH] CodingStyle: Allow designated initializers.

2014-03-19 Thread Ben Pfaff
Thanks, applied. On Wed, Mar 19, 2014 at 04:18:21PM -0700, Alex Wang wrote: > Looks good to me, > > Acked-by: Alex Wang > > > On Wed, Mar 19, 2014 at 4:03 PM, Ben Pfaff wrote: > > > MSVC 2013 finally implements them, 14 years after they became part of C, > > so we can use them in generic cod

Re: [ovs-dev] [PATCH V5 5/5] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 01:35:07PM -0700, Alex Wang wrote: > With the foundation laid in previous commits, this commit > removes the 'dispatcher' thread by allowing 'handler' > threads to read upcalls directly from dpif. > > This commit significantly simplifies the flow miss handling > code and br

[ovs-dev] [PATCH v9 repost] ofproto: Honour Table Mod settings for table-miss handling

2014-03-19 Thread Simon Horman
This reworks lookup of rules for both table 0 and table action translation. The result is that Table Mod settings, which can alter the miss-behaviour of tables, including table 0, on a per-table basis may be honoured. Previous patches proposed by myself which build on earlier merged patches by And

Re: [ovs-dev] [PATCH V5 4/5] dpif-linux: Implement the API functions to allow multiple handler threads read upcall.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 01:35:06PM -0700, Alex Wang wrote: > Signed-off-by: Alex Wang This is a lot of code, but it looks well crafted. I only have a few comments. dpif-linux.c The comment on dpif_linux_refresh_channels() mentions dpif->channels, which no longer exists. It looks

Re: [ovs-dev] [PATCH V5 2/5] dpif-netdev: Implement the API functions to allow multiple handler threads read upcall.

2014-03-19 Thread Alex Wang
Thx Ben, I'll hold off the push and discuss with Pravin tmr, On Wed, Mar 19, 2014 at 4:32 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 01:35:04PM -0700, Alex Wang wrote: > > This commit implements the API functions to allow multiple handler > > threads read upcall. > > > > Also, this commit

Re: [ovs-dev] [PATCH v2 2/4] dpif-netdev: Use packet key to parse TCP flags.

2014-03-19 Thread Jarno Rajahalme
On Mar 19, 2014, at 3:32 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 09:16:58AM -0700, Jarno Rajahalme wrote: >> The flow that created the netdev_flow might have wildcarded TCP flags, >> or it may not be a TCP flow at all. Fix this by using the freshly >> extracted flow key to parse TCP flag

Re: [ovs-dev] [PATCH V5 3/5] datapath: Allow each vport to have an array of 'port_id's.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 01:35:05PM -0700, Alex Wang wrote: > In order to allow handlers directly read upcalls from datapath, > we need to support per-handler netlink socket for each vport in > datapath. This commit makes this happen. Also, it is guaranteed > backward and forward compatibility wit

Re: [ovs-dev] [PATCH V5 3/5] datapath: Allow each vport to have an array of 'port_id's.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 04:33:17PM -0700, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 01:35:05PM -0700, Alex Wang wrote: > > In order to allow handlers directly read upcalls from datapath, > > we need to support per-handler netlink socket for each vport in > > datapath. This commit makes this happe

Re: [ovs-dev] [PATCH v2 3/4] lib: Use tcp_flags from flow.

2014-03-19 Thread Jarno Rajahalme
Pushed, thanks, Jarno On Mar 19, 2014, at 3:34 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 09:16:59AM -0700, Jarno Rajahalme wrote: >> TCP flags are already extracted from the flow, no need to parse them >> again. >> >> Signed-off-by: Jarno Rajahalme > > Acked-by: Ben Pfaff __

Re: [ovs-dev] [PATCH V5 2/5] dpif-netdev: Implement the API functions to allow multiple handler threads read upcall.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 01:35:04PM -0700, Alex Wang wrote: > This commit implements the API functions to allow multiple handler > threads read upcall. > > Also, this commit removes the handling priority of DPIF_UC_MISS > over DPIF_UC_ACTION. So, both misses will be put to the same > queue. The d

Re: [ovs-dev] [PATCH v2 4/4] lib/packets: Remove packet_get_tcp_flags().

2014-03-19 Thread Jarno Rajahalme
Pushed, thanks, Jarno On Mar 19, 2014, at 3:34 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 09:17:00AM -0700, Jarno Rajahalme wrote: >> This function has no more users, so remove it. >> >> Signed-off-by: Jarno Rajahalme > > Acked-by: Ben Pfaff __

Re: [ovs-dev] [PATCH] CodingStyle: Allow designated initializers.

2014-03-19 Thread Alex Wang
Looks good to me, Acked-by: Alex Wang On Wed, Mar 19, 2014 at 4:03 PM, Ben Pfaff wrote: > MSVC 2013 finally implements them, 14 years after they became part of C, > so we can use them in generic code now. > > Signed-off-by: Ben Pfaff > --- > CodingStyle |9 - >

Re: [ovs-dev] [PATCH] Set release date for 2.1.0.

2014-03-19 Thread Justin Pettit
On Wed, Mar 19, 2014 at 4:13 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 04:10:57PM -0700, Justin Pettit wrote: > > Signed-off-by: Justin Pettit > > Acked-by: Ben Pfaff > Thanks. Pushed. --Justin ___ dev mailing list dev@openvswitch.org http://o

Re: [ovs-dev] [PATCH] Set release date for 2.1.0.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 04:10:57PM -0700, Justin Pettit wrote: > Signed-off-by: Justin Pettit Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH v2 1/4] lib/flow: Retain ODPP_NONE on flow_extract().

2014-03-19 Thread Jarno Rajahalme
Pushed, thanks, Jarno On Mar 19, 2014, at 3:30 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 09:16:57AM -0700, Jarno Rajahalme wrote: >> We used to map ODPP_NONE to port number 0, which is wrong, as >> ODPP_NONE is a valid value of the flow's in_port. >> >> Signed-off-by: Jarno Rajahalme >

Re: [ovs-dev] [PATCH V5 1/5] dpif: Change dpif API to allow multiple handler threads read upcall.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 01:35:03PM -0700, Alex Wang wrote: > This commit changes the API in 'dpif-provider.h' to allow multiple > handler threads call dpif_recv() simultaneously. > > Signed-off-by: Alex Wang Acked-by: Ben Pfaff ___ dev mailing list de

[ovs-dev] [PATCH] Set release date for 2.1.0.

2014-03-19 Thread Justin Pettit
Signed-off-by: Justin Pettit --- NEWS |2 +- debian/changelog |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9cff5dd..839b4dd 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -v2.1.0 - xx xxx +v2.1.0 - 19 Mar 2014

[ovs-dev] [PATCH] CodingStyle: Allow designated initializers.

2014-03-19 Thread Ben Pfaff
MSVC 2013 finally implements them, 14 years after they became part of C, so we can use them in generic code now. Signed-off-by: Ben Pfaff --- CodingStyle |9 - lib/odp-util.c | 11 +-- ofproto/ofproto-dpif-xlate.c | 10 +- 3 files ch

Re: [ovs-dev] [bond megaflow v2 2/5] lib/flow: add dp_hash and recirc_id to struct flow

2014-03-19 Thread Andy Zhou
On Tue, Mar 18, 2014 at 11:52 PM, Simon Horman wrote: > On Tue, Mar 11, 2014 at 04:56:18PM -0700, Andy Zhou wrote: >> Signed-off-by: Andy Zhou >> >> --- >> v1->v2: No major changes > > [snip] > >> diff --git a/lib/flow.h b/lib/flow.h >> index 8165bcf..8e1349d 100644 >> --- a/lib/flow.h >> +++ b/

Re: [ovs-dev] [PATCH 4/9] dpif-netdev: Add poll-mode-device thread.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 03:36:12PM -0700, Pravin Shelar wrote: > On Wed, Mar 19, 2014 at 3:29 PM, Ben Pfaff wrote: > > On Wed, Mar 19, 2014 at 03:16:37PM -0700, Pravin Shelar wrote: > >> On Wed, Mar 19, 2014 at 11:08 AM, Ben Pfaff wrote: > >> > On Tue, Mar 18, 2014 at 01:53:27PM -0700, Pravin wro

Re: [ovs-dev] [PATCH 4/9] dpif-netdev: Add poll-mode-device thread.

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 3:29 PM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 03:16:37PM -0700, Pravin Shelar wrote: >> On Wed, Mar 19, 2014 at 11:08 AM, Ben Pfaff wrote: >> > On Tue, Mar 18, 2014 at 01:53:27PM -0700, Pravin wrote: >> > Polling the atomic variable only every 67,108,864 times throug

Re: [ovs-dev] [PATCH v2 4/4] lib/packets: Remove packet_get_tcp_flags().

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 09:17:00AM -0700, Jarno Rajahalme wrote: > This function has no more users, so remove it. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/d

Re: [ovs-dev] [PATCH v2 3/4] lib: Use tcp_flags from flow.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 09:16:59AM -0700, Jarno Rajahalme wrote: > TCP flags are already extracted from the flow, no need to parse them > again. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing list dev@openvswitch.org http://ope

Re: [ovs-dev] [PATCH v2 2/4] dpif-netdev: Use packet key to parse TCP flags.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 09:16:58AM -0700, Jarno Rajahalme wrote: > The flow that created the netdev_flow might have wildcarded TCP flags, > or it may not be a TCP flow at all. Fix this by using the freshly > extracted flow key to parse TCP flags. > > Signed-off-by: Jarno Rajahalme Does this nee

Re: [ovs-dev] [PATCH v2 1/4] lib/flow: Retain ODPP_NONE on flow_extract().

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 09:16:57AM -0700, Jarno Rajahalme wrote: > We used to map ODPP_NONE to port number 0, which is wrong, as > ODPP_NONE is a valid value of the flow's in_port. > > Signed-off-by: Jarno Rajahalme Acked-by: Ben Pfaff ___ dev mailing

Re: [ovs-dev] [PATCH 4/9] dpif-netdev: Add poll-mode-device thread.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 03:16:37PM -0700, Pravin Shelar wrote: > On Wed, Mar 19, 2014 at 11:08 AM, Ben Pfaff wrote: > > On Tue, Mar 18, 2014 at 01:53:27PM -0700, Pravin wrote: > > Polling the atomic variable only every 67,108,864 times through the > > loop seems pretty conservative. (Does that ev

Re: [ovs-dev] [PATCH 6/9] netdev: Add support multiqueue recv.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 03:20:53PM -0700, Pravin Shelar wrote: > On Wed, Mar 19, 2014 at 11:26 AM, Ben Pfaff wrote: > > Maybe netdev_rxq_open() should reject calls for which id >= > > netdev->nr_rx, so that implementations don't have to (I think that all > > the implementations are technically bro

Re: [ovs-dev] [PATCH 5/9] netdev: Rename netdev_rx to netdev_rxq

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 11:13 AM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 01:53:34PM -0700, Pravin wrote: >> Preparation for multi queue netdev IO. >> >> Signed-off-by: Pravin B Shelar > > In lib/netdev-provider.h, can you realign the table here? > *"alloc" "construct"

Re: [ovs-dev] [PATCH 6/9] netdev: Add support multiqueue recv.

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 11:26 AM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 01:53:52PM -0700, Pravin wrote: >> new netdev type like DPDK can support multi-queue IO. Following >> patch Adds support for same. >> >> Signed-off-by: Pravin B Shelar > > Needs comment and documentation updates. > > In

Re: [ovs-dev] [PATCH V3] cfm: Notify connectivity_seq on remote maintenance points change.

2014-03-19 Thread Alex Wang
Thanks, applied to master and branch-2.1 ~ On Wed, Mar 19, 2014 at 3:01 PM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 02:14:43PM -0700, Alex Wang wrote: > > Commit f23d157c ("ofproto-dpif: Don't poll ports when nothing changes") > > did not ensure the update of the row of remote maintenance po

Re: [ovs-dev] [PATCH 4/9] dpif-netdev: Add poll-mode-device thread.

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 11:08 AM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 01:53:27PM -0700, Pravin wrote: >> This patch adds PMD type netdev for netdevice with poll-mode >> drivers. Since there is no way to get signal on a packet recv >> from these devices we need to poll them in busy loop. S

Re: [ovs-dev] [PATCH 8/9] dpif-netdev: Add DPDK netdev.

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 12:27 PM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 01:54:04PM -0700, Pravin wrote: >> Following patch adds DPDK netdev-class to userspace datapath. Now >> OVS can use DPDK port for IO by just configuring DPDK port and then >> adding dpdk type port to userspace datapath. >

Re: [ovs-dev] [PATCH 9/9] netdev-dpdk: Use multiple core for dpdk IO.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 03:01:09PM -0700, Pravin Shelar wrote: > On Wed, Mar 19, 2014 at 12:32 PM, Ben Pfaff wrote: > > On Tue, Mar 18, 2014 at 01:54:09PM -0700, Pravin wrote: > >> DPDK need to set _lcore_id for using multiple core. > >> > >> Signed-off-by: Pravin B Shelar > > > > In xpthread_set

Re: [ovs-dev] [PATCH V3] cfm: Notify connectivity_seq on remote maintenance points change.

2014-03-19 Thread Ben Pfaff
On Tue, Mar 18, 2014 at 02:14:43PM -0700, Alex Wang wrote: > Commit f23d157c ("ofproto-dpif: Don't poll ports when nothing changes") > did not ensure the update of the row of remote maintenance points in ovsdb > when it changes. This commit makes the update happen by notifying the > global connect

Re: [ovs-dev] [PATCH 9/9] netdev-dpdk: Use multiple core for dpdk IO.

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 12:32 PM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 01:54:09PM -0700, Pravin wrote: >> DPDK need to set _lcore_id for using multiple core. >> >> Signed-off-by: Pravin B Shelar > > In xpthread_setaffinity_np_cpu(), I think that the whole function is > Linux-specific, so th

[ovs-dev] [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss --- v2: orphan the frags right before touching the frags diff --git a/include/linux/skbuff.h b/include/

Re: [ovs-dev] [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
On 19/03/14 20:47, Thomas Graf wrote: On 03/19/2014 09:38 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss --- +if (unli

Re: [ovs-dev] [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Thomas Graf
On 03/19/2014 09:38 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss --- + if (unlikely(skb_orphan_frags(to, GFP_ATOMIC

Re: [ovs-dev] [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
On 19/03/14 20:24, David Miller wrote: From: Zoltan Kiss Date: Tue, 18 Mar 2014 21:17:35 + skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss ---

[ovs-dev] [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03db95a..35c4e85 100644 --- a/inc

[ovs-dev] [PATCH V5 4/5] dpif-linux: Implement the API functions to allow multiple handler threads read upcall.

2014-03-19 Thread Alex Wang
Signed-off-by: Alex Wang --- V4 -> V5: - rebase. V3 -> V4: - add check of handler_id range. V2 -> V3: - use OVS_DP_ATTR_USER_FEATURES to inform datapath about the type of OVS_VPORT_ATTR_UPCALL_PID attribute. - close epoll fd when destroying all channels. PATCH -> V2: - rebase. major changes

[ovs-dev] [PATCH V5 2/5] dpif-netdev: Implement the API functions to allow multiple handler threads read upcall.

2014-03-19 Thread Alex Wang
This commit implements the API functions to allow multiple handler threads read upcall. Also, this commit removes the handling priority of DPIF_UC_MISS over DPIF_UC_ACTION. So, both misses will be put to the same queue. The decision is based on the fact that a lot has changed since the age when

[ovs-dev] [PATCH V5 0/5] Remove dispatcher thread.

2014-03-19 Thread Alex Wang
--- V4 -> V5: - Rebase to master. - Minor change based on Thomas Graf's review. - Add Acked-by: Thomas Graf in PATCH 3/5. V3 -> V4: - Implement the recv_set() in dpif-netdev. - Add check to the range of handler_id in recv() and recv_wait(). - Use reciprocal_div() to reduce the cost of modular ope

[ovs-dev] [PATCH V5 3/5] datapath: Allow each vport to have an array of 'port_id's.

2014-03-19 Thread Alex Wang
In order to allow handlers directly read upcalls from datapath, we need to support per-handler netlink socket for each vport in datapath. This commit makes this happen. Also, it is guaranteed backward and forward compatibility with previous branch. Signed-off-by: Alex Wang Acked-by: Thomas Graf

[ovs-dev] [PATCH V5 5/5] ofproto-dpif-upcall: Remove the dispatcher thread.

2014-03-19 Thread Alex Wang
With the foundation laid in previous commits, this commit removes the 'dispatcher' thread by allowing 'handler' threads to read upcalls directly from dpif. This commit significantly simplifies the flow miss handling code and brings slight improvement to flow setup rate. Note: - the flow setup rat

[ovs-dev] [PATCH V5 1/5] dpif: Change dpif API to allow multiple handler threads read upcall.

2014-03-19 Thread Alex Wang
This commit changes the API in 'dpif-provider.h' to allow multiple handler threads call dpif_recv() simultaneously. Signed-off-by: Alex Wang --- V4 -> v5: - rebase. V3 -> V4: - refines the port_get_pid() comments as suggested. V2 -> V3: - detach the channel refreshing from recv_set(). Note:

Re: [ovs-dev] [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread David Miller
From: Zoltan Kiss Date: Tue, 18 Mar 2014 21:17:35 + > skb_zerocopy can copy elements of the frags array between skbs, but it doesn't > orphan them. Also, it doesn't handle errors, so this patch takes care of that > as well. > > Signed-off-by: Zoltan Kiss > --- > net/openvswitch/datapath.c

Re: [ovs-dev] [PATCH V4 3/5] datapath: Allow each vport to have an array of 'port_id's.

2014-03-19 Thread Alex Wang
Hey Thomas, Thx a lot for the review, again, comments in line, On Wed, Mar 19, 2014 at 4:37 AM, Thomas Graf wrote: > On 03/18/2014 01:15 AM, Alex Wang wrote: > >> In order to allow handlers directly read upcalls from datapath, >> we need to support per-handler netlink socket for each vport in >

Re: [ovs-dev] [PATCH 9/9] netdev-dpdk: Use multiple core for dpdk IO.

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 12:32:22PM -0700, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 01:54:09PM -0700, Pravin wrote: > > DPDK need to set _lcore_id for using multiple core. > > > > Signed-off-by: Pravin B Shelar > > In xpthread_setaffinity_np_cpu(), I think that the whole function is > Linux-spe

Re: [ovs-dev] [PATCH 9/9] netdev-dpdk: Use multiple core for dpdk IO.

2014-03-19 Thread Ben Pfaff
On Tue, Mar 18, 2014 at 01:54:09PM -0700, Pravin wrote: > DPDK need to set _lcore_id for using multiple core. > > Signed-off-by: Pravin B Shelar In xpthread_setaffinity_np_cpu(), I think that the whole function is Linux-specific, so that the implementation should be enclosed in #ifdef __linux__.

Re: [ovs-dev] [PATCH 8/9] dpif-netdev: Add DPDK netdev.

2014-03-19 Thread Ben Pfaff
On Tue, Mar 18, 2014 at 01:54:04PM -0700, Pravin wrote: > Following patch adds DPDK netdev-class to userspace datapath. Now > OVS can use DPDK port for IO by just configuring DPDK port and then > adding dpdk type port to userspace datapath. > > Refer to INSTALL.DPDK doc for further info. > > This

[ovs-dev] [PATCH v2 4/4] lib/packets: Remove packet_get_tcp_flags().

2014-03-19 Thread Jarno Rajahalme
This function has no more users, so remove it. Signed-off-by: Jarno Rajahalme --- v2: rebase lib/packets.c | 18 +- lib/packets.h |1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/packets.c b/lib/packets.c index 0c023fc..65ba3f6 100644 --- a/lib/pack

Re: [ovs-dev] [bond megaflow v2 1/5] ofproto-dpif: Added Per backer recirculation ID management

2014-03-19 Thread Andy Zhou
On Mon, Mar 17, 2014 at 3:50 PM, Ben Pfaff wrote: > On Tue, Mar 11, 2014 at 04:56:17PM -0700, Andy Zhou wrote: >> Recirculation ID needs to be unique per datapath. Its usage will be >> tracked by the backer that corresponds to the datapath. >> >> In theory, Recirculation ID can be any uint32_t val

Re: [ovs-dev] [PATCH 6/9] netdev: Add support multiqueue recv.

2014-03-19 Thread Ben Pfaff
On Tue, Mar 18, 2014 at 01:53:52PM -0700, Pravin wrote: > new netdev type like DPDK can support multi-queue IO. Following > patch Adds support for same. > > Signed-off-by: Pravin B Shelar Needs comment and documentation updates. In particular, from reading the code I infer (but I'm not confiden

Re: [ovs-dev] [PATCH 5/9] netdev: Rename netdev_rx to netdev_rxq

2014-03-19 Thread Ben Pfaff
On Tue, Mar 18, 2014 at 01:53:34PM -0700, Pravin wrote: > Preparation for multi queue netdev IO. > > Signed-off-by: Pravin B Shelar In lib/netdev-provider.h, can you realign the table here? *"alloc" "construct" "destruct" "dealloc" * ---

Re: [ovs-dev] [PATCH 4/9] dpif-netdev: Add poll-mode-device thread.

2014-03-19 Thread Ben Pfaff
On Tue, Mar 18, 2014 at 01:53:27PM -0700, Pravin wrote: > This patch adds PMD type netdev for netdevice with poll-mode > drivers. Since there is no way to get signal on a packet recv > from these devices we need to poll them in busy loop. So minimize > system call overhead this patch uses dpif-th

Re: [ovs-dev] ovs crash when compiled via clang

2014-03-19 Thread Alex Wang
Thx, applied, On Wed, Mar 19, 2014 at 10:20 AM, Ben Pfaff wrote: > On Wed, Mar 19, 2014 at 09:29:43AM -0700, Alex Wang wrote: > > diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c > > index ac4513b..0f427c8 100644 > > --- a/lib/ovs-rcu.c > > +++ b/lib/ovs-rcu.c > > @@ -127,6 +127,8 @@ ovsrcu_quiesce_s

Re: [ovs-dev] ovs crash when compiled via clang

2014-03-19 Thread Ben Pfaff
On Wed, Mar 19, 2014 at 09:29:43AM -0700, Alex Wang wrote: > diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c > index ac4513b..0f427c8 100644 > --- a/lib/ovs-rcu.c > +++ b/lib/ovs-rcu.c > @@ -127,6 +127,8 @@ ovsrcu_quiesce_start(void) > void > ovsrcu_quiesce(void) > { > +ovsrcu_init(); > + >

Re: [ovs-dev] [PATCH 1/9] netdev: Extend rx_recv to pass multiple packets.

2014-03-19 Thread Pravin Shelar
On Wed, Mar 19, 2014 at 8:44 AM, Jarno Rajahalme wrote: > > On Mar 18, 2014, at 8:19 PM, Pravin Shelar wrote: > > On Tue, Mar 18, 2014 at 3:56 PM, Jarno Rajahalme > wrote: > > > On Mar 18, 2014, at 1:53 PM, Pravin wrote: > > DPDK can receive multiple packets but current netdev API does > not al

[ovs-dev] ovs crash when compiled via clang

2014-03-19 Thread Alex Wang
*After compiled ovs with clang, I experience the crash:* [430100.705907] openvswitch: Open vSwitch switching datapath 2.1.90, built Mar 19 2014 09:22:17 [430101.140122] ovsdb-server[27292]: segfault at 0 ip 0045b3a3 sp 7fffb8a3e100 error 4 in ovsdb-server[40+c7000] [430101.142000]

[ovs-dev] [PATCH v2 2/4] dpif-netdev: Use packet key to parse TCP flags.

2014-03-19 Thread Jarno Rajahalme
The flow that created the netdev_flow might have wildcarded TCP flags, or it may not be a TCP flow at all. Fix this by using the freshly extracted flow key to parse TCP flags. Signed-off-by: Jarno Rajahalme --- v2: rebase lib/dpif-netdev.c |7 --- 1 file changed, 4 insertions(+), 3 del

[ovs-dev] [PATCH v2 1/4] lib/flow: Retain ODPP_NONE on flow_extract().

2014-03-19 Thread Jarno Rajahalme
We used to map ODPP_NONE to port number 0, which is wrong, as ODPP_NONE is a valid value of the flow's in_port. Signed-off-by: Jarno Rajahalme --- v2: rebase lib/flow.c|4 +--- lib/ofp-print.c |2 +- lib/packets.c | 20

[ovs-dev] [PATCH v2 3/4] lib: Use tcp_flags from flow.

2014-03-19 Thread Jarno Rajahalme
TCP flags are already extracted from the flow, no need to parse them again. Signed-off-by: Jarno Rajahalme --- v2: rebase lib/dpif-netdev.c |2 +- lib/dpif.c|2 +- ofproto/ofproto-dpif-upcall.c |2 +- ofproto/ofproto-dpif.c|6 ++ 4 fil

Re: [ovs-dev] [PATCH 1/5] lib/hmap: Remove the memory fence from hmap_is_empty().

2014-03-19 Thread Jarno Rajahalme
On Mar 19, 2014, at 8:45 AM, Alex Wang wrote: > I think we should also remove the 'Note' in the comment. > It still seems valid to me: “Note: While hmap in general is not thread-safe without additional locking, hmap_is_empty() is.” Jarno > > On Tue, Mar 18, 2014 at 9:00 PM, Ben Pfaff w

Re: [ovs-dev] [urcu v2 00/15] implement userspace RCU and add a few simple users

2014-03-19 Thread Ben Pfaff
On Tue, Mar 11, 2014 at 01:56:02PM -0700, Ben Pfaff wrote: > v1->v2: Redid all the ovs-atomic changes to fix a bug in the GCC 4.x (x < > 7) support. This was not a simple fix; all the ovs-atomic patches are > essentially new. Also, changed the ovs-rcu library to use "consume" rather > than "acqui

Re: [ovs-dev] [PATCH 1/5] lib/hmap: Remove the memory fence from hmap_is_empty().

2014-03-19 Thread Jarno Rajahalme
Thanks for the review. Pushed to master, Jarno On Mar 18, 2014, at 9:00 PM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 04:42:55PM -0700, Jarno Rajahalme wrote: >> The fence made classifier_lookup() slower. Access to a size_t 'n' is >> safe without synchonizing, and if racing with writers ma

Re: [ovs-dev] [PATCH 1/5] lib/hmap: Remove the memory fence from hmap_is_empty().

2014-03-19 Thread Alex Wang
I think we should also remove the 'Note' in the comment. On Tue, Mar 18, 2014 at 9:00 PM, Ben Pfaff wrote: > On Tue, Mar 18, 2014 at 04:42:55PM -0700, Jarno Rajahalme wrote: > > The fence made classifier_lookup() slower. Access to a size_t 'n' is > > safe without synchonizing, and if racing wi

Re: [ovs-dev] [PATCH 2/9] netdev: Send ofpuf directly to netdev.

2014-03-19 Thread Jarno Rajahalme
On Mar 18, 2014, at 8:38 PM, Pravin Shelar wrote: > On Tue, Mar 18, 2014 at 4:04 PM, Jarno Rajahalme > wrote: >> >> On Mar 18, 2014, at 1:53 PM, Pravin wrote: >> >>> DPDK netdev need to access ofpbuf while sending buffer. Following >>> patch changes netdev_send accordingly. >> >> Would it

Re: [ovs-dev] [PATCH 1/9] netdev: Extend rx_recv to pass multiple packets.

2014-03-19 Thread Jarno Rajahalme
On Mar 18, 2014, at 8:19 PM, Pravin Shelar wrote: > On Tue, Mar 18, 2014 at 3:56 PM, Jarno Rajahalme > wrote: >> >> On Mar 18, 2014, at 1:53 PM, Pravin wrote: >> >>> DPDK can receive multiple packets but current netdev API does >>> not allow that. Following patch allows dpif-netdev receive

Re: [ovs-dev] [PATCH V4 3/5] datapath: Allow each vport to have an array of 'port_id's.

2014-03-19 Thread Thomas Graf
On 03/18/2014 01:15 AM, Alex Wang wrote: In order to allow handlers directly read upcalls from datapath, we need to support per-handler netlink socket for each vport in datapath. This commit makes this happen. Also, it is guaranteed backward and forward compatibility with previous branch. Sign

Re: [ovs-dev] [bond megaflow v2 5/5] ofproto/bond: Implement bond megaflow using recirculation

2014-03-19 Thread Simon Horman
On Tue, Mar 11, 2014 at 04:56:21PM -0700, Andy Zhou wrote: > Infrastructure to enable megaflow support for bond ports using > recirculation. This patch adds the following features: > * Generate RECIRC action when bond can benefit from recirculation. > * Populate post recirculation rules in table 25