[Ryu-devel] Ryu 1.5 released

2012-11-29 Thread FUJITA Tomonori
Hi, As usual, the easiest way to install the latest Ryu release is using pip command: % pip install ryu = FUJITA Tomonori (18): don't use select.POLL* constants of1.3: fix OFP_OXM_EXPERIMENTER_HEADER_SIZE assert of1.3: fix OFP_TABLE_MOD_PACK_STR assert of1.3: fix OFP_METE

Re: [Ryu-devel] [PATCH] set setup.py install_requires properly

2012-11-29 Thread FUJITA Tomonori
On Fri, 30 Nov 2012 15:23:13 +0900 Isaku Yamahata wrote: > Sounds good idea. > > On Fri, Nov 30, 2012 at 02:37:08PM +0900, FUJITA Tomonori wrote: > > Let's enable pip to solve the dependency. > > > > The code is taken from OpenStack. > > We'd also like to add such comment in the code. Otherwis

Re: [Ryu-devel] [PATCH] set setup.py install_requires properly

2012-11-29 Thread Isaku Yamahata
Sounds good idea. On Fri, Nov 30, 2012 at 02:37:08PM +0900, FUJITA Tomonori wrote: > Let's enable pip to solve the dependency. > > The code is taken from OpenStack. We'd also like to add such comment in the code. Otherwise the reader would be confused with 'nova'. Otherwise looks good. thanks,

[Ryu-devel] [PATCH 2/3] task_queue: helper class to do blocking task in serialized manner

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- ryu/lib/task_queue.py | 62 + 1 file changed, 62 insertions(+) create mode 100644 ryu/lib/task_queue.py diff --git a/ryu/lib/task_queue.py b/ryu/lib/task_queue.py new file mode 100644 index 000..b8ab357 ---

[Ryu-devel] [PATCH 3/3] ryu/app/simple_vlan: simple VLAN spp

2012-11-29 Thread Isaku Yamahata
This application provides VLAN separation with ovs tag function. Something similar openstack quantum openvswitch vlan function. Example to run: ryu-manager ryu/app/simple_vlan.py \ ryu/app/quantum_adapter.py \ ryu/app/rest.py \ ryu/app/rest_conf_switch.py \

[Ryu-devel] [PATCH 1/3] ryu/lib/ovs/bridge: add set_db_attribute() method

2012-11-29 Thread Isaku Yamahata
The method, set_db_attribute(), will be used by simple_vlan to set tag column of Interface table. Signed-off-by: Isaku Yamahata --- ryu/lib/ovs/bridge.py |5 + 1 file changed, 5 insertions(+) diff --git a/ryu/lib/ovs/bridge.py b/ryu/lib/ovs/bridge.py index 14876b0..4c8a8e8 100644 --- a/

[Ryu-devel] [PATCH 0/3] simple vlan application

2012-11-29 Thread Isaku Yamahata
Introduce simple vlan application which provides VLAN separation with ovs tag function. Something similar openstack quantum openvswitch vlan function. This patch series is on the top of the GRE tunnel patch series. Example to run: ryu-manager ryu/app/simple_vlan.py \ ryu/app/quantum_ad

Re: [Ryu-devel] [PATCH v7 02/32] From: Ben Pfaff Date: Wed, 21 Nov 2012 09:00:39 -0800 Subject: [PATCH] python/ovs/stream: Fix Stream.connect() retval for incomplete connection.

2012-11-29 Thread FUJITA Tomonori
On Fri, 30 Nov 2012 11:44:53 +0900 Isaku Yamahata wrote: > If the loop condition in Stream.connect() was false, which is especially > likely for TCP connections, then Stream.connect() would return None, > which violates its documented behavior. This commit fixes the problem. > > Reported-by: Is

Re: [Ryu-devel] [PATCH v7 01/32] Revert "contrib/ovs/stream.py: TypeError: bad operand type for unary -: 'NoneType'"

