[Ryu-devel] [PATCH 1/2] lib/packet: add Packet.__contains__

2013-06-09 Thread Isaku Yamahata
you can do something like: if arp.arp in Packet(msg.data): a = arp.arp(...) if a in Packet(msg.data): >>> from ryu.lib.packet import packet >>> from ryu.lib.packet import arp >>> a = arp.arp_ip(1, 0, 0, 0, 0) >>> p = packet.Packet() >>> p.protocols = [a] >>> arp.arp in p True

[Ryu-devel] [PATCH 2/2] packet lib: packet class supports get_protocol method

2013-06-09 Thread Isaku Yamahata
returns a list of protocols that matches to the specified protocol. Cc: FUJITA Tomonori Signed-off-by: Isaku Yamahata --- ryu/lib/packet/packet.py |8 1 file changed, 8 insertions(+) diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py index a40202f..09dd86d 100644 ---

[Ryu-devel] how to write into flow table of LINC switch

2013-06-09 Thread Gandhimathi Velusamy
Hi, I am using LINC switch with OpenFlow 1.3 and modified version of Ryu controller program l2_switch_v1_3.py to forward icmp messages. In the LINC console I am able to see the flow_mod messages with eth_type, ip_pro, ipv4_src and ipv4_dst values but if I use "linc_us4_flow:get_flow_table(0,0)."

Re: [Ryu-devel] error on starting the controller

2013-06-09 Thread Shivaram Mysore
Hello, Yes - you are running LINC in OF 1.3 mode. The problem is you are running a Ryu OF 1.2 application. You will need to run OF 1.3 based Ryu applications (for example https://github.com/FlowForwarding/LINC-Switch/blob/master/scripts/ryu/remove_flows_v1_3.py) /Shivaram On Sun, Jun 9, 2013

Re: [Ryu-devel] question about Configuration for Ryu /etc/ryu/ryu.conf part

2013-06-09 Thread Isaku Yamahata
On Sun, Jun 09, 2013 at 11:53:20PM +0800, hsin han Liu wrote: > After install ryu plugin. > > And change > > core_plugin = > quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2 > > into > > core_plugin = quantum.plugins.ryu.ryu_quantum_plugin.RyuQuantumPluginV2 > > My quantum se

Re: [Ryu-devel] [PATCH 6/7] packet lib: packet_base supports __eq__ method

2013-06-09 Thread FUJITA Tomonori
On Mon, 10 Jun 2013 11:26:43 +0900 Isaku Yamahata wrote: > How about this? It is more direct to use Packet.__contains__. > >>From b4d813f51cf01ed564033ad71a6db60338d41d74 Mon Sep 17 00:00:00 2001 > Message-Id: > > In-Reply-To: > References: > From: Isaku Yamahata > Date: Mon, 10 Jun 2013 11:

[Ryu-devel] [PATCH] of1.2: fix OFPSetConfig default arguments

2013-06-09 Thread FUJITA Tomonori
If you use initialize like the following way: OFPSetConfig(dp, miss_send_len=1600) You get the following assertion when it's serialized: File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 244, in _serialize_body assert self.flags is not None Signed-off-by: FUJITA Tomonori

[Ryu-devel] [PATCH] packet lib: icmp support time exceeded type

2013-06-09 Thread FUJITA Tomonori
Used mainly for traceroute. Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/icmp.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/ryu/lib/packet/icmp.py b/ryu/lib/packet/icmp.py index e42fa40..b049380 100644 --- a/ryu/lib/packet/icmp.py +++ b/ryu/lib/packet/icmp.py @@

Re: [Ryu-devel] [PATCH 6/7] packet lib: packet_base supports __eq__ method

2013-06-09 Thread Isaku Yamahata
How about this? It is more direct to use Packet.__contains__. >From b4d813f51cf01ed564033ad71a6db60338d41d74 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Isaku Yamahata Date: Mon, 10 Jun 2013 11:14:59 +0900 Subject: [PATCH] lib/packet: add Packet.__contains__ you can d

Re: [Ryu-devel] [PATCH 7/7] packet lib: packet class supports get_protocol method

2013-06-09 Thread Isaku Yamahata
On Mon, Jun 10, 2013 at 08:30:56AM +0900, FUJITA Tomonori wrote: > returns a list of protocols that matches to the specified protocol. > > Signed-off-by: FUJITA Tomonori > --- > ryu/lib/packet/packet.py | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ryu/lib/packet/packet.py b/ryu/l

[Ryu-devel] [PATCH v2] lib/packet: teach packet library to truncate padding octet

2013-06-09 Thread Isaku Yamahata
The patch teaches packet library to truncate padding octets. The protocol class that knows its payload length should set its payload length as payload_length > 0 attributes. Then, the packet.parser truncates its payload. If payload_length = 0, do nothing. Cc: YAMAMOTO Takashi Cc: Shaun Crampton

Re: [Ryu-devel] error on starting the controller

2013-06-09 Thread Shivaram Mysore
It looks like you are using the LINC switch in v1.3 mode but the Ryu switch application is for v1.2 OpenFlow. Thanks On Sun, Jun 9, 2013 at 4:44 PM, FUJITA Tomonori < fujita.tomon...@lab.ntt.co.jp> wrote: > Hi, > > On Sun, 9 Jun 2013 14:55:39 -0500 > Gandhimathi Velusamy wrote: > > > When I st

Re: [Ryu-devel] error on starting the controller

2013-06-09 Thread FUJITA Tomonori
Hi, On Sun, 9 Jun 2013 14:55:39 -0500 Gandhimathi Velusamy wrote: > When I start the ryu controller using the program simple_switch_v1_2.py, I > am getting the error message as follows:(linc@roadrunner)4> 11:42:25.433 > [info] Connected to controller localhost:6633/0 using OFP v4 > 11:42:25.434

[Ryu-devel] [PATCH 1/7] packet lib: ipv4 default args

2013-06-09 Thread FUJITA Tomonori
Make ipv4 more handy by not asking for every args. I prefer to use more human-readble representation for src and dst but it leads to the API change so let's do it later with another patch. Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/ipv4.py | 10 +++--- 1 file changed, 7 insertions(+),

[Ryu-devel] [PATCH 3/7] packet lib: vlan default args

2013-06-09 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/vlan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/packet/vlan.py b/ryu/lib/packet/vlan.py index 9a42403..f48de0e 100644 --- a/ryu/lib/packet/vlan.py +++ b/ryu/lib/packet/vlan.py @@ -43,7 +43,7 @@ class vlan(packet

[Ryu-devel] [PATCH 6/7] packet lib: packet_base supports __eq__ method

2013-06-09 Thread FUJITA Tomonori
you can do something like: if arp.arp in Packet(msg.data): Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/packet_base.py | 4 1 file changed, 4 insertions(+) diff --git a/ryu/lib/packet/packet_base.py b/ryu/lib/packet/packet_base.py index b0aeca0..6525664 100644 --- a/ryu/lib/packet/pa

[Ryu-devel] [PATCH 0/7] make packet lib API more handy

2013-06-09 Thread FUJITA Tomonori
= ryu/lib/packet/arp.py | 10 -- ryu/lib/packet/ipv4.py| 10 +++--- ryu/lib/packet/mpls.py| 2 +- ryu/lib/packet/packet.py | 10 -- ryu/lib/packet/packet_base.py | 4 ryu/lib/packet/vlan.py| 2 +- 6 files changed, 29 insertions(+), 9

[Ryu-devel] [PATCH 2/7] packet lib: mpls default args

2013-06-09 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/mpls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/packet/mpls.py b/ryu/lib/packet/mpls.py index 3c0ae4f..55d5b3e 100644 --- a/ryu/lib/packet/mpls.py +++ b/ryu/lib/packet/mpls.py @@ -44,7 +44,7 @@ class mpls(packet

[Ryu-devel] [PATCH 7/7] packet lib: packet class supports get_protocol method

2013-06-09 Thread FUJITA Tomonori
returns a list of protocols that matches to the specified protocol. Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/packet.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py index def580b..4fc04b3 100644 --- a/ryu/lib/packet/packet.py

[Ryu-devel] [PATCH 5/7] packet lib: packet class accepts protocols list argument

2013-06-09 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/packet.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py index f5fd82d..def580b 100644 --- a/ryu/lib/packet/packet.py +++ b/ryu/lib/packet/packet.py @@ -31,10 +31,13 @

[Ryu-devel] [PATCH 4/7] packet lib: arp default args

2013-06-09 Thread FUJITA Tomonori
Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/arp.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ryu/lib/packet/arp.py b/ryu/lib/packet/arp.py index f8be59e..35b8a6d 100644 --- a/ryu/lib/packet/arp.py +++ b/ryu/lib/packet/arp.py @@ -16,6 +16,8 @@ import str

Re: [Ryu-devel] [PATCH 4/6] Allow packet type to be specified when parsing packet

2013-06-09 Thread FUJITA Tomonori
On Sat, 01 Jun 2013 21:42:14 +0900 (JST) FUJITA Tomonori wrote: > On Fri, 24 May 2013 17:05:32 + > Shaun Crampton wrote: > >> From: Shaun Crampton >> >> Allow packet type to be specified when parsing packet. >> >> Signed-off-by: Shaun Crampton >> >> --- >> >> Our application has a nee

[Ryu-devel] error on starting the controller

2013-06-09 Thread Gandhimathi Velusamy
When I start the ryu controller using the program simple_switch_v1_2.py, I am getting the error message as follows:(linc@roadrunner)4> 11:42:25.433 [info] Connected to controller localhost:6633/0 using OFP v4 11:42:25.434 [debug] Received message from the controller: {ofp_message,4,features_reques

Re: [Ryu-devel] Ryu OpenFlow 1.3 issue

2013-06-09 Thread FUJITA Tomonori
On Sun, 9 Jun 2013 17:17:40 +0300 "Oren Spector" wrote: > Now I encounter a problem with the parsing of QUEUE_GET_CONFIG_REPLY of > OpenFlow 1.3, as shown below. I'm using the latest version of Ryu. I > appreciate if you could indicate a way to fix this issue. Looks like a bug. Here's a patch (n

Re: [Ryu-devel] question about Configuration for Ryu /etc/ryu/ryu.conf part

2013-06-09 Thread hsin han Liu
After install ryu plugin. And change core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2 into core_plugin = quantum.plugins.ryu.ryu_quantum_plugin.RyuQuantumPluginV2 My quantum service failed to start does any met same problem? thanks, Allen 2013/6/9 hsin han

[Ryu-devel] question about Configuration for Ryu /etc/ryu/ryu.conf part

2013-06-09 Thread hsin han Liu
hi after complete setup grizzly , in the configuration part. is the password use for database access? which password should i filled in? quantum_url = http://127.0.0.1:9696 quantum_admin_username = admin quantum_admin_password = admin_password quantum_admin_tenant_name = admin quantum_admin_au

Re: [Ryu-devel] Ryu OpenFlow 1.3 issue

2013-06-09 Thread Oren Spector
Hi, Thanks again. Now I encounter a problem with the parsing of QUEUE_GET_CONFIG_REPLY of OpenFlow 1.3, as shown below. I'm using the latest version of Ryu. I appreciate if you could indicate a way to fix this issue. Thanks, Oren hub: uncaught exception: Traceback (most recent ca