Re: [ovs-dev] plan to integrate Hyper-V support

2014-07-29 Thread Alessandro Pilotti
Hi Nithin, I'd also add at least: 1) Design for mapping hyper-v ports to OVS ports 2) CI testing plans 3) Roadmap Thanks, Alessandro On 29.07.2014, at 05:01, "Nithin Raju" wrote: > 10.00 AM Pacific - Sounds good to me. > > hi Alessandro, > We'll be meeting tomorrow. In the light of that

Re: [ovs-dev] [PATCH] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-29 Thread Kmindg G
On Tue, Jul 29, 2014 at 1:01 AM, Ben Pfaff wrote: > Needs a sign-off. > Oh.. I will not forget it in the next version. > > I'm pretty sure that bitmap_equal() is wrong: doesn't it access one > past the end of the bitmap arrays? You are right. I'll fix it. > I think that rightmost_1bit_idx

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

2014-07-29 Thread Thomas Graf
Heavy Netlink users such as Open vSwitch spend a considerable amount of time in netlink_lookup() due to the read-lock on nl_table_lock. Use of RCU relieves the lock contention. Makes use of the new resizable hash table to avoid locking on the lookup. The hash table will grow if entries exceeds 75

[ovs-dev] [PATCH 0/2 net-next] Lockless netlink_lookup() with new concurrent hash table

2014-07-29 Thread Thomas Graf
Netlink sockets are maintained in a hash table to allow efficient lookup via the port ID for unicast messages. However, lookups currently require a read lock to be taken. This series adds a new generic, resizable, scalable, concurrent hash table based on the paper referenced in the first patch. It

[ovs-dev] [PATCH 1/2] lib: Resizable, Scalable, Concurrent Hash Table

2014-07-29 Thread Thomas Graf
Generic implementation of a resizable, scalable, concurrent hash table based on [0]. The implementation supports both, fixed size keys specified via an offset and length, or arbitrary keys via own hash and compare functions. Lookups are lockless and protected as RCU read side critical sections. Au

[ovs-dev] [PATCH v2 2/5] Add NETLINK defines

2014-07-29 Thread Alin Serdean
Add MAX_LINKS define needed for nl_pool. Add NLM_F_CREATE and NLM_F_EXCL defines also. Signed-off-by: Alin Gabriel Serdean --- lib/netlink-protocol.h | 4 1 file changed, 4 insertions(+) diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h index 88b7abf..8938055 100644 --- a/lib/n

[ovs-dev] [PATCH] vtep-ctl: Add Tunnel table to vtep_ctl_table_class.

2014-07-29 Thread Gurucharan Shetty
This is needed to create, get, set records in the Tunnel table. Signed-off-by: Gurucharan Shetty --- vtep/vtep-ctl.c |4 1 file changed, 4 insertions(+) diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index 0b9463a..129fa03 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c @@ -2283,6 +

[ovs-dev] [PATCH v2 3/5] Bypass HAVE_NETLINK for MSVC

2014-07-29 Thread Alin Serdean
Bypass the error compilation when compiling under MSVC. Signed-off-by: Alin Gabriel Serdean --- lib/netlink-socket.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index d53db4e..2b9ec52 100644 --- a/lib/netlink-socket.h +++ b/lib/netlink-socket

[ovs-dev] [PATCH v2 4/5] Changes needed to netlink-socket for MSVC

2014-07-29 Thread Alin Serdean
Add two functions set_sock_pid_in_kernel and portid_next. This will allow the channel identification for the kernel extension to send back messages. Replace send with WriteFile equivalent and ignore nl_sock_drain for the moment under MSVC. Replace sendmsg and recvmsg with ReadFile and WriteFile e

[ovs-dev] [PATCH v2 5/5] Add more files to the openvswitch library on MSVC

