Re: [ovs-dev] [PATCH net-next 2/3] netlink: Convert netlink_lookup() to use RCU protected hash table

2014-08-04 Thread David Miller
From: Eric Dumazet Date: Tue, 05 Aug 2014 07:50:07 +0200 > [PATCH net-next] netlink: fix lockdep splats > > With netlink_lookup() conversion to RCU, we need to use appropriate > rcu dereference in netlink_seq_socket_idx() & netlink_seq_next() > > Reported-by: Sasha Levin > Signed-off-by: Eric

Re: [ovs-dev] [PATCH net-next 2/3] netlink: Convert netlink_lookup() to use RCU protected hash table

2014-08-04 Thread Eric Dumazet
On Mon, 2014-08-04 at 19:58 -0700, David Miller wrote: > From: Sasha Levin > Date: Mon, 04 Aug 2014 22:10:19 -0400 > > > On 08/02/2014 05:47 AM, Thomas Graf wrote: > >> static void *netlink_seq_start(struct seq_file *seq, loff_t *pos) > >> - __acquires(nl_table_lock) > >> { > >> - read_lock(&

Re: [ovs-dev] [PATCH] ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

2014-08-04 Thread Ben Pfaff
On Mon, Aug 04, 2014 at 05:40:24PM -0700, Justin Pettit wrote: > On August 4, 2014 at 12:23:16 PM, Ben Pfaff (b...@nicira.com) wrote: > > > > I applied your ack and pushed this to master. > > Ben, we've seen this issue in pre-release versions of 2.3. ??Would you > mind backporting it to branch-2

Re: [ovs-dev] Queuing packets to userspace and NBL info problem

2014-08-04 Thread Ben Pfaff
Yes. In addition, some packets may get sent to an OpenFlow controller. On Sun, Aug 03, 2014 at 06:52:55PM +, Eitan Eliahu wrote: > > Hi Samuel, my initial implementation was holding a reference to NBLs > which were indicated to user mode. However, there is an issue with > that as in general

Re: [ovs-dev] Queuing packets to userspace and NBL info problem

2014-08-04 Thread Ben Pfaff
On Sun, Aug 03, 2014 at 06:39:04PM +, Samuel Ghinet wrote: > Well, things such as IPSec offload, and more obscure stuff such as: > "any media-specific out-of-band data that accompanies the NET_BUFFER > structures that are associated with the NET_BUFFER_LIST structure." > > The complete list,

Re: [ovs-dev] [PATCH net-next 2/3] netlink: Convert netlink_lookup() to use RCU protected hash table

2014-08-04 Thread David Miller
From: Sasha Levin Date: Mon, 04 Aug 2014 22:10:19 -0400 > On 08/02/2014 05:47 AM, Thomas Graf wrote: >> static void *netlink_seq_start(struct seq_file *seq, loff_t *pos) >> -__acquires(nl_table_lock) >> { >> -read_lock(&nl_table_lock); >> +rcu_read_lock(); >> return *pos ? netl

Re: [ovs-dev] Items to discuss for 8/4 IRC meeting

2014-08-04 Thread Saurabh Shah
4. Discuss implementation of netlink-windows.c. Thanks! Saurabh From: Nithin Raju mailto:nit...@vmware.com>> Date: Monday, August 4, 2014 at 7:11 PM To: "dev@openvswitch.org" mailto:dev@openvswitch.org>> Subject: [ovs-dev] Items to discuss for 8/4 IRC meeting hi Ales

[ovs-dev] Items to discuss for 8/4 IRC meeting

2014-08-04 Thread Nithin Raju
hi Alessandro, We have the following items to discuss for tomorrow's meeting: 1. Netlink implementation. (A note has been sent out about this) 2. Discuss issues that Cloudbase found during their testing. 3. Followup from previous week. Like last week, pls. feel free to add more items. thanks, Ni

Re: [ovs-dev] [PATCH net-next 2/3] netlink: Convert netlink_lookup() to use RCU protected hash table

2014-08-04 Thread Sasha Levin
=== [ 531.482951] [ INFO: suspicious RCU usage. ] [ 531.485512] 3.16.0-next-20140804-sasha-00029-gcb12d07 #995 Not tainted [ 531.489198] --- [ 531.491518] net/netlink/af_netlink.c:2953 suspicious rcu_dereference_protected() usage! [ 531.495781] [ 531.495

[ovs-dev] Implementation for netlink based interface on Windows

2014-08-04 Thread Nithin Raju
hi, This is a followup to the discussion on 7/29 between the VMware and the Cloudbase teams working on OVS for Hyper-V, regarding Netlink based interface implementation between kernel and userspace. It was agreed that VMware folks would look at the kernel code posted on 7/29 by Cloudbase team, and

Re: [ovs-dev] [PATCH] ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

2014-08-04 Thread Justin Pettit
On August 4, 2014 at 12:23:16 PM, Ben Pfaff (b...@nicira.com) wrote: > > I applied your ack and pushed this to master. Ben, we've seen this issue in pre-release versions of 2.3.  Would you mind backporting it to branch-2.3, also? Thanks, --Justin ___

[ovs-dev] [PATCH] datapath: Correct comment about 'tun_info' member in ovs_skb_cb.

2014-08-04 Thread Justin Pettit
Signed-off-by: Justin Pettit --- datapath/datapath.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/datapath/datapath.h b/datapath/datapath.h index 92ef19f..fb37fa1 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -98,7 +98,8 @@ struct datapath { * struc

Re: [ovs-dev] [PATCH branch-2.3] dpif-netdev: Initialize upcall->packet when queuing to userspace.

2014-08-04 Thread Pravin Shelar
On Mon, Aug 4, 2014 at 12:16 PM, Ben Pfaff wrote: > Only the data and size members were being initialized, but all of them > should be. > > This is inspired by commit b6f4590fa036 (dpif-netdev: Initialize > upcall->packet when queuing to userspace.) from master. The background is > not exactly th

Re: [ovs-dev] [PATCH] socket-util-unix: Fix umask race in bind_unix_socket().

2014-08-04 Thread Ben Pfaff
On Thu, Jul 24, 2014 at 12:53:30PM -0700, Ben Pfaff wrote: > The umask is a process-wide value, so bind_unix_socket() races with file > creation in other Open vSwitch threads. This fixes the race. > > The workaround for non-Linux systems is not ideal, but I do not know any > other general solutio

Re: [ovs-dev] [PATCH v3 2/2] tests: Turn off appctl poll_loop logging for long output.

2014-08-04 Thread Ben Pfaff
On Mon, Aug 04, 2014 at 01:19:48PM -0700, Ansis Atteka wrote: > On Mon, Aug 4, 2014 at 12:57 PM, Ben Pfaff wrote: > > One of the VMware internal autobuilder builds failed due to extraneous > > logging in these tests of the form: > > > >2014-07-28T21:11:07Z|1|poll_loop|INFO|wakeup due to [P

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

2014-08-04 Thread Ben Pfaff
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 userspace datapaths (dpif-netdev), because > the > ovs-dpctl command runs in a separate process and cannot see the userspace > data

Re: [ovs-dev] [PATCH v3 2/2] tests: Turn off appctl poll_loop logging for long output.

2014-08-04 Thread Ansis Atteka
On Mon, Aug 4, 2014 at 12:57 PM, Ben Pfaff wrote: > One of the VMware internal autobuilder builds failed due to extraneous > logging in these tests of the form: > >2014-07-28T21:11:07Z|1|poll_loop|INFO|wakeup due to [POLLIN] on fd 3 >(...) at lib/stream-fd-unix.c:124 (93% CPU usage) >

Re: [ovs-dev] [PATCH v3 1/2] ovs-appctl: Add logging options.

2014-08-04 Thread Ansis Atteka
On Mon, Aug 4, 2014 at 12:57 PM, Ben Pfaff wrote: > Normally I would also add documentation for the logging options to the > ovs-appctl manpage, but I am concerned that in this case it would actually > make the manpage confusing, because one of the main purposes of ovs-appctl > is to modify the lo

Re: [ovs-dev] [PATCH] learning-switch: Make test-controller work with OpenFlow 1.3+.

2014-08-04 Thread Ben Pfaff
On Wed, Jul 16, 2014 at 03:00:15PM -0700, Ben Pfaff wrote: > The controller setup in my personal test environment has been broken for a > while. I figured that it wasn't anything important, though, because no one > else had reported similar problems. Anyway, it turns out that enabling > OpenFlow

Re: [ovs-dev] [PATCH] dpif-provider: Get rid of redundant operations.

2014-08-04 Thread Ben Pfaff
On Tue, Jul 15, 2014 at 04:09:45PM -0700, Ben Pfaff wrote: > The dpif provider 'operate' call duplicates all of the features available > from the 'flow_put', 'flow_del', and 'execute' calls, yielding redundant > code in providers that support both mechanisms. This change drops the > latter calls i

[ovs-dev] [PATCH v3 1/2] ovs-appctl: Add logging options.

2014-08-04 Thread Ben Pfaff
Normally I would also add documentation for the logging options to the ovs-appctl manpage, but I am concerned that in this case it would actually make the manpage confusing, because one of the main purposes of ovs-appctl is to modify the log levels of *other* programs, and these options only modify

[ovs-dev] [PATCH v3 2/2] tests: Turn off appctl poll_loop logging for long output.

2014-08-04 Thread Ben Pfaff
One of the VMware internal autobuilder builds failed due to extraneous logging in these tests of the form: 2014-07-28T21:11:07Z|1|poll_loop|INFO|wakeup due to [POLLIN] on fd 3 (...) at lib/stream-fd-unix.c:124 (93% CPU usage) I think this must be because these tests have tons of output

Re: [ovs-dev] [PATCH v2 1/2] ovs-appctl: Add logging options.

2014-08-04 Thread Ben Pfaff
On Fri, Aug 01, 2014 at 11:25:35AM -0700, Ansis Atteka wrote: > On Thu, Jul 31, 2014 at 3:11 PM, Ben Pfaff wrote: > > Normally I would also add documentation for the logging options to the > > ovs-appctl manpage, but I am concerned that in this case it would actually > > make the manpage confusing

[ovs-dev] [PATCH v3 0/2] Fix occasional testsuite failures under high load

2014-08-04 Thread Ben Pfaff
v1->v2: Patch 1, to add ovs-appctl support for logging options, is new. v2->v3: Fix patch 1 to retain property that options must be before nonoptions. Ben Pfaff (2): ovs-appctl: Add logging options. tests: Turn off appctl poll_loop logging for long output. tests/ofproto-dpif.at |8 +

Re: [ovs-dev] [PATCH] ofproto-dpif: fix an ovs crash when dpif_recv_set returns error

2014-08-04 Thread Andy Zhou
I made the change and pushed to master and branch-2.3. Thanks a lot for pointing this out! On Mon, Aug 4, 2014 at 10:54 AM, Ben Pfaff wrote: > On Mon, Aug 04, 2014 at 09:47:14AM -0700, Andy Zhou wrote: >> When dpif_recv_set returns an error, close_dpif_backer gets called, >> which in term calls

Re: [ovs-dev] Cloning packets for "action: set field"

2014-08-04 Thread Saurabh Shah
Hi Samuel, This is a bug. As you rightfully pointed, we shouldn't modify the original packet but instead copy out the relevant bits before modifying them. Copying the entire data buffer is simpler, but sub-optimal. We should only copy out the headers that are being modified. We already have the

Re: [ovs-dev] [PATCH] ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

2014-08-04 Thread Ben Pfaff
On Mon, Aug 04, 2014 at 11:32:17AM -0700, Jesse Gross wrote: > On Mon, Aug 4, 2014 at 10:50 AM, Ben Pfaff wrote: > > On Mon, Aug 04, 2014 at 10:15:17AM -0700, Jesse Gross wrote: > >> On Fri, Aug 1, 2014 at 5:22 PM, Ben Pfaff wrote: > >> > A dpif reports EEXIST if a flow put operation that should

Re: [ovs-dev] [PATCH] dpif-netdev: Initialize upcall->packet when queuing to userspace.

2014-08-04 Thread Ben Pfaff
On Fri, Aug 01, 2014 at 12:48:47PM -0700, Pravin Shelar wrote: > On Fri, Aug 1, 2014 at 10:17 AM, Ben Pfaff wrote: > > On Wed, Jul 23, 2014 at 09:48:10AM -0700, Pravin Shelar wrote: > >> On Tue, Jul 22, 2014 at 10:37 PM, Ben Pfaff wrote: > >> > Pravin, the code in dpif-netdev.c modified by this p

[ovs-dev] [PATCH branch-2.3] dpif-netdev: Initialize upcall->packet when queuing to userspace.

2014-08-04 Thread Ben Pfaff
Only the data and size members were being initialized, but all of them should be. This is inspired by commit b6f4590fa036 (dpif-netdev: Initialize upcall->packet when queuing to userspace.) from master. The background is not exactly the same as on master (the commit that it references is not on b

Re: [ovs-dev] [PATCH RFC v2] lacp: Prefer slaves with running partner when selecting lead

2014-08-04 Thread Andy Zhou
Zoltan, Sorry it took a while to get back to you. I am just coming up to speed on OVS LACP implementation, so my understanding may not be correct. Please feel free to point them out If I am wrong. According to wikipeida MC-LAG entry, there is no standard for it, they are mostly designed and imp

Re: [ovs-dev] [PATCH] ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

2014-08-04 Thread Jesse Gross
On Mon, Aug 4, 2014 at 10:50 AM, Ben Pfaff wrote: > On Mon, Aug 04, 2014 at 10:15:17AM -0700, Jesse Gross wrote: >> On Fri, Aug 1, 2014 at 5:22 PM, Ben Pfaff wrote: >> > A dpif reports EEXIST if a flow put operation that should create a new flow >> > instead attempts to modify an existing flow, o

Re: [ovs-dev] [PATCH v2 0/2] Make better from userspace

2014-08-04 Thread Ben Pfaff
On Mon, Aug 04, 2014 at 10:56:24AM -0700, Jesse Gross wrote: > On Fri, Aug 1, 2014 at 9:36 PM, Ben Pfaff wrote: > > The header is confusing from userspace, because it > > needs to be included on all our platforms yet it has to match upstream > > Linux with all of the baggage that carries. This s

Re: [ovs-dev] [PATCH v2 0/2] Make better from userspace

2014-08-04 Thread Jesse Gross
On Fri, Aug 1, 2014 at 9:36 PM, Ben Pfaff wrote: > The header is confusing from userspace, because it > needs to be included on all our platforms yet it has to match upstream > Linux with all of the baggage that carries. This series tries to improve > on the situation. I'm happy enough with thi

Re: [ovs-dev] [PATCH] ofproto-dpif: fix an ovs crash when dpif_recv_set returns error

2014-08-04 Thread Ben Pfaff
On Mon, Aug 04, 2014 at 09:47:14AM -0700, Andy Zhou wrote: > When dpif_recv_set returns an error, close_dpif_backer gets called, > which in term calls recirc_id_pool_destroy, which can lead to a crash > since recirc_id_pool_create() was not called before this patch. > > Reported-by: Mukesh Hira >

Re: [ovs-dev] [PATCH] ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

2014-08-04 Thread Ben Pfaff
On Mon, Aug 04, 2014 at 10:15:17AM -0700, Jesse Gross wrote: > On Fri, Aug 1, 2014 at 5:22 PM, Ben Pfaff wrote: > > A dpif reports EEXIST if a flow put operation that should create a new flow > > instead attempts to modify an existing flow, or ENOENT if a flow put would > > create a flow that over

Re: [ovs-dev] [PATCH] ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

2014-08-04 Thread Jesse Gross
On Fri, Aug 1, 2014 at 5:22 PM, Ben Pfaff wrote: > A dpif reports EEXIST if a flow put operation that should create a new flow > instead attempts to modify an existing flow, or ENOENT if a flow put would > create a flow that overlaps some existing flow. The latter does not always > indicate a bug

[ovs-dev] [PATCH] ofproto-dpif: fix an ovs crash when dpif_recv_set returns error

2014-08-04 Thread Andy Zhou
When dpif_recv_set returns an error, close_dpif_backer gets called, which in term calls recirc_id_pool_destroy, which can lead to a crash since recirc_id_pool_create() was not called before this patch. Reported-by: Mukesh Hira Signed-off-by: Andy Zhou --- ofproto/ofproto-dpif.c | 9 + 1

[ovs-dev] [PATCH 9/9] ofproto: Implement OpenFlow 1.3+ table features request.

2014-08-04 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- NEWS | 1 + OPENFLOW-1.1+ | 3 -- lib/ofp-util.c| 132 ++ lib/ofp-util.h| 7 ++- ofproto/ofproto.c | 36 ++- tests/ofproto.at | 105 +++

[ovs-dev] [PATCH 8/9] ofp-util: Fix table features decoding of match and mask.

2014-08-04 Thread Ben Pfaff
The call to parse_oxms() inside ofputil_decode_table_features() sets only one bit in either 'match' or 'mask' for a given field that is matchable: in 'mask' if the field is arbitrarily maskable or in 'match' otherwise. The code at the end of ofputil_decode_table_features() mishandled this, assuming

[ovs-dev] [PATCH 7/9] ofp-util: Fix table features decoding of action and instruction fields.

2014-08-04 Thread Ben Pfaff
Parsing of actions was wrong because OF1.3 says that non-experimenter actions are 4 bytes and don't include padding. This fixes the problem. Parsing of instructions seems wrong too because OF1.3 says that non-experimenter instructions are 4 bytes (though it is not explicit about padding as it is

[ovs-dev] [PATCH 3/9] ofp-actions: Add instructions bitmaps and fix related bug.

2014-08-04 Thread Ben Pfaff
This will allow, later, to centralize all of the knowledge of instruction encoding inside ofp-actions. OFPIT11_ALL and OFPIT13_ALL are no longer used, so this commit removes them. Their definitions were wrong (they did not shift each bit into position correctly), so this commit is also a small bu

[ovs-dev] [PATCH 5/9] ofp-util: Abstract table miss configuration and fix related bugs.

2014-08-04 Thread Ben Pfaff
The ofproto implementation has had an abstraction layer on top of OFPTC11_TABLE_MISS for a while. This commit pushes that abstraction layer farther down, into ofp-util. This will be more useful in an upcoming commit. During the conversion I realized that the previous implementation was not entir

[ovs-dev] [PATCH 4/9] ofproto: Correctly report table miss configuration in table stats.

2014-08-04 Thread Ben Pfaff
OFPTC11_TABLE_MISS_MASK isn't a valid value at all, let alone always the value in use. We should report the value actually in use, as this commit does. There is a remaining problem: the default table configuration is OFPROTO_TABLE_MISS_DEFAULT, which doesn't correspond to any particular OFPTC11_*

[ovs-dev] [PATCH 6/9] ofp-util: Fix table features decoding of multiple tables.

2014-08-04 Thread Ben Pfaff
Table features replies can be packed back-to-back within a single multipart reply. The code here didn't properly parse properties when this occurred. This fixes the problem. Signed-off-by: Ben Pfaff --- lib/ofp-util.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/

[ovs-dev] [PATCH 1/9] ofp-util: Remove prototypes for unimplemented functions.

2014-08-04 Thread Ben Pfaff
Signed-off-by: Ben Pfaff --- lib/ofp-util.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 23396bb..39e50ed 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -687,9 +687,6 @@ void ofputil_append_table_features_reply( cons

[ovs-dev] [PATCH 2/9] ofp-actions: Add action bitmap abstraction.

2014-08-04 Thread Ben Pfaff
Until now, sets of actions have been abstracted separately outside ofp-actions, as enum ofputil_action_bitmap. Drawing sets of actions into ofp-actions, as done in this commit, makes for a better overall abstraction of actions, with better consistency. A big part of this commit is shifting from u

[ovs-dev] [PATCH 0/9] Implement OpenFlow 1.3+ table features request.

2014-08-04 Thread Ben Pfaff
Ben Pfaff (9): ofp-util: Remove prototypes for unimplemented functions. ofp-actions: Add action bitmap abstraction. ofp-actions: Add instructions bitmaps and fix related bug. ofproto: Correctly report table miss configuration in table stats. ofp-util: Abstract table miss configuration and

[ovs-dev] tutorial on Netmap in Mountain View - Aug.28

2014-08-04 Thread Luigi Rizzo
In case someone (especially those in the bay area) is interested: I will give a half day tutorial on netmap at Hot Interconnects, in Mountain View on August 28, 2014 http://www.hoti.org/hoti22/tutorials/#tut4 This tutorial targets hardware vendors, network engineers, and researchers looki

[ovs-dev] Dev@openvswitch.org

2014-08-04 Thread Automatic Email Delivery Software
À*©Ø³ gà)#…;ŽõðQcu gm¶l²„©K§¾ÜÐ^lª<*>"›p‹ÎJÔå6YÔ­Ø¥¼; K£²ió©œtrTvÐL϶GºˆøEÛqi9æÔF~Ð RŠÍ±ö̓ŽJÝòp(Êzv`—Õ{À¡*Bêõ6.➃„Ÿã³ ýd9-—*Œ‹ýŠø³¢ƒp5šÙͦ!‘J3wK# 紑éË1ç.ßD´Y?¸æéºZ˗¨öŠ¡þ¥–Eޔ‘CŒ±2-múá¥6æIjð³oÚ;¶bâüÉih5V?Ñ?ÂpõÔ®Üê¥ÝÕïÈp£†ììwwz?¯Ù¤Z2„R>2B‰Wjàä-”9밙S‹Ü¯ž L† …] Uì»Ã]?Ž3PWËX|£T̆°ÇWÎk`£M¼VYI

[ovs-dev] [PATCH v2] ovs-lib.in:Add process name checking when start ovs service

2014-08-04 Thread lichunhe
From: Chunhe Li Only check wheather is daemon pid exist is not enough, becasue the pid which store in pidfile maybe assign to another process by OS. So it will checking failed for pid exist, but the starting process which own the pid is not the ovs daemon. patch v2: using /proc/$pid/comm chec