Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 ryu/app/gre_tunnel.py       | 2 +-
 ryu/app/simple_isolation.py | 2 +-
 ryu/lib/ofctl_v1_2.py       | 2 +-
 ryu/topology/switches.py    | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ryu/app/gre_tunnel.py b/ryu/app/gre_tunnel.py
index 5fed365..903d6d2 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 1e08109..c38cd9f 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 d08bb21..186c8a6 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 892fff6..690a8fc 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
-- 
1.8.1.5


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to