summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCan Zhang <can@canx.me>2013-04-01 10:32:42 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-04-01 10:32:42 +0900
commit533fd972519871afe441d365f911a2970fe0875f (patch)
tree6c939a68d1fdcd952b7a201f5cd250944aa5cac9
parente1414b7fbe2d8d6a20aa4654860453a0ed7bff71 (diff)
of1.0: utils.round_up cleanup
Signed-off-by: Can Zhang <can@canx.me> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_0_parser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py
index a6d3977d..e44d6ae7 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 utils.round_up
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) - match_len
while offset < total_len:
action = OFPAction.parser(buf, offset)
actions.append(action)