Re: [ovs-dev] [PATCH v4] Extend OVS IPFIX exporter to export tunnel headers

2014-07-21 Thread Wenyu Zhang
Hello Pravin, I added some new comments inline, may you take a look? Please ingore the firest reply if you haven't looked at it. And I have sent out patch v5, with the addressed comments except two points I have explained in comments. Bests, Wenyu -Original Message- From: Wenyu Zhang

Re: [ovs-dev] [backport branch-2.3] route-table: Make route-table module thread-safe.

2014-07-21 Thread Ben Pfaff
On Sun, Jul 20, 2014 at 12:43:41AM -0700, Alex Wang wrote: > From: Ryan Wilson > > Since the use of xcache, the netdev struct can be freed by the > revalidator threads. This fact also makes the following race possible: > > 1. Consider there is a gre tunnel, and datapath flows that go through >

Re: [ovs-dev] [backport branch-2.3] route-table: Make route-table module thread-safe.

2014-07-21 Thread Alex Wang
Thx, backported to branch-2.3 with suggested changes, On Mon, Jul 21, 2014 at 8:57 AM, Ben Pfaff wrote: > On Sun, Jul 20, 2014 at 12:43:41AM -0700, Alex Wang wrote: > > From: Ryan Wilson > > > > Since the use of xcache, the netdev struct can be freed by the > > revalidator threads. This fact

Re: [ovs-dev] [PATCHv4] datapath: Cache netlink flow key, mask on flow_dump.

2014-07-21 Thread Pravin Shelar
On Sun, Jul 20, 2014 at 7:30 PM, Joe Stringer wrote: > Converting the flow key and mask back into netlink format during each > flow dump is fairly expensive. By caching the netlink versions of these > the first time a flow is dumped, and copying the memory directly during > subsequent dumps, we ar

Re: [ovs-dev] [PATCH] datapath: Refactor get_dp() function into multiple access APIs

2014-07-21 Thread Pravin Shelar
On Wed, Jul 16, 2014 at 11:42 PM, Andy Zhou wrote: > Remove get_dp() API, it becomes get_dp__() which is for internal > use only. Added the following APIs to make it clear of the locking > requirement. > > o get_dp_rcu() requires its caller to hold rcu lock. > o get_dp_ovsl() requires i

[ovs-dev] [PATCH] netlink-notifier: Exit loop if nl_sock_recv() returns an error

2014-07-21 Thread Daniele Di Proietto
An error from nl_sock_recv() could mean that there issues with the netlink socket (EBADF, ENOTSOCK, ...). Keeping calling nl_sock_recv() in this case is harmful: nln_run() will never return and, since we are calling it from the main thread, vswitchd will become unresponsive. Suggested-by: Alex Wan

[ovs-dev] Bonjour

2014-07-21 Thread e
Bonjour Je suis tombée sur votre contact E-mail suite à une recherche personnelle alors j'ai décidé de vous écrire. Je suis madame BUSHMANN ENRIKA , ex- administrateur d'une multinationale du diamant à la retraite. Allemande de nationalité je suis hospitalisée en Afrique pour raison de santé

Re: [ovs-dev] [PATCH] netlink-notifier: Exit loop if nl_sock_recv() returns an error

2014-07-21 Thread Ben Pfaff
On Mon, Jul 21, 2014 at 11:13:28AM -0700, Daniele Di Proietto wrote: > An error from nl_sock_recv() could mean that there issues with the netlink > socket (EBADF, ENOTSOCK, ...). Keeping calling nl_sock_recv() in this case is > harmful: nln_run() will never return and, since we are calling it from

[ovs-dev] [refactor get_dp() V2] datapath: Refactor get_dp() function into multiple access APIs

2014-07-21 Thread Andy Zhou
o get_dp_rcu() requires its caller to hold rcu lock. o get_dp() requires its caller to hold either ovs lock or rcu lock. Signed-off-by: Andy Zhou --- v1->v2: Reduce APIs from 4 to 2. --- datapath/datapath.c | 27 +++ 1 file changed,

Re: [ovs-dev] [PATCH] datapath: Refactor get_dp() function into multiple access APIs

2014-07-21 Thread Andy Zhou
O.K. I have send out a V2 that reduced the number of APIs from 4 to 2. get_dp() as before, and get_dp_rcu(). V2 is a simpler change. On Mon, Jul 21, 2014 at 11:04 AM, Pravin Shelar wrote: > On Wed, Jul 16, 2014 at 11:42 PM, Andy Zhou wrote: >> Remove get_dp() API, it becomes get_dp__() which is

Re: [ovs-dev] [PATCH 1/4] datapath-windows: Base code for developing the Hyper-V switch entension.

