mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-06 12:56:10 +02:00
Add Nicira Extension NXT_SET_ASYNC_CONFIG support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
511df56d6b
commit
720c67fbb2
@ -576,6 +576,7 @@ NXT_FLOW_MOD_TABLE_ID = 15
|
||||
NXT_SET_PACKET_IN_FORMAT = 16
|
||||
NXT_PACKET_IN = 17
|
||||
NXT_FLOW_AGE = 18
|
||||
NXT_SET_ASYNC_CONFIG = 19
|
||||
NXT_SET_CONTROLLER_ID = 20
|
||||
|
||||
# enum nx_role
|
||||
@ -631,6 +632,11 @@ NX_PACKET_IN_SIZE = 40
|
||||
assert (calcsize(NX_PACKET_IN_PACK_STR) +
|
||||
NICIRA_HEADER_SIZE == NX_PACKET_IN_SIZE)
|
||||
|
||||
NX_ASYNC_CONFIG_PACK_STR = '!IIIIII'
|
||||
NX_ASYNC_CONFIG_SIZE = 40
|
||||
assert (calcsize(NX_ASYNC_CONFIG_PACK_STR) +
|
||||
NICIRA_HEADER_SIZE == NX_ASYNC_CONFIG_SIZE)
|
||||
|
||||
NX_CONTROLLER_ID_PACK_STR = '!6xH'
|
||||
NX_CONTROLLER_ID_SIZE = 24
|
||||
assert (calcsize(NX_CONTROLLER_ID_PACK_STR) +
|
||||
|
||||
@ -1410,6 +1410,24 @@ class NXTFlowAge(NiciraHeader):
|
||||
self.serialize_header()
|
||||
|
||||
|
||||
class NXTSetAsyncConfig(NiciraHeader):
|
||||
def __init__(self, datapath, packet_in_mask, port_status_mask,
|
||||
flow_removed_mask):
|
||||
super(NXTSetAsyncConfig, self).__init__(
|
||||
datapath, ofproto_v1_0.NXT_SET_ASYNC_CONFIG)
|
||||
self.packet_in_mask = packet_in_mask
|
||||
self.port_status_mask = port_status_mask
|
||||
self.flow_removed_mask = flow_removed_mask
|
||||
|
||||
def _serialize_body(self):
|
||||
self.serialize_header()
|
||||
msg_pack_into(ofproto_v1_0.NX_ASYNC_CONFIG_PACK_STR,
|
||||
self.buf, ofproto_v1_0.NICIRA_HEADER_SIZE,
|
||||
self.packet_in_mask[0], self.packet_in_mask[1],
|
||||
self.port_status_mask[0], self.port_status_mask[1],
|
||||
self.flow_removed_mask[0], self.flow_removed_mask[1])
|
||||
|
||||
|
||||
class NXTSetControllerId(NiciraHeader):
|
||||
def __init__(self, datapath, controller_id):
|
||||
super(NXTSetControllerId, self).__init__(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user