2012-11-29 Thread FUJITA Tomonori
On Fri, 30 Nov 2012 11:44:52 +0900 Isaku Yamahata wrote: > This reverts commit c3a41d06a654ea81cdc79d7bda5106d05f2e1deb. > --- > ryu/contrib/ovs/stream.py | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions(-) Applied. -

[Ryu-devel] [PATCH] set setup.py install_requires properly

2012-11-29 Thread FUJITA Tomonori
Let's enable pip to solve the dependency. The code is taken from OpenStack. Signed-off-by: FUJITA Tomonori --- ryu/utils.py | 39 +++ setup.py |4 2 files changed, 43 insertions(+), 0 deletions(-) diff --git a/ryu/utils.py b/ryu/utils.py index

Re: [Ryu-devel] [PATCH] ofproto_v1_2_parser: code simplification

2012-11-29 Thread FUJITA Tomonori
On Fri, 30 Nov 2012 13:58:09 +0900 Isaku Yamahata wrote: > - simpliy MatchField contructor > Eliminate redundant __init__() of MatchField subclass. > The same simplification can be applied to v1.3. > - add missing super().__init__ call and remove redandant __init__ > for consistency > > Si

[Ryu-devel] [PATCH] ofproto_v1_2_parser: code simplification

2012-11-29 Thread Isaku Yamahata
- simpliy MatchField contructor Eliminate redundant __init__() of MatchField subclass. The same simplification can be applied to v1.3. - add missing super().__init__ call and remove redandant __init__ for consistency Signed-off-by: Isaku Yamahata --- Similar clean up can be applied to v1.3.

[Ryu-devel] [PATCH v7 18/32] ryu/app/client: support conf_switch

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- ryu/app/client.py | 44 ++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/ryu/app/client.py b/ryu/app/client.py index 01a482c..14888d4 100644 --- a/ryu/app/client.py +++ b/ryu/app/client.py @@ -15,6 +15,

[Ryu-devel] [PATCH v7 23/32] ovs/bridge: helper class to manipulate ovs bridge

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- Change v6 -> v7: - get_quantum_port(): IndexError. Check no result case. - get_quantum_port(): accept not only port_no, but also port name Change v5 -> v6: - methods for quantum_adapter Changes v4 -> v5: - drop unused code --- ryu/lib/ovs/bridge.py | 186 +

[Ryu-devel] [PATCH v7 24/32] lib/synchronized: introduce helper decorator for synchronization

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- ryu/lib/synchronized.py | 29 + 1 file changed, 29 insertions(+) create mode 100644 ryu/lib/synchronized.py diff --git a/ryu/lib/synchronized.py b/ryu/lib/synchronized.py new file mode 100644 index 000..d1129db --- /dev/null ++

[Ryu-devel] [PATCH v7 31/32] app: Add quantum adapter

2012-11-29 Thread Isaku Yamahata
From: Yoshihiro Kaneko Signed-off-by: Yoshihiro Kaneko Signed-off-by: Isaku Yamahata --- Changes v6 -> v7: - check if port might not exist. - make use of QueueSerializer and RequestQueue Changes v5 -> v6: - use OF port_mod event - don't access to quantum db - other clean ups --- ryu/app/quant

[Ryu-devel] [PATCH v7 09/32] controller/network: factor out network.py and add event generator for gre tunnel and helper methods

2012-11-29 Thread Isaku Yamahata
- Factor out from network.py the logic to track network and dpid - introduce class Port to allow other info Later we'll track mac address associated to port. So allow intermediate layer to contain infos related to Port. - make network track mac address associated to port - generate events Sign

[Ryu-devel] [PATCH v7 25/32] app/tunnel_port_updater: application that creates/deletes tunnel ports

2012-11-29 Thread Isaku Yamahata
This application dynamically creates/deletes tunnel ports for GRE tunnel app. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - 'key=flow' option to tunnel port --- ryu/app/tunnel_port_updater.py | 470 1 file changed, 470 insertions(+) create mode

[Ryu-devel] [PATCH v7 13/32] app/client: add tunnel client

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- Changes v2 -> v3: - de-GRE --- ryu/app/client.py | 46 ++ 1 file changed, 46 insertions(+) diff --git a/ryu/app/client.py b/ryu/app/client.py index fcf1283..01a482c 100644 --- a/ryu/app/client.py +++ b/ryu/app/client