2014-07-29 Thread Alin Serdean
Add netlink related files to the windows build. Signed-off-by: Alin Gabriel Serdean --- lib/automake.mk | 9 + 1 file changed, 9 insertions(+) diff --git a/lib/automake.mk b/lib/automake.mk index 0997df5..87a8faa 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -319,6 +319,15 @@ l

[ovs-dev] [PATCH v2 1/5] Add defines, enums and headers for MSVC

2014-07-29 Thread Alin Serdean
Add defines needed to compile netlink-socket.c and netlink.c. Add a wrapper and the functionality behind it for syconf. Add the newly created files to the noinst_HEADERS in windows/automake.mk Signed-off-by: Alin Gabriel Serdean --- include/windows/automake.mk| 1 + include/windows/ne

Re: [ovs-dev] [PATCH 1/2] lib: Resizable, Scalable, Concurrent Hash Table

2014-07-29 Thread Josh Triplett
On Tue, Jul 29, 2014 at 01:41:32PM +0200, Thomas Graf wrote: > Generic implementation of a resizable, scalable, concurrent hash table > based on [0]. The implementation supports both, fixed size keys specified > via an offset and length, or arbitrary keys via own hash and compare > functions. > >

Re: [ovs-dev] [PATCH] netlink-socket: Add conceptual documentation.

2014-07-29 Thread Saurabh Shah
This is excellent. Thanks, Ben. > -Original Message- > From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Ben Pfaff > Sent: Monday, July 28, 2014 11:35 PM > To: dev@openvswitch.org > Cc: Ben Pfaff > Subject: [ovs-dev] [PATCH] netlink-socket: Add conceptual documentation. > > Base

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

2014-07-29 Thread Tobias Klauser
On 2014-07-29 at 13:41:33 +0200, Thomas Graf wrote: > Heavy Netlink users such as Open vSwitch spend a considerable amount of > time in netlink_lookup() due to the read-lock on nl_table_lock. Use of > RCU relieves the lock contention. > > Makes use of the new resizable hash table to avoid locking

Re: [ovs-dev] [PATCH] netlink-socket: Add conceptual documentation.

2014-07-29 Thread Ben Pfaff
Thanks for the review. I realized that I left off a couple of important points, so I'm folding in the following and will apply this to master soon. diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index 1450862..cdf32d2 100644 --- a/lib/netlink-socket.h +++ b/lib/netlink-socket.h @@ -149,

Re: [ovs-dev] [PATCH] cmap: Merge CMAP_FOR_EACH_SAFE into CMAP_FOR_EACH.

2014-07-29 Thread Ben Pfaff
On Mon, Jul 28, 2014 at 02:03:49PM -0700, Jarno Rajahalme wrote: > Ben, > > Thanks for reminding, somehow I lost track of this. > > This is actually a nice cleanup :-) > > Acked-by: Jarno Rajahalme Thanks, applied to master. ___ dev mailing list dev@

[ovs-dev] [PATCH] tests: Add another test for extended registers.

2014-07-29 Thread Ben Pfaff
ONF-JIRA: EXT-244 Suggested-by: Jean Tourrilhes Signed-off-by: Ben Pfaff --- tests/ofproto-dpif.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 4386639..9ee1698 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofpr

Re: [ovs-dev] [PATCH v2 1/5] Add defines, enums and headers for MSVC

2014-07-29 Thread Ben Pfaff
On Tue, Jul 29, 2014 at 03:21:16PM +, Alin Serdean wrote: > Add defines needed to compile netlink-socket.c and netlink.c. > > Add a wrapper and the functionality behind it for syconf. > > Add the newly created files to the noinst_HEADERS in windows/automake.mk > > Signed-off-by: Alin Gabriel

Re: [ovs-dev] plan to integrate Hyper-V support

2014-07-29 Thread Alin Serdean
We have pushed in the changes we made upon our repository: https://github.com/cloudbase/openvswitch-hyperv-kernel.git This conspicuous update includes: * Rebased on the the tip of master. * Functionality to take into account the NETLINK padding. * Hashing (SpookyHash) to improve performance over

