use ofproto.OFP_NO_BUFFER in some places

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
YAMAMOTO Takashi 2013-07-03 16:40:43 +09:00 committed by FUJITA Tomonori
parent 9104a8e7d4
commit b2636e0cc1
4 changed files with 5 additions and 5 deletions

View File

@ -958,5 +958,5 @@ class GRETunnel(app_manager.RyuApp):
# for debug
msg = ev.msg
self.logger.debug('packet in ev %s msg %s', ev, ev.msg)
if msg.buffer_id != 0xffffffff: # TODO:XXX use constant instead of -1
if msg.buffer_id != msg.datapath.ofproto.OFP_NO_BUFFER:
msg.datapath.send_packet_out(msg.buffer_id, msg.in_port, [])

View File

@ -74,7 +74,7 @@ class SimpleIsolation(app_manager.RyuApp):
rule=rule, cookie=0, command=datapath.ofproto.OFPFC_ADD,
idle_timeout=0, hard_timeout=0,
priority=ofproto.OFP_DEFAULT_PRIORITY,
buffer_id=0xffffffff, out_port=ofproto.OFPP_NONE,
buffer_id=ofproto.OFP_NO_BUFFER, out_port=ofproto.OFPP_NONE,
flags=ofproto.OFPFF_SEND_FLOW_REM, actions=actions)
datapath.send_packet_out(msg.buffer_id, msg.in_port, actions)

View File

@ -244,7 +244,7 @@ def mod_flow_entry(dp, flow, cmd):
idle_timeout = int(flow.get('idle_timeout', 0))
hard_timeout = int(flow.get('hard_timeout', 0))
priority = int(flow.get('priority', 0))
buffer_id = int(flow.get('buffer_id', 0xffffffff))
buffer_id = int(flow.get('buffer_id', dp.ofproto.OFP_NO_BUFFER))
out_port = int(flow.get('out_port', dp.ofproto.OFPP_ANY))
out_group = int(flow.get('out_group', dp.ofproto.OFPG_ANY))
flags = int(flow.get('flags', 0))

View File

@ -632,8 +632,8 @@ class Switches(app_manager.RyuApp):
@staticmethod
def _drop_packet(msg):
buffer_id = msg.buffer_id
if buffer_id == 0xffffffff:
return # TODO:use constant instead of -1
if buffer_id == msg.datapath.ofproto.OFP_NO_BUFFER:
return
dp = msg.datapath
# TODO:XXX