[Ryu-devel] [PATCH v7 14/32] bin/ryu-client: support gre tunnel client

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- Changes v2 -> v3: - de-GRE --- bin/ryu-client | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/bin/ryu-client b/bin/ryu-client index dc1f697..15e83f2 100755 --- a/bin/ryu-client +++ b/bin/ryu-client @@ -

[Ryu-devel] [PATCH v7 27/32] ryu/lib/quantum_ifaces.py: track the relation of quantum iface-id

2012-11-29 Thread Isaku Yamahata
This is needed for quantum plugin in order to track the association from iface-id to network id or other info. Signed-off-by: Isaku Yamahata --- ryu/lib/quantum_ifaces.py | 89 + 1 file changed, 89 insertions(+) create mode 100644 ryu/lib/quantum_if

[Ryu-devel] [PATCH v7 19/32] bin/ryu-client: support switch_conf

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- bin/ryu-client | 10 ++ 1 file changed, 10 insertions(+) diff --git a/bin/ryu-client b/bin/ryu-client index 15e83f2..3d816b8 100755 --- a/bin/ryu-client +++ b/bin/ryu-client @@ -21,6 +21,7 @@ from optparse import OptionParser from ryu.app.client imp

[Ryu-devel] [PATCH v7 08/32] app/client: add helper function to ignore NOT_FOUND, 404

2012-11-29 Thread Isaku Yamahata
Sometimes client code just wants to ignore 404 when deleting resources. So provide helper function for it. Signed-off-by: Isaku Yamahata --- ryu/app/client.py | 13 + 1 file changed, 13 insertions(+) diff --git a/ryu/app/client.py b/ryu/app/client.py index d54fe44..fcf1283 100644

[Ryu-devel] [PATCH v7 32/32] docs: tunneling app

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- Changes v5 -> v6: - adjust for code change Changes v3 -> v4: - clarification - some more devstack variables --- doc/source/openstack.rst|1 + doc/source/tunneling_with_openstack.rst | 312 +++ 2 files changed, 313

[Ryu-devel] [PATCH v7 30/32] bin/ryu-client: teach quantum iface rest api

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- bin/ryu-client | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/ryu-client b/bin/ryu-client index 3d816b8..292ee26 100755 --- a/bin/ryu-client +++ b/bin/ryu-client @@ -19,9 +19,10 @@ import sys from optparse import Opt

[Ryu-devel] [PATCH v7 22/32] lib/ovs/vsctl: python reimplementation of ovs-vsctl

2012-11-29 Thread Isaku Yamahata
This implements subset of ovs-vsctl which is used later. Signed-off-by: Isaku Yamahata --- Change v6 -> v7: - get_quantum_port(): matching port might not exist. Try port_no first and then try port name. If matching port doesn't exist, return None. Change v5 -> v6: - methods for quantum_adapt

[Ryu-devel] [PATCH v7 28/32] rest/quantum: quantum iface REST API

2012-11-29 Thread Isaku Yamahata
Quantum teach ryu the relation iface-id and network_id Signed-off-by: Isaku Yamahata --- ryu/app/rest_quantum.py | 127 +++ 1 file changed, 127 insertions(+) create mode 100644 ryu/app/rest_quantum.py diff --git a/ryu/app/rest_quantum.py b/ryu/app/r

[Ryu-devel] [PATCH v7 17/32] ryu/app: REST API to set per-switch configuration

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- ryu/app/conf_switch_key.py | 18 + ryu/app/rest_conf_switch.py | 173 +++ 2 files changed, 191 insertions(+) create mode 100644 ryu/app/conf_switch_key.py create mode 100644 ryu/app/rest_conf_switch.py diff --git

[Ryu-devel] [PATCH v7 05/32] app/rest: add requirements to path component

