diff options
-rw-r--r-- | ryu/app/cbench.py | 4 | ||||
-rw-r--r-- | ryu/app/simple_isolation.py | 11 | ||||
-rw-r--r-- | 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 4d89f867..81ed539c 100644 --- a/ryu/app/cbench.py +++ b/ryu/app/cbench.py @@ -34,5 +34,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 e6f3f855..1daf6be8 100644 --- a/ryu/app/simple_isolation.py +++ b/ryu/app/simple_isolation.py @@ -54,6 +54,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 @@ -64,9 +65,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) @@ -156,7 +158,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 95d09424..c95b96ca 100644 --- a/ryu/app/simple_switch.py +++ b/ryu/app/simple_switch.py @@ -69,7 +69,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) |