python3: Calculate the number of ports as integer
Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
8c8be53de6
commit
25b3f23c2f
@ -1686,7 +1686,7 @@ class OFPSwitchFeatures(MsgBase):
|
||||
ofproto.OFP_HEADER_SIZE)
|
||||
|
||||
msg.ports = {}
|
||||
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) /
|
||||
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) //
|
||||
ofproto.OFP_PHY_PORT_SIZE)
|
||||
offset = ofproto.OFP_SWITCH_FEATURES_SIZE
|
||||
for _i in range(n_ports):
|
||||
|
@ -406,7 +406,7 @@ class OFPSwitchFeatures(MsgBase):
|
||||
ofproto.OFP_HEADER_SIZE)
|
||||
|
||||
msg.ports = {}
|
||||
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) /
|
||||
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) //
|
||||
ofproto.OFP_PORT_SIZE)
|
||||
offset = ofproto.OFP_SWITCH_FEATURES_SIZE
|
||||
for i in range(n_ports):
|
||||
|
Loading…
x
Reference in New Issue
Block a user