2012-11-29 Thread Isaku Yamahata
This patch adds requirements to path component so that URL is verified. And simplify with submapper. Signed-off-by: Isaku Yamahata --- ryu/app/rest.py | 66 ++- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/ryu/app/rest.py b

[Ryu-devel] [PATCH v7 21/32] lib/ovs: add constants for ovsdb Open_vSwitch db

2012-11-29 Thread Isaku Yamahata
Those constants are used to manipulate Open_vSwitch db of ovsdb. Signed-off-by: Isaku Yamahata --- ryu/lib/ovs/vswitch_idl.py | 175 1 file changed, 175 insertions(+) create mode 100644 ryu/lib/ovs/__init__.py create mode 100644 ryu/lib/ovs/vswitch

[Ryu-devel] [PATCH v7 26/32] bin/ryu-manager: import ryu.flags for common options

2012-11-29 Thread Isaku Yamahata
Otherwise those options can't be specified. Signed-off-by: Isaku Yamahata --- bin/ryu-manager |1 + 1 file changed, 1 insertion(+) diff --git a/bin/ryu-manager b/bin/ryu-manager index 002cc59..7cec729 100755 --- a/bin/ryu-manager +++ b/bin/ryu-manager @@ -27,6 +27,7 @@ monkey.patch_all() f

[Ryu-devel] [PATCH v7 20/32] ryu/controller/network.py: add helper functions for tunnel updater

2012-11-29 Thread Isaku Yamahata
This will be used by tunnel app. Signed-off-by: Isaku Yamahata --- ryu/controller/network.py | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ryu/controller/network.py b/ryu/controller/network.py index abfd12c..08dcdbf 100644 --- a/ryu/controller/network.p

[Ryu-devel] [PATCH v7 12/32] app/rest_tunnel: REST API for tunnel

2012-11-29 Thread Isaku Yamahata
With this API, other component such as openstack quantum tells informations necessary for tunnel. - tunnel key corresponding to network id - tunnel port related information which tunnel port of a given datapath connected to which remote datapath Signed-off-by: Isaku Yamahata --- Changes v4 -> v

[Ryu-devel] [PATCH v7 15/32] app/gre_tunnel: implement GRETunnel app

2012-11-29 Thread Isaku Yamahata
- race masking layer - implement GRETunnel app: app/gre_tunnel Signed-off-by: Isaku Yamahata --- Changes v5 -> v6: - not to use controller.is_reserved_port - make use of handler_utils.py Changes v4 -> v5: - use tunnel specific exceptions Changes v3 -> v4: - duplicated output to tunnel port ---

[Ryu-devel] [PATCH v7 06/32] app/rest_nw_id: add port type for reserved port and vport-gre

2012-11-29 Thread Isaku Yamahata
This patch adds new port type for reserved port and vport-gre. They will be used later. Via this REST API, ryu knows which port is used for gre or reserved port. Signed-off-by: Isaku Yamahata --- ryu/app/rest_nw_id.py | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[Ryu-devel] [PATCH v7 10/32] dpset: add port{add, delete, modify} event for convenience and helper functions

2012-11-29 Thread Isaku Yamahata
It is sometimes commonly interesting to track datapath/port appearance/disappearance. The applications usually want to see that ports appear after datapath becomes ready, and ports disappear when datapath is dead. It requires to handle properly events, hand shaking, port_mod event, switch_feature_r

[Ryu-devel] [PATCH v7 29/32] ryu/app/client: teach quantum iface api

2012-11-29 Thread Isaku Yamahata
Signed-off-by: Isaku Yamahata --- ryu/app/client.py | 48 1 file changed, 48 insertions(+) diff --git a/ryu/app/client.py b/ryu/app/client.py index 14888d4..5b592cf 100644 --- a/ryu/app/client.py +++ b/ryu/app/client.py @@ -182,3 +182,51 @@ clas

[Ryu-devel] [PATCH v7 16/32] controller/switch_conf: introduce a class to manage per-switch configuration

2012-11-29 Thread Isaku Yamahata
For tunnel application and generally, it is necessary to associate configurations to each switches. Such as tunnel port ip address for each switches. So introduce a helper class to manage those configurations. Signed-off-by: Isaku Yamahata --- Changes v4 -> v5: - commit message Changes v1 -> v2:

