>From 8bc4236b1cee2619d9b4ce938f6901e2fcecd283 Mon Sep 17 00:00:00 2001
From: Can Zhang <[email protected]>
Date: Mon, 1 Apr 2013 08:49:27 +0800
Subject: [PATCH] use utils.round_up

Signed-off-by: Can Zhang <[email protected]>
---
 ryu/ofproto/ofproto_v1_0_parser.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index a6d3977..49949e8 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -23,6 +23,7 @@ from ryu.lib import mac
 from . import ofproto_parser
 from . import ofproto_v1_0
 from . import nx_match
+import ryu.utils
 
 import logging
 LOG = logging.getLogger('ryu.ofproto.ofproto_v1_0_parser')
@@ -1069,7 +1070,7 @@ class NXFlowStats(object):
         actions = []
         total_len = original_offset + nxflow_stats.length
         match_len = nxflow_stats.match_len
-        offset += (match_len + 7) / 8 * 8 - match_len
+        offset += utils.round_up(match_len, 8)
         while offset < total_len:
             action = OFPAction.parser(buf, offset)
             actions.append(action)
-- 
1.7.11.1



------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to