Re: [ovs-dev] [PATCH v2 3/5] Bypass HAVE_NETLINK for MSVC

2014-07-29 Thread Ben Pfaff
On Tue, Jul 29, 2014 at 03:22:37PM +, Alin Serdean wrote: > Bypass the error compilation when compiling under MSVC. > > Signed-off-by: Alin Gabriel Serdean Applied to master, thanks! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/m

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

2014-07-29 Thread Thomas Graf
On 07/29/14 at 05:58pm, Tobias Klauser wrote: > On 2014-07-29 at 13:41:33 +0200, Thomas Graf wrote: > > Heavy Netlink users such as Open vSwitch spend a considerable amount of > > time in netlink_lookup() due to the read-lock on nl_table_lock. Use of > > RCU relieves the lock contention. > > > >

Re: [ovs-dev] [PATCH] tests: Add another test for extended registers.

2014-07-29 Thread Jean Tourrilhes
Hi, Unfortunately, I don't really have time to test the code, but from here it looks good and make sense. Have fun... Jean Acked-by: Jean Tourrilhes On Tue, Jul 29, 2014 at 09:27:23AM -0700, Ben Pfaff wrote: > ONF-JIRA: EXT-244 > Suggested-by: Jean Tourrilhes >

Re: [ovs-dev] [PATCH v2 4/5] Changes needed to netlink-socket for MSVC

2014-07-29 Thread Ben Pfaff
On Tue, Jul 29, 2014 at 03:23:28PM +, Alin Serdean wrote: > Add two functions set_sock_pid_in_kernel and portid_next. This will allow > the channel identification for the kernel extension to send back messages. > > Replace send with WriteFile equivalent and ignore nl_sock_drain for the moment

Re: [ovs-dev] [PATCH v2 5/5] Add more files to the openvswitch library on MSVC

2014-07-29 Thread Ben Pfaff
On Tue, Jul 29, 2014 at 03:24:08PM +, Alin Serdean wrote: > Add netlink related files to the windows build. > > > Signed-off-by: Alin Gabriel Serdean Applied to master, thanks! ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailma

Re: [ovs-dev] [PATCH] tests: Add another test for extended registers.

2014-07-29 Thread Ben Pfaff
That's good enough for me, for a review of a test case. Thanks! I've applied this to master. On Tue, Jul 29, 2014 at 09:35:57AM -0700, Jean Tourrilhes wrote: > Hi, > > Unfortunately, I don't really have time to test the code, but > from here it looks good and make sense. > Hav

Re: [ovs-dev] [PATCH v2 4/5] Changes needed to netlink-socket for MSVC

2014-07-29 Thread Alin Serdean
Thank you for review and the changes. Kind Regards, Alin. From: Ben Pfaff [b...@nicira.com] Sent: Tuesday, July 29, 2014 7:38 PM To: Alin Serdean Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH v2 4/5] Changes needed to netlink-socket for MSVC On Tu

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

2014-07-29 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 1/2] lib: Resizable, Scalable, Concurrent Hash Table

2014-07-29 Thread Thomas Graf
On 07/29/14 at 08:30am, Josh Triplett wrote: > On Tue, Jul 29, 2014 at 01:41:32PM +0200, Thomas Graf wrote: > > Generic implementation of a resizable, scalable, concurrent hash table > > based on [0]. The implementation supports both, fixed size keys specified > > via an offset and length, or arbit

[ovs-dev] [PATCH] datapath: Remove redundant key ref from upcall_info.

2014-07-29 Thread Pravin B Shelar
struct dp_upcall_info has pointer to pkt_key which is already available in OVS_CB. This also simplifies upcall handling for gso packet. Signed-off-by: Pravin B Shelar --- datapath/actions.c | 3 --- datapath/datapath.c | 34 +- datapath/datapath.h | 4 +--- 3

[ovs-dev] [PATCH 1/2] connmgr: Fix a typo.

