mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 20:36:10 +02:00
app: use symbol instead of 32678 for default priority
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
c721e811c8
commit
7d19e5c7df
@ -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)
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user