mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-01-23 01:21:31 +01:00
add round_up utility function
OF protocols need this in many places. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
b0d77225fd
commit
910563941d
@ -61,3 +61,7 @@ def find_flagfile(default_path=RYU_DEFAULT_FLAG_FILE):
|
||||
sys.argv.insert(1, flagfile)
|
||||
LOG.debug('flagfile = %s', filename)
|
||||
return
|
||||
|
||||
|
||||
def round_up(x, y):
|
||||
return ((x + y - 1) / y) * y
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user