[Ryu-devel] [PATCH v7 11/32] controller/tunnel: introduce new class that tracks infos related to tunneling

2012-11-29 Thread Isaku Yamahata
- helper functions and event generator for gre tunnel - plug events for gre tunnel app Signed-off-by: Isaku Yamahata --- Changes v4 -> v5: - use tunnel specific exceptions --- ryu/controller/tunnels.py | 210 + 1 file changed, 210 insertions(+) creat

[Ryu-devel] [PATCH v7 04/32] ryu/controller/handler_util.py: utility class for event queue

2012-11-29 Thread Isaku Yamahata
Those classes are for common use case. - Event serializing with single queue - request producer/consumer model which will be used for blocking call to be decoupled from hot path So introduce helper classes to handle them. They will be used by later commit. Signed-off-by: Isaku Yamahata --- ry

[Ryu-devel] [PATCH v7 01/32] Revert "contrib/ovs/stream.py: TypeError: bad operand type for unary -: 'NoneType'"

2012-11-29 Thread Isaku Yamahata
This reverts commit c3a41d06a654ea81cdc79d7bda5106d05f2e1deb. --- ryu/contrib/ovs/stream.py | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ryu/contrib/ovs/stream.py b/ryu/contrib/ovs/stream.py index b4f5ba6..c4d243d 100644 --- a/ryu/contrib/ovs/stream.py +++ b/ryu

[Ryu-devel] [PATCH v7 02/32] From: Ben Pfaff Date: Wed, 21 Nov 2012 09:00:39 -0800 Subject: [PATCH] python/ovs/stream: Fix Stream.connect() retval for incomplete connection.

2012-11-29 Thread Isaku Yamahata
If the loop condition in Stream.connect() was false, which is especially likely for TCP connections, then Stream.connect() would return None, which violates its documented behavior. This commit fixes the problem. Reported-by: Isaku Yamahata Signed-off-by: Ben Pfaff --- ryu/contrib/ovs/stream.p

[Ryu-devel] [PATCH v7 07/32] ryu/app/client: factor out rest client code

2012-11-29 Thread Isaku Yamahata
REST API will be enhanced. So factor out reset client code such that it affords extension. Signed-off-by: Isaku Yamahata --- ryu/app/client.py | 53 +++-- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/ryu/app/client.py b/ryu/app

[Ryu-devel] [PATCH v7 00/32]

2012-11-29 Thread Isaku Yamahata
GRE tunnel support This is version 7 of GRE tunnel support. Major change is avoid blocking in direct datapath handler (and drop unnecessary patches). 1, 2: ovs lib To catch up the upstream of OVS. 3: ryu/controller/dispatcher: introduce thread based event queue patch reorder: Move up i

[Ryu-devel] [PATCH v7 03/32] ryu/controller/dispatcher: introduce thread based event queue

2012-11-29 Thread Isaku Yamahata
If event is dispatched directly, event handler may block. Handlers from multiple source may have race condition. In order to maximize parallelism and minimize blocking and avoid race condition, it is useful to create another event queue and create dedicated thread to dispatch those events. Events f

Re: [Ryu-devel] ACL rules in Ryu

2012-11-29 Thread FUJITA Tomonori
Hi, On Thu, 29 Nov 2012 07:16:00 + Mohamad Al Atasi wrote: > I have created a simple topology on Mininet which has two switches > (one OpenFlow and another non-OpenFlow), in addition to 3 hosts per > switch. So I was wondering if you can give me some tips about how to > implement the ACL rul

Re: [Ryu-devel] Ryu application guidance

2012-11-29 Thread FUJITA Tomonori
Hi, On Wed, 28 Nov 2012 23:01:21 -0800 Shivaram Mysore wrote: > I have written some very basic and simple OF 1.2 applications for Ryu which > I am running against LINC (www.flowforwarding.org). Once I run the > application (ex. add flow), I have to CNTRL+C to get out of the same - > which means