2014-07-29 Thread Alex Wang
Signed-off-by: Alex Wang --- ofproto/connmgr.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index b7d5d3b..c6432bf 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -1496,7 +1496,7 @@ ofconn_wants_packet_in_on_miss(struct ofc

[ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
connmgr_wants_packet_in_on_miss() is called by multiple threads and thusly should be protected by the mutex. Signed-off-by: Alex Wang --- ofproto/connmgr.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index c6432bf..89af6b6 100

[ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
The connmgr_wants_packet_in_on_miss() should only check 'ofconn's of type OFCONN_PRIMARY (i.e. controller connections). This commit makes it happen. Signed-off-by: Alex Wang --- ofproto/connmgr.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ofproto/conn

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
Hey Simon, I think we should not check 'ofconn's for OFCONN_SERVICE... This change broke several tests: *Please send `tests/testsuite.log' and all information you think might help:* * To: >* * Subject: [openvswitch 2.3.0] testsuite: 737 739 747 817 failed* Wherein we use the ofctl monitor

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

2014-07-29 Thread Andy Zhou
Acked-by: Andy Zhou On Tue, Jul 29, 2014 at 11:20 AM, Alex Wang wrote: > Signed-off-by: Alex Wang > --- > ofproto/connmgr.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c > index b7d5d3b..c6432bf 100644 > --- a/ofproto/connmgr.

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Andy Zhou
Should we also consider lock annotate the ofproto->connmgr variable? Also, it seems to me the lock can be per ofproto, instead of a global lock, but I am not sure this use case will benefit from a finer grain lock. On Tue, Jul 29, 2014 at 11:20 AM, Alex Wang wrote: > connmgr_wants_packet_in_on

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
Thx for the suggestion, I think it will make the connmgr module safer if we annotate the ofproto->connmgr. With a quick look, I think it will take more checking and efforts, (for functions we know that are only called by the main thread, there is no lock protection) For branch-2.3, I want to use

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Andy Zhou
On Tue, Jul 29, 2014 at 2:09 PM, Alex Wang wrote: > Thx for the suggestion, I think it will make the connmgr module safer > if we annotate the ofproto->connmgr. With a quick look, I think it will > take more checking and efforts, (for functions we know that are only called > by the main thread, t

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
On Tue, Jul 29, 2014 at 2:16 PM, Andy Zhou wrote: > On Tue, Jul 29, 2014 at 2:09 PM, Alex Wang wrote: > > Thx for the suggestion, I think it will make the connmgr module safer > > if we annotate the ofproto->connmgr. With a quick look, I think it will > > take more checking and efforts, (for fu

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Alex Wang
Thx, pushed both patches to master and branch-2.3. I'll try improving the thread-safety of connmgr module later, On Tue, Jul 29, 2014 at 2:32 PM, Alex Wang wrote: > > > > On Tue, Jul 29, 2014 at 2:16 PM, Andy Zhou wrote: > >> On Tue, Jul 29, 2014 at 2:09 PM, Alex Wang wrote: >> > Thx for the

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Ben Pfaff
On Tue, Jul 29, 2014 at 11:30:12AM -0700, Alex Wang wrote: > I think we should not check 'ofconn's for OFCONN_SERVICE... This > change broke several tests: > > *Please send `tests/testsuite.log' and all information you think might > help:* > > * To: >* > > * Subject: [openvswitch 2.3.0] test

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
Hey Ben, Sorry for the confusion, On Tue, Jul 29, 2014 at 2:52 PM, Ben Pfaff wrote: > On Tue, Jul 29, 2014 at 11:30:12AM -0700, Alex Wang wrote: > > I think we should not check 'ofconn's for OFCONN_SERVICE... This > > change broke several tests: > > > > *Please send `tests/testsuite.log' and al

[ovs-dev] [PATCH] datapath: refactor ovs flow extract API.

2014-07-29 Thread Pravin B Shelar
OVS flow extract is called on packet receive or packet execute code path. Following patch defines separate API for these two cases to simplify code. Signed-off-by: Pravin B Shelar --- datapath/actions.c | 3 +- datapath/datapath.c | 8 ++--- datapath/flow.c | 82 +

Re: [ovs-dev] [PATCH] openvswitch: Use IS_ERR_OR_NULL

2014-07-29 Thread David Miller
From: Himangi Saraogi Date: Sun, 27 Jul 2014 12:37:46 +0530 > This patch introduces the use of the macro IS_ERR_OR_NULL in place of > tests for NULL and IS_ERR. > > The following Coccinelle semantic patch was used for making the change: > > @@ > expression e; > @@ > > - e == NULL || IS_ERR(e)

[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 @@ -125,

[ovs-dev] [PATCHv3] datapath: do not use vport type to determine presence of Geneve attributes

2014-07-29 Thread Ansis Atteka
This patch fixes following kernel crash that could happen, if geneve vport was not added yet, but revalidator thread attempted to dump flows. To reproduce: 1. switch tunnel type between geneve and gre in a loop; and 2. run ping. BUG: unable to handle kernel NULL pointer dereference at

Re: [ovs-dev] [PATCH] datapath: do not add Geneve attributes if vport does not exist

2014-07-29 Thread Ansis Atteka
On Mon, Jul 28, 2014 at 7:54 PM, Jesse Gross wrote: > On Tue, Jul 22, 2014 at 9:34 AM, Jesse Gross wrote: >> On Mon, Jul 21, 2014 at 5:11 PM, Ansis Atteka wrote: >>> On Thu, Jul 17, 2014 at 4:08 PM, Jesse Gross wrote: One thing that I worry about is that this has the possibility to ch

[ovs-dev] [PATCH net-next] net: Remove unlikely() for WARN_ON() conditions

2014-07-29 Thread Thomas Graf
No need for the unlikely(), WARN_ON() and BUG_ON() internally use unlikely() on the condition. Signed-off-by: Thomas Graf --- net/core/dev.c | 2 +- net/openvswitch/datapath.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Simon Horman
On Tue, Jul 29, 2014 at 03:01:03PM -0700, Alex Wang wrote: > Hey Ben, > > Sorry for the confusion, > > On Tue, Jul 29, 2014 at 2:52 PM, Ben Pfaff wrote: > > > On Tue, Jul 29, 2014 at 11:30:12AM -0700, Alex Wang wrote: > > > I think we should not check 'ofconn's for OFCONN_SERVICE... This > > >

Re: [ovs-dev] [PATCH 2/2] connmgr: Make call to connmgr_wants_packet_in_on_miss() thread safe.

2014-07-29 Thread Andy Zhou
On Tue, Jul 29, 2014 at 2:46 PM, Alex Wang wrote: > Thx, pushed both patches to master and branch-2.3. > > I'll try improving the thread-safety of connmgr module later, Sounds good. Thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org

Re: [ovs-dev] [RFC] connmgr: Make connmgr_wants_packet_in_on_miss() only check controller connections.

2014-07-29 Thread Alex Wang
> > > I don't wish to add to any confusion but I will none the less > make a comment on this change which you may choose to ignore if you like. > > The motivation for adding connmgr_wants_packet_in_on_miss() is to help > implement per-OpenFlow version behaviour of packet_in messages. So if > monit

[ovs-dev] [PATCH] vport-internal_dev:Drop packets when interdev is not up

2014-07-29 Thread lichunhe
From: Chunhe Li If the internal device is not up, it should drop received packets. Sometimes it receive the broadcast or multicast packets, and the ip protocol stack will casue more cpu usage wasted. Signed-off-by: Chunhe Li --- datapath/vport-internal_dev.c | 5 + 1 file changed, 5 insert

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

2014-07-29 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. Signed-off-by: Chunhe Li Signed-off-b