summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/app/gre_tunnel.py2
-rw-r--r--ryu/app/simple_isolation.py2
-rw-r--r--ryu/lib/ofctl_v1_2.py2
-rw-r--r--ryu/topology/switches.py4
4 files changed, 5 insertions, 5 deletions
diff --git a/ryu/app/gre_tunnel.py b/ryu/app/gre_tunnel.py
index 5fed3651..903d6d21 100644
--- a/ryu/app/gre_tunnel.py
+++ b/ryu/app/gre_tunnel.py
@@ -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, [])
diff --git a/ryu/app/simple_isolation.py b/ryu/app/simple_isolation.py
index 1e081091..c38cd9f1 100644
--- a/ryu/app/simple_isolation.py
+++ b/ryu/app/simple_isolation.py
@@ -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)
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py
index d08bb21c..186c8a6b 100644
--- a/ryu/lib/ofctl_v1_2.py
+++ b/ryu/lib/ofctl_v1_2.py
@@ -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))
diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
index 892fff6a..690a8fca 100644
--- a/ryu/topology/switches.py
+++ b/ryu/topology/switches.py
@@ -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