5 # = Rocker switch device
11 # Rocker switch information.
17 # @ports: number of front-panel ports
21 { 'struct': 'RockerSwitch',
22 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
27 # Return rocker switch information.
29 # Returns: @Rocker information
35 # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
36 # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
39 { 'command': 'query-rocker',
40 'data': { 'name': 'str' },
41 'returns': 'RockerSwitch' }
46 # An eumeration of port duplex states.
54 { 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
59 # An eumeration of port autoneg states.
61 # @off: autoneg is off
67 { 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
72 # Rocker switch port information.
76 # @enabled: port is enabled for I/O
78 # @link-up: physical link is UP on port
80 # @speed: port link speed in Mbps
82 # @duplex: port link duplex
84 # @autoneg: port link autoneg
88 { 'struct': 'RockerPort',
89 'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
90 'speed': 'uint32', 'duplex': 'RockerPortDuplex',
91 'autoneg': 'RockerPortAutoneg' } }
94 # @query-rocker-ports:
96 # Return rocker switch port information.
98 # Returns: a list of @RockerPort information
104 # -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
105 # <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
106 # "autoneg": "off", "link-up": true, "speed": 10000},
107 # {"duplex": "full", "enabled": true, "name": "sw1.2",
108 # "autoneg": "off", "link-up": true, "speed": 10000}
112 { 'command': 'query-rocker-ports',
113 'data': { 'name': 'str' },
114 'returns': ['RockerPort'] }
117 # @RockerOfDpaFlowKey:
119 # Rocker switch OF-DPA flow key
121 # @priority: key priority, 0 being lowest priority
123 # @tbl-id: flow table ID
125 # @in-pport: physical input port
127 # @tunnel-id: tunnel ID
131 # @eth-type: Ethernet header type
133 # @eth-src: Ethernet header source MAC address
135 # @eth-dst: Ethernet header destination MAC address
137 # @ip-proto: IP Header protocol field
139 # @ip-tos: IP header TOS field
141 # @ip-dst: IP header destination address
143 # Note: optional members may or may not appear in the flow key
144 # depending if they're relevant to the flow key.
148 { 'struct': 'RockerOfDpaFlowKey',
149 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
150 '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
151 '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
152 '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
155 # @RockerOfDpaFlowMask:
157 # Rocker switch OF-DPA flow mask
159 # @in-pport: physical input port
161 # @tunnel-id: tunnel ID
165 # @eth-src: Ethernet header source MAC address
167 # @eth-dst: Ethernet header destination MAC address
169 # @ip-proto: IP Header protocol field
171 # @ip-tos: IP header TOS field
173 # Note: optional members may or may not appear in the flow mask
174 # depending if they're relevant to the flow mask.
178 { 'struct': 'RockerOfDpaFlowMask',
179 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
180 '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
181 '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
184 # @RockerOfDpaFlowAction:
186 # Rocker switch OF-DPA flow action
188 # @goto-tbl: next table ID
190 # @group-id: group ID
192 # @tunnel-lport: tunnel logical port ID
196 # @new-vlan-id: new VLAN ID
198 # @out-pport: physical output port
200 # Note: optional members may or may not appear in the flow action
201 # depending if they're relevant to the flow action.
205 { 'struct': 'RockerOfDpaFlowAction',
206 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
207 '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
208 '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
213 # Rocker switch OF-DPA flow
215 # @cookie: flow unique cookie ID
217 # @hits: count of matches (hits) on flow
223 # @action: flow action
227 { 'struct': 'RockerOfDpaFlow',
228 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
229 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
232 # @query-rocker-of-dpa-flows:
234 # Return rocker OF-DPA flow information.
238 # @tbl-id: flow table ID. If tbl-id is not specified, returns
239 # flow information for all tables.
241 # Returns: rocker OF-DPA flow information
247 # -> { "execute": "query-rocker-of-dpa-flows",
248 # "arguments": { "name": "sw1" } }
249 # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
252 # "action": {"goto-tbl": 10},
253 # "mask": {"in-pport": 4294901760}
259 { 'command': 'query-rocker-of-dpa-flows',
260 'data': { 'name': 'str', '*tbl-id': 'uint32' },
261 'returns': ['RockerOfDpaFlow'] }
266 # Rocker switch OF-DPA group
268 # @id: group unique ID
274 # @pport: physical port number
276 # @index: group index, unique with group type
278 # @out-pport: output physical port number
280 # @group-id: next group ID
282 # @set-vlan-id: VLAN ID to set
284 # @pop-vlan: pop VLAN headr from packet
286 # @group-ids: list of next group IDs
288 # @set-eth-src: set source MAC address in Ethernet header
290 # @set-eth-dst: set destination MAC address in Ethernet header
292 # @ttl-check: perform TTL check
294 # Note: optional members may or may not appear in the group depending
295 # if they're relevant to the group type.
299 { 'struct': 'RockerOfDpaGroup',
300 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan-id': 'uint16',
301 '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32',
302 '*group-id': 'uint32', '*set-vlan-id': 'uint16',
303 '*pop-vlan': 'uint8', '*group-ids': ['uint32'],
304 '*set-eth-src': 'str', '*set-eth-dst': 'str',
305 '*ttl-check': 'uint8' } }
308 # @query-rocker-of-dpa-groups:
310 # Return rocker OF-DPA group information.
314 # @type: group type. If type is not specified, returns
315 # group information for all group types.
317 # Returns: rocker OF-DPA group information
323 # -> { "execute": "query-rocker-of-dpa-groups",
324 # "arguments": { "name": "sw1" } }
325 # <- { "return": [ {"type": 0, "out-pport": 2,
326 # "pport": 2, "vlan-id": 3841,
327 # "pop-vlan": 1, "id": 251723778},
328 # {"type": 0, "out-pport": 0,
329 # "pport": 0, "vlan-id": 3841,
330 # "pop-vlan": 1, "id": 251723776},
331 # {"type": 0, "out-pport": 1,
332 # "pport": 1, "vlan-id": 3840,
333 # "pop-vlan": 1, "id": 251658241},
334 # {"type": 0, "out-pport": 0,
335 # "pport": 0, "vlan-id": 3840,
336 # "pop-vlan": 1, "id": 251658240}
340 { 'command': 'query-rocker-of-dpa-groups',
341 'data': { 'name': 'str', '*type': 'uint8' },
342 'returns': ['RockerOfDpaGroup'] }