Re: [ovs-dev] openvswitch - flow.c file

2013-04-18 Thread Justin Pettit
The flow.c in "datapath" is GPL (as are all the other files in that directory, since it's the Linux kernel module), but the one in "lib" is under the Apache license. The userspace code, which uses the Apache license, uses the one in "lib". Let me know if I'm misunderstanding something. --Just

[ovs-dev] openvswitch - flow.c file

2013-04-18 Thread Michael Yip
Hi, I was reviewing the files and most are under Apache license except flow.c which is under GPL v2. Is there any way we could have all the files under Apache license? Thanks, Michael ___ dev mailing list dev@openvswitch.org http://openvswitch.org/m

Re: [ovs-dev] [PATCH net-next v2 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Jesse Gross
On Thu, Apr 18, 2013 at 2:30 PM, Pravin B Shelar wrote: > OVS locking was recently changed to have private OVS lock which > simplified overall locking. Therefore there is no need to have > another global genl lock to protect OVS data structures. Following > patch uses of lockless genl family for

[ovs-dev] [PATCH 3/3] datapath: Move vport init to First port create.

2013-04-18 Thread Pravin B Shelar
vport->init and exit() functios are defined by gre and netdev vport only and both can be moved to first port create. Following patch does same, it moves vport init to respectve vport create and get rid of vport->init() and vport->exit() fnctions. Signed-off-by: Pravin B Shelar --- datapath/vpor

[ovs-dev] [PATCH 1/3] datapath: Use generic struct pcpu_tstats.

2013-04-18 Thread Pravin B Shelar
Rather than defining ovs specific stats struct (vport_percpu_stats), we can use existing pcpu_tstats to achieve exactly same functionality. Signed-off-by: Pravin B Shelar --- datapath/linux/Modules.mk |1 + datapath/linux/compat/include/linux/if_tunnel.h | 20

[ovs-dev] [PATCH 2/3] tunneling: Remove struct tnl_vport and tnl_ops.

2013-04-18 Thread Pravin B Shelar
After flow based tunneling, kernel tunneling is greatly simplified. There is no need to have extra tunning layer between vport and perticular protocol. Following patch removes tunneling struct which make code easy to read. Signed-off-by: Pravin B Shelar --- datapath/tunnel.c | 63 +++-

[ovs-dev] [PATCH 0/3] datapath: Tunnel cleanup.

2013-04-18 Thread Pravin B Shelar
Following patch series is factored out from tunnel upstream series. This simplifies upstreaming patch series. Pravin B Shelar (3): datapath: Use generic struct pcpu_tstats. tunneling: Remove struct tnl_vport and tnl_ops. datapath: Move vport init to First port create. datapath/linux/Modul

Re: [ovs-dev] [PATCH 3/3] tests: Avoid race conditions, by letting the kernel choose ports to bind.

2013-04-18 Thread Ben Pfaff
On Thu, Apr 18, 2013 at 11:53:12AM -0700, Justin Pettit wrote: > On Apr 3, 2013, at 12:02 PM, Ben Pfaff wrote: > > > diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at > > index 06ebf23..857e6ab 100644 > > --- a/tests/ofproto-dpif.at > > +++ b/tests/ofproto-dpif.at > > @@ -1208,10 +1208,1

Re: [ovs-dev] [PATCH] datapath: Fix struct vport comment.

2013-04-18 Thread Jesse Gross
On Thu, Apr 18, 2013 at 4:07 PM, Pravin B Shelar wrote: > Removes remaining part of comment about `linkname` vport member. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman

Re: [ovs-dev] [PATCH] datapath: Fix inconsistency in upstream and out of tree ovs module.

2013-04-18 Thread Jesse Gross
On Thu, Apr 18, 2013 at 4:02 PM, Pravin B Shelar wrote: > There is a inconsistent ordering in function ovs_vport_cmd_set() > between upstream and out of tree ovs module. Following patch > fixes it by releasing lock before calling ovs_notify. > > Signed-off-by: Pravin B Shelar Acked-by: Jesse Gro

[ovs-dev] [PATCH] datapath: Fix struct vport comment.

2013-04-18 Thread Pravin B Shelar
Removes remaining part of comment about `linkname` vport member. Signed-off-by: Pravin B Shelar --- datapath/vport.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/datapath/vport.h b/datapath/vport.h index 83de672..6781cf6 100644 --- a/datapath/vport.h +++ b/datapath/v

[ovs-dev] [PATCH] datapath: Fix inconsistency in upstream and out of tree ovs module.

2013-04-18 Thread Pravin B Shelar
There is a inconsistent ordering in function ovs_vport_cmd_set() between upstream and out of tree ovs module. Following patch fixes it by releasing lock before calling ovs_notify. Signed-off-by: Pravin B Shelar --- datapath/datapath.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)

[ovs-dev] [PATCH net-next v2 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Pravin B Shelar
OVS locking was recently changed to have private OVS lock which simplified overall locking. Therefore there is no need to have another global genl lock to protect OVS data structures. Following patch uses of lockless genl family for OVS. This also allows more granual OVS locking using ovs_mutex

Re: [ovs-dev] [PATCH v2] datapath: Fix stale comment in flow.c.

2013-04-18 Thread Pravin Shelar
Thanks, Pushed to master. On Mon, Apr 15, 2013 at 2:36 PM, Jesse Gross wrote: > On Mon, Apr 15, 2013 at 11:32 AM, Pravin B Shelar wrote: >> Signed-off-by: Pravin B Shelar > > Acked-by: Jesse Gross ___ dev mailing list dev@openvswitch.org http://openv

[ovs-dev] [PATCH net-next v2 1/2] genl: Allow concurrent genl callbacks.

2013-04-18 Thread Pravin B Shelar
All genl callbacks are serialized by genl-mutex. This can become bottleneck in multi threaded case. Following patch adds an parameter to genl_family so that a particular family can get concurrent netlink callback without genl_lock held. New rw-sem is used to protect genl callback from genl family u

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Pravin Shelar
On Thu, Apr 18, 2013 at 2:18 PM, David Miller wrote: > From: Pravin B Shelar > Date: Thu, 18 Apr 2013 14:16:52 -0700 > >> OVS locking was recently changed to have private OVS lock which >> simplified overall locking. Therefore there is no need to have >> another global genl lock to protect OVS d

[ovs-dev] [PATCH net-next 1/2] genl: Allow concurrent genl callbacks.

2013-04-18 Thread Pravin B Shelar
All genl callbacks are serialized by genl-mutex. This can become bottleneck in multi threaded case. Following patch adds an parameter to genl_family so that a particular family can get concurrent netlink callback without genl_lock held. New rw-sem is used to protect genl callback from genl family u

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread David Miller
From: Pravin B Shelar Date: Thu, 18 Apr 2013 14:16:52 -0700 > OVS locking was recently changed to have private OVS lock which > simplified overall locking. Therefore there is no need to have > another global genl lock to protect OVS data structures. Following > patch uses of lockless genl famil

[ovs-dev] [PATCH net-next 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Pravin B Shelar
OVS locking was recently changed to have private OVS lock which simplified overall locking. Therefore there is no need to have another global genl lock to protect OVS data structures. Following patch uses of lockless genl family for OVS. This also allows more granual OVS locking using ovs_mutex

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Pravin Shelar
On Thu, Apr 18, 2013 at 11:31 AM, Jesse Gross wrote: > On Thu, Apr 18, 2013 at 9:52 AM, Pravin B Shelar wrote: >> Following patch uses of lockless genl callbacks for ovs. >> >> Signed-off-by: Pravin B Shelar > > I think this is clearly the right thing to do (assuming that the genl > part passes

Re: [ovs-dev] [PATCH 3/3] tests: Avoid race conditions, by letting the kernel choose ports to bind.

2013-04-18 Thread Justin Pettit
On Apr 3, 2013, at 12:02 PM, Ben Pfaff wrote: > diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at > index 06ebf23..857e6ab 100644 > --- a/tests/ofproto-dpif.at > +++ b/tests/ofproto-dpif.at > @@ -1208,10 +1208,12 @@ AT_CLEANUP > > dnl Test that sFlow samples packets correctly. > AT_SETU

Re: [ovs-dev] [PATCH] ofproto: Don't report hidden flows in table stats.

2013-04-18 Thread Ben Pfaff
On Thu, Apr 18, 2013 at 11:02:26AM -0700, Justin Pettit wrote: > On Apr 18, 2013, at 9:56 AM, Ben Pfaff wrote: > > > On Thu, Apr 18, 2013 at 09:46:30AM -0700, Justin Pettit wrote: > >> On Apr 18, 2013, at 9:28 AM, Ben Pfaff wrote: > >> > >>> But I'm not sure about the test. It tries to connect

Re: [ovs-dev] [PATCH net-next 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Jesse Gross
On Thu, Apr 18, 2013 at 9:52 AM, Pravin B Shelar wrote: > Following patch uses of lockless genl callbacks for ovs. > > Signed-off-by: Pravin B Shelar I think this is clearly the right thing to do (assuming that the genl part passes review from other people). However, can you expand the commit me

Re: [ovs-dev] [PATCH] sparse: Support recent distributions

2013-04-18 Thread Andy Zhou
Thanks. On Thu, Apr 18, 2013 at 10:09 AM, Ben Pfaff wrote: > I forgot that I needed to push this myself. > > I pushed this to master. > > On Mon, Apr 15, 2013 at 06:19:56PM -0700, Ben Pfaff wrote: > > I misunderstood. Thanks, I'm happy with it as is then. > > On Apr 15, 2013 5:17 PM, "Andy Zhou

Re: [ovs-dev] [PATCH 2/3] socket-util: Log kernel-chosen bound ports in inet_open_passive().

2013-04-18 Thread Justin Pettit
On Apr 3, 2013, at 12:02 PM, Ben Pfaff wrote: > port chosen by the user (he Open vSwitch automated tests currently do this) s/he/the/ Otherwise, looks good. --Justin ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/d

Re: [ovs-dev] [PATCH 1/3] tests: Make test-netflow, test-sflow accept all logging options.

2013-04-18 Thread Justin Pettit
Looks good. --Justin On Apr 3, 2013, at 12:02 PM, Ben Pfaff wrote: > An upcoming patch will start using the --log-file option with these test > programs, so they need to support it. > > Signed-off-by: Ben Pfaff > --- > tests/test-netflow.c | 12 +--- > tests/test-sflow.c | 13 ++

Re: [ovs-dev] [PATCH] ofproto: Don't report hidden flows in table stats.

2013-04-18 Thread Justin Pettit
On Apr 18, 2013, at 9:56 AM, Ben Pfaff wrote: > On Thu, Apr 18, 2013 at 09:46:30AM -0700, Justin Pettit wrote: >> On Apr 18, 2013, at 9:28 AM, Ben Pfaff wrote: >> >>> But I'm not sure about the test. It tries to connect to the default >>> OpenFlow port on localhost. I guess that there will or

Re: [ovs-dev] [PATCH] hotplug: add openvswitch script

2013-04-18 Thread Ben Pfaff
On Thu, Apr 18, 2013 at 01:08:40PM +0100, Ian Campbell wrote: > On Thu, 2013-04-18 at 12:50 +0100, Ian Campbell wrote: > > Based on Waldi's RFC at > > http://lists.xen.org/archives/html/xen-devel/2012-09/msg00943.html > > > > To use it set vif.default.script="vif-openvswitch" in /etc/xen/xl.conf o

Re: [ovs-dev] [PATCH] Correctly implement the OpenFlow 1.2+ OXM_OF_IP_DSCP field.

2013-04-18 Thread Ben Pfaff
Thanks, I applied this to master. On Thu, Apr 18, 2013 at 07:26:35PM +0900, Hiroshi Miyata wrote: > Hi Ben, > > I confirmed it works well! > > Thanks so much! > > ...hiroshi miyata > > (13/04/17 9:04), miyahiro.d...@gmail.com wrote: > > Hi Ben, > > > > Thanks, I will try the patch! > > I will

Re: [ovs-dev] [PATCH] Add a tutorial for advanced Open vSwitch features.

2013-04-18 Thread Ben Pfaff
On Thu, Apr 18, 2013 at 02:42:10PM -0300, Luiz Ozaki wrote: > On 4/17/13 8:03 PM, Ben Pfaff wrote: > >+ovs-ofctl add-flows br0 - <<'EOF' > >+table=4 reg0=0 priority=99 dl_vlan=20 actions=1,strip_vlan,2 > >+table=4 reg0=0 priority=99 dl_vlan=30 actions=1,strip_vlan,3,4 > >+table=4 reg0=0

Re: [ovs-dev] [PATCH] Add a tutorial for advanced Open vSwitch features.

2013-04-18 Thread Luiz Ozaki
On 4/17/13 8:03 PM, Ben Pfaff wrote: +ovs-ofctl add-flows br0 - <<'EOF' +table=4 reg0=0 priority=99 dl_vlan=20 actions=1,strip_vlan,2 +table=4 reg0=0 priority=99 dl_vlan=30 actions=1,strip_vlan,3,4 +table=4 reg0=0 priority=50actions=1 +EOF Wouldn't the last flow (table=4

Re: [ovs-dev] [PATCH 1/6] ofp-actions: Add the NXAST_SAMPLE vendor action

2013-04-18 Thread Ben Pfaff
I snipped most of your responses, which look fine to me. Thanks. I see one place worth a more detailed response. On Wed, Apr 17, 2013 at 07:00:17PM -0700, Romain Lenglet wrote: > I wasn't sure about the policy regarding asserts, since there aren't > many in the code. I have mixed feelings about

Re: [ovs-dev] [PATCH] sparse: Support recent distributions

2013-04-18 Thread Ben Pfaff
I forgot that I needed to push this myself. I pushed this to master. On Mon, Apr 15, 2013 at 06:19:56PM -0700, Ben Pfaff wrote: > I misunderstood. Thanks, I'm happy with it as is then. > On Apr 15, 2013 5:17 PM, "Andy Zhou" wrote: > > > This patch does the way you recommended already. > > > > >

Re: [ovs-dev] [PATCH] python: fix a typo error in python/ovs/socket_util.py.

2013-04-18 Thread Ben Pfaff
On Wed, Apr 17, 2013 at 05:35:04PM -0700, Alex Wang wrote: > The commit 89d7ffa9 (python: Workaround UNIX socket path > length limits), fixes most failed tests. But it has a > typo and the typo causes the failure of test server errors - Python> when the path length is very > long (e.g. more than 9

Re: [ovs-dev] [PATCH] ofproto: Don't report hidden flows in table stats.

2013-04-18 Thread Ben Pfaff
On Thu, Apr 18, 2013 at 09:46:30AM -0700, Justin Pettit wrote: > On Apr 18, 2013, at 9:28 AM, Ben Pfaff wrote: > > > But I'm not sure about the test. It tries to connect to the default > > OpenFlow port on localhost. I guess that there will ordinarily be no > > OpenFlow controller listening the

[ovs-dev] [PATCH net-next 2/2] openvswitch: Use lockless genl.

2013-04-18 Thread Pravin B Shelar
Following patch uses of lockless genl callbacks for ovs. Signed-off-by: Pravin B Shelar --- net/openvswitch/datapath.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index b7d0b7c..b2c966e 100644 --- a/n

[ovs-dev] [PATCH net-next 1/2] genl: Allow concurrent genl callbacks.

2013-04-18 Thread Pravin B Shelar
All genl callbacks are serialized by genl-mutex. This can become bottleneck in multi threaded case. Following patch adds an parameter to genl_family so that a particular family can get concurrent netlink callback without genl_lock held. New rw-sem is used to protect genl callback from genl family u

Re: [ovs-dev] [PATCH] ofproto: Don't report hidden flows in table stats.

2013-04-18 Thread Justin Pettit
On Apr 18, 2013, at 9:28 AM, Ben Pfaff wrote: > But I'm not sure about the test. It tries to connect to the default > OpenFlow port on localhost. I guess that there will ordinarily be no > OpenFlow controller listening there. Does the test still pass if there > is, though? And assuming that i

Re: [ovs-dev] [PATCH] ofproto: Don't report hidden flows in table stats.

2013-04-18 Thread Ben Pfaff
On Tue, Apr 02, 2013 at 08:38:17AM -0700, Justin Pettit wrote: > Hidden flows, such as in-band control, are not visible when using > OpenFlow to view stats. However, the OpenFlow Table Stats message would > report them back, which is confusing. This commit changes the code to > count only visible

[ovs-dev] [PATCH 2/7] ofproto-dpif: Restore flow nw_tos in all cases.

2013-04-18 Thread Jarno Rajahalme
Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 3ae3532..330cd5e 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -6006,7 +6006,7 @@ compose

[ovs-dev] [PATCH 6/7] ofproto-dpif: Keep perfect fitness on tunnel input.

2013-04-18 Thread Jarno Rajahalme
As the flow is no longer modified (apart from the in_port) on tunnel input, the perfect fitness can be retained. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c |3 --- 1 file changed, 3 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index a444701..0f97b

[ovs-dev] [PATCH 7/7] OpenFlow-level flow-based tunneling support.

2013-04-18 Thread Jarno Rajahalme
Adds tun_src and tun_dst match and set capabilities via new NXM fields NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST. This allows management of large number of tunnels via flow tables, without requiring the tunnels to be pre-configured. NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST are also included

[ovs-dev] [PATCH 3/7] Restore all flow changes by compose_output_action__().

2013-04-18 Thread Jarno Rajahalme
This makes sure that output actions leave no changes to any flow fields, while all explicit set_field actions are retained actross output actions. Signed-off-by: Jarno Rajahalme --- ofproto/ofproto-dpif.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a

[ovs-dev] [PATCH 4/7] Keep all of tunnel metadata in flow.

2013-04-18 Thread Jarno Rajahalme
Do not clear tunnel metadata on tunnel input. This is used by a later patch. Signed-off-by: Jarno Rajahalme --- lib/match.c|4 ofproto/ofproto-dpif.c | 26 -- ofproto/tunnel.c |3 +-- 3 files changed, 13 insertions(+), 20 deletions(-) dif

[ovs-dev] [PATCH 5/7] ofproto-dpif: Remove initial_vals.tunnel_ip_tos.

2013-04-18 Thread Jarno Rajahalme
As tunnel metadata is no longer cleared on input, and the input values are retained in 'ctx->flow' accross tunnel output actions, there is no need to store the tunnel.ip_tos to initial_vals. When needed, tunnel.ip_tos is gotten from ctx->flow instead of ctx->base_flow, since ctx->flow retains the

[ovs-dev] [PATCH 0/7] OpenFlow-level flow-based tunneling support

2013-04-18 Thread Jarno Rajahalme
Adds tun_src and tun_dst match and set capabilities via new NXM fields NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST. This allows management of large number of tunnels via flow tables, without requiring the tunnels to be pre-configured. Flow-based tunnels can be configured with options remote_ip=fl

[ovs-dev] [PATCH 1/7] odp-util: Keep base flow in sync with the kernel view.

2013-04-18 Thread Jarno Rajahalme
Change the base flow only if a corresponding kernel action is generated in commit_odp_tunnel_action(). Signed-off-by: Jarno Rajahalme --- lib/odp-util.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index 751c1c9..a8889dc 100644 -

Re: [ovs-dev] [PATCH] hotplug: add openvswitch script

2013-04-18 Thread Ian Campbell
(adding ovs list to this subthread too) On Thu, 2013-04-18 at 13:19 +0100, Bastian Blank wrote: > On Thu, Apr 18, 2013 at 12:50:40PM +0100, Ian Campbell wrote: > > Based on Waldi's RFC at > > http://lists.xen.org/archives/html/xen-devel/2012-09/msg00943.html > > BRIDGE_NAME[.VLAN][:TRUNK,TRUNK]

Re: [ovs-dev] [PATCH] hotplug: add openvswitch script

2013-04-18 Thread Ian Campbell
On Thu, 2013-04-18 at 12:50 +0100, Ian Campbell wrote: > Based on Waldi's RFC at > http://lists.xen.org/archives/html/xen-devel/2012-09/msg00943.html > > To use it set vif.default.script="vif-openvswitch" in /etc/xen/xl.conf or use > script=vif-openvswitch in the vif configuration. > > Appears to

Re: [ovs-dev] [PATCH] Correctly implement the OpenFlow 1.2+ OXM_OF_IP_DSCP field.

2013-04-18 Thread Hiroshi Miyata
Hi Ben, I confirmed it works well! Thanks so much! ...hiroshi miyata (13/04/17 9:04), miyahiro.d...@gmail.com wrote: > Hi Ben, > > Thanks, I will try the patch! > I will sent you the result shortly. > > Best Regards, > > ...hiroshi miyata > > (13/04/16 6:02), Ben Pfaff wrote: >> NXM puts the DS