2014-07-21 Thread Ben Pfaff
On Fri, Jul 18, 2014 at 5:35 PM, Saurabh Shah wrote: > > From: Ben Pfaff > Date: Wednesday, June 25, 2014 at 2:57 PM > To: Saurabh Shah > Cc: "dev@openvswitch.org" , Guolin Yang > > Subject: Re: [ovs-dev] [PATCH 1/4] datapath-windows: Base code for > developing the Hyper-V switch entension. > >

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

2014-07-21 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; and 2. run ping. BUG: unable to handle kernel NULL pointer dereference at 0048 IP: [

Re: [ovs-dev] [PATCH 3/4] dpif-windows: Implement datapath interface for windows.

2014-07-21 Thread Ben Pfaff
On Fri, Jul 18, 2014 at 5:27 PM, Saurabh Shah wrote: > Ben Pfaff writes: > > The logging in dpif_windows_flow_del() seems like a debugging stray. > > Do you mean in do_put? I mean the one here: +static int +dpif_windows_flow_del(struct dpif *dpif, const struct dpif_flow_del *del) +{ +VLOG_IN

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

2014-07-21 Thread Ansis Atteka
On Thu, Jul 17, 2014 at 4:08 PM, Jesse Gross wrote: > On Thu, Jul 17, 2014 at 3:46 PM, Ansis Atteka wrote: >> diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c >> index 5f975a1..a4108c0 100644 >> --- a/datapath/flow_netlink.c >> +++ b/datapath/flow_netlink.c >> @@ -1034,7 +1034,7 @@

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

2014-07-21 Thread Ethan Jackson
I think we could take this further by getting rid of the flow put and execute, and having exec_upcalls instead just return the necessary actions and mask. At any rate, this is a good staring point. In exec_upcalls, we assert that cnt is less that UPCALL_MAX_BATCH which seems wrong. It's much les

Re: [ovs-dev] [PATCH] stp: Add more logging points for debug.

2014-07-21 Thread Ben Pfaff
On Fri, Jul 18, 2014 at 01:49:52PM -0700, Alex Wang wrote: > This commit adds more logging points in stp module for debugging. > Also, it makes the log print out the port name. > > Signed-off-by: Alex Wang This is not safe against simultaneous calls for the same port, but it would be if the assi

[ovs-dev]  ̄发は票▃代︹开`

2014-07-21 Thread 2014年7月22日5时56分21秒
↗℡ⅱぃ①Ⅵò∝ぜ▲¥◥ξさば    服    务    销    售    设   备   禾兑   王  生 Q扣: 1 2 1 1 6 0 1 6 5 1     電:1 8 3 2 0 7 9 3 1 6 5  す①※ね—︷◆ ̄┣╅づΨ*:み ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH 1/5] lib/ovs-rcu: evaluate argument of ovsrcu_get only once.

2014-07-21 Thread Jarno Rajahalme
Thanks for the review! Pushed to master, Jarno On Jul 18, 2014, at 10:40 PM, Ben Pfaff wrote: > On Fri, Jul 18, 2014 at 09:05:48PM -0700, Jarno Rajahalme wrote: >> As ovsrcu_get() looks like a function call, it is reasonable for the >> callers to expect that the arguments are evaluated only o

Re: [ovs-dev] [PATCH 3/5] ovs-atomic: Avoid evaluating arguments multiple times.

2014-07-21 Thread Jarno Rajahalme
Thanks, pushed, Jarno On Jul 18, 2014, at 11:36 PM, Ben Pfaff wrote: > On Fri, Jul 18, 2014 at 09:05:50PM -0700, Jarno Rajahalme wrote: >> ovs-atomic-gcc4+ did expand arguments again, if locked set/get was >> called. >> >> Also fix atomic_is_lock_free(). >> >> Signed-off-by: Jarno Rajahalme

Re: [ovs-dev] [PATCH 4/5] vswitchd/bridge: Fix setting default prefix fields.

2014-07-21 Thread Jarno Rajahalme
Pushed with the proposed change, thanks for the review! Jarno On Jul 18, 2014, at 11:49 PM, Ben Pfaff wrote: > On Fri, Jul 18, 2014 at 09:05:51PM -0700, Jarno Rajahalme wrote: >> The check for the need of default values was in the wrong place, >> causing no prefix tracking to be used when dat

Re: [ovs-dev] [PATCH 1/2] cmap, classifier: Avoid unsafe aliasing in iterators.

2014-07-21 Thread Jarno Rajahalme
As you noted earlier, CMAP_FOR_EACH and CMAP_FOR_EACH_SAFE now are basically the same thing, the only difference being on that safe does the advance before calling the body. You considered merging them before? Acked-by: Jarno Rajahalme On Jul 19, 2014, at 10:28 AM, Ben Pfaff wrote: > CMAP_FO

Re: [ovs-dev] [PATCH 2/2] classifier: Refactor cls_cursor_advance() to make it easier to follow.

2014-07-21 Thread Jarno Rajahalme
Acked-by: Jarno Rajahalme On Jul 19, 2014, at 10:28 AM, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > --- > lib/classifier.c | 49 + > 1 file changed, 21 insertions(+), 28 deletions(-) > > diff --git a/lib/classifier.c b/lib/classifier.c > index

Re: [ovs-dev] [PATCH] netlink-notifier: Exit loop if nl_sock_recv() returns an error

2014-07-21 Thread Daniele Di Proietto
Thanks, After an offline discussion with Alex we decided that it might be worth to go one step further and avoid calling the notification callback in case of error. This (for example) would prevent lib/route-table.c from believing that the routing table has changed on every iteration I’m about

[ovs-dev] [PATCH v2] netlink-notifier: Exit loop if nl_sock_recv() returns an error

2014-07-21 Thread Daniele Di Proietto
An error from nl_sock_recv() could mean that there are some issues with the netlink socket (EBADF, ENOTSOCK, ...). Calling nl_sock_recv() in this case is harmful: nln_run() will never return and since we are calling it from the main thread, vswitchd becomes unresponsive. Also, with this commit we a

Re: [ovs-dev] [PATCH] netlink-notifier: Exit loop if nl_sock_recv() returns an error

2014-07-21 Thread Ben Pfaff
v2 seems fine to me too. I'll leave it to Alex to apply this in case he has further comments. On Mon, Jul 21, 2014 at 03:48:14PM -0700, Daniele Di Proietto wrote: > Thanks, > > After an offline discussion with Alex we decided that it might be worth to go > one > step further and avoid calling t

[ovs-dev] [PATCH] ovsdb-server: Document RFC 7047 extensions to ovsdb s.

2014-07-21 Thread Ben Pfaff
Reported-by: Madhu Venugopal Signed-off-by: Ben Pfaff --- ovsdb/ovsdb-server.1.in | 16 1 file changed, 16 insertions(+) diff --git a/ovsdb/ovsdb-server.1.in b/ovsdb/ovsdb-server.1.in index 15382b4..ec408a6 100644 --- a/ovsdb/ovsdb-server.1.in +++ b/ovsdb/ovsdb-server.1.in @@

[ovs-dev] [RFC] tests: wait for ofctl_monitor.log in ofproto-dpif controller

2014-07-21 Thread Daniele Di Proietto
Signed-off-by: Daniele Di Proietto --- I've noticed a testcase (ofproto-dpif - controller, 758) failure on master. I believe that the problem is in the testcase itself, in which case this commit fixes it. Can someone, please, confirm that the issue is in the testcase and that the fix makes sense?

Re: [ovs-dev] [PATCH v5] Extend OVS IPFIX exporter to export tunnel headers

2014-07-21 Thread Wenyu Zhang
Thanks for the review, my comments inline. Bests, Wenyu -Original Message- From: Pravin Shelar [mailto:pshe...@nicira.com] Sent: Tuesday, July 22, 2014 6:56 AM To: Wenyu Zhang Cc: Romain Lenglet; Ben Pfaff; Jesse Gross; dev@openvswitch.org Subject: Re: [PATCH v5] Extend OVS IPFIX exporter

Re: [ovs-dev] [PATCH 2/2] classifier: Refactor cls_cursor_advance() to make it easier to follow.

2014-07-21 Thread Ben Pfaff
Thanks for the reviews. I applied these to master. On Mon, Jul 21, 2014 at 03:29:35PM -0700, Jarno Rajahalme wrote: > Acked-by: Jarno Rajahalme > > On Jul 19, 2014, at 10:28 AM, Ben Pfaff wrote: > > > Signed-off-by: Ben Pfaff > > --- > > lib/classifier.c | 49 +---

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

2014-07-21 Thread Ben Pfaff
There isn't any significant downside to making cmap iteration "safe" all the time, so this drops the _SAFE variant. Similar changes to CMAP_CURSOR_FOR_EACH and CMAP_CURSOR_FOR_EACH_CONTINUE. Signed-off-by: Ben Pfaff --- lib/classifier.c | 4 ++-- lib/cmap.h| 57 ---

Re: [ovs-dev] [PATCH 1/2] cmap, classifier: Avoid unsafe aliasing in iterators.

2014-07-21 Thread Ben Pfaff
On Mon, Jul 21, 2014 at 03:25:58PM -0700, Jarno Rajahalme wrote: > As you noted earlier, CMAP_FOR_EACH and CMAP_FOR_EACH_SAFE now are > basically the same thing, the only difference being on that safe does > the advance before calling the body. You considered merging them > before? Sure. Here's a

Re: [ovs-dev] [RFC] tests: wait for ofctl_monitor.log in ofproto-dpif controller

2014-07-21 Thread Ben Pfaff
On Mon, Jul 21, 2014 at 05:11:49PM -0700, Daniele Di Proietto wrote: > Signed-off-by: Daniele Di Proietto > --- > I've noticed a testcase (ofproto-dpif - controller, 758) failure on master. > I believe that the problem is in the testcase itself, in which case this > commit > fixes it. > Can someo