Signed-off-by: Isaku Yamahata <[email protected]>
---
ryu/app/cbench.py | 4 ++--
ryu/app/simple_isolation.py | 11 +++++++----
ryu/app/simple_switch.py | 3 ++-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/ryu/app/cbench.py b/ryu/app/cbench.py
index 5dc64a9..cf3d68d 100644
--- a/ryu/app/cbench.py
+++ b/ryu/app/cbench.py
@@ -20,5 +20,5 @@ class Cbench(object):
rule = nx_match.ClsRule()
datapath.send_flow_mod(
rule=rule, cookie=0, command=ofproto.OFPFC_ADD,
- idle_timeout=0, hard_timeout=0, priority=32768,
- flags=0, actions=None)
+ idle_timeout=0, hard_timeout=0,
+ priority=ofproto.OFP_DEFAULT_PRIORITY, flags=0, actions=None)
diff --git a/ryu/app/simple_isolation.py b/ryu/app/simple_isolation.py
index 44eaa3a..329f399 100644
--- a/ryu/app/simple_isolation.py
+++ b/ryu/app/simple_isolation.py
@@ -53,6 +53,7 @@ class SimpleIsolation(object):
@staticmethod
def _modflow_and_send_packet(msg, src, dst, actions):
datapath = msg.datapath
+ ofproto = datapath.ofproto
#
# install flow and then send packet
@@ -63,9 +64,10 @@ class SimpleIsolation(object):
rule.set_dl_src(src)
datapath.send_flow_mod(
rule=rule, cookie=0, command=datapath.ofproto.OFPFC_ADD,
- idle_timeout=0, hard_timeout=0, priority=32768,
- buffer_id=0xffffffff, out_port=datapath.ofproto.OFPP_NONE,
- flags=datapath.ofproto.OFPFF_SEND_FLOW_REM, actions=actions)
+ idle_timeout=0, hard_timeout=0,
+ priority=ofproto.OFP_DEFAULT_PRIORITY,
+ buffer_id=0xffffffff, out_port=ofproto.OFPP_NONE,
+ flags=ofproto.OFPFF_SEND_FLOW_REM, actions=actions)
datapath.send_packet_out(msg.buffer_id, msg.in_port, actions)
@@ -155,7 +157,8 @@ class SimpleIsolation(object):
rule.set_dl_dst(src)
datapath.send_flow_mod(rule=rule, cookie=0,
command=datapath.ofproto.OFPFC_DELETE, idle_timeout=0,
- hard_timeout=0, priority=32768, out_port=old_port)
+ hard_timeout=0, priority=datapath.ofproto.OFP_DEFAULT_PRIORITY,
+ out_port=old_port)
# to make sure the old flow entries are purged.
datapath.send_barrier()
diff --git a/ryu/app/simple_switch.py b/ryu/app/simple_switch.py
index 99b5893..ba04591 100644
--- a/ryu/app/simple_switch.py
+++ b/ryu/app/simple_switch.py
@@ -68,7 +68,8 @@ class SimpleSwitch(object):
rule.set_nw_dscp(0)
datapath.send_flow_mod(
rule=rule, cookie=0, command=ofproto.OFPFC_ADD,
- idle_timeout=0, hard_timeout=0, priority=32768,
+ idle_timeout=0, hard_timeout=0,
+ priority=ofproto.OFP_DEFAULT_PRIORITY,
flags=ofproto.OFPFF_SEND_FLOW_REM, actions=actions)
datapath.send_packet_out(msg.buffer_id, msg.in_port, actions)
--
1.7.1.1
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel