On Fri, 6 Jun 2014 16:57:19 -0400
Chen Chen <[email protected]> wrote:
> Hi guys:
>
> I'm using ryu 3.4 with ovs 2.0.1, through OpenFlow 1.2.
> There is a bewildering problem:
> A GotoTable instruction would result in a flow entry whose actions is
> "drop", rather than "GotoTable".
>
> To be more specific, the code for installing the flow entry is as follows:
>
> *****
> @handler.set_ev_cls(dpset.EventDP, dpset.DPSET_EV_DISPATCHER)
> def switch_connection_handler(self, event):
> datapath = event.dp
> parser = datapath.ofproto_parser
> ofproto = datapath.ofproto
>
> if event.enter:
> match = parser.OFPMatch(eth_src="10:10:10:10:10:10")
> inst = [parser.OFPInstructionGotoTable(1)]
>
> datapath.send_msg(
> parser.OFPFlowMod(datapath=datapath,
> match=match,
> priority=50,
> flags=ofproto.OFPFF_SEND_FLOW_REM,
> command=ofproto.OFPFC_ADD,
> instructions=inst))
Hmm, looks ok. Actually, I can add a flow including 'goto_table' to
OVS successfully with the similar code:
fujita@ubuntu:~$ sudo ovs-ofctl dump-flows -O OpenFlow13 br0
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=7.91s, table=0, n_packets=0, n_bytes=0,
priority=1,in_port=10 actions=goto_table:1
=
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
class SimpleSwitch13(app_manager.RyuApp):
OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION]
def __init__(self, *args, **kwargs):
super(SimpleSwitch13, self).__init__(*args, **kwargs)
pass
@set_ev_cls(ofp_event.EventOFPStateChange, MAIN_DISPATCHER)
def add_flow(self, ev):
datapath = ev.datapath
ofproto = datapath.ofproto
parser = datapath.ofproto_parser
match = parser.OFPMatch(in_port=10)
inst = parser.OFPInstructionGotoTable(1)
priority = 1
mod = parser.OFPFlowMod(datapath=datapath, priority=priority,
match=match, instructions=[inst])
datapath.send_msg(mod)
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel