Update version for v9.0.0-rc3 release
[qemu/kevin.git] / qapi / rocker.json
blob5635cf174fdc68eab2be207f5958209a1405f752
1 # -*- Mode: Python -*-
2 # vim: filetype=python
4 ##
5 # = Rocker switch device
6 ##
8 ##
9 # @RockerSwitch:
11 # Rocker switch information.
13 # @name: switch name
15 # @id: switch ID
17 # @ports: number of front-panel ports
19 # Since: 2.4
21 { 'struct': 'RockerSwitch',
22   'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
25 # @query-rocker:
27 # Return rocker switch information.
29 # Returns: @Rocker information
31 # Since: 2.4
33 # Example:
35 #     -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
36 #     <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
38 { 'command': 'query-rocker',
39   'data': { 'name': 'str' },
40   'returns': 'RockerSwitch' }
43 # @RockerPortDuplex:
45 # An eumeration of port duplex states.
47 # @half: half duplex
49 # @full: full duplex
51 # Since: 2.4
53 { 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
56 # @RockerPortAutoneg:
58 # An eumeration of port autoneg states.
60 # @off: autoneg is off
62 # @on: autoneg is on
64 # Since: 2.4
66 { 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
69 # @RockerPort:
71 # Rocker switch port information.
73 # @name: port name
75 # @enabled: port is enabled for I/O
77 # @link-up: physical link is UP on port
79 # @speed: port link speed in Mbps
81 # @duplex: port link duplex
83 # @autoneg: port link autoneg
85 # Since: 2.4
87 { 'struct': 'RockerPort',
88   'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
89             'speed': 'uint32', 'duplex': 'RockerPortDuplex',
90             'autoneg': 'RockerPortAutoneg' } }
93 # @query-rocker-ports:
95 # Return rocker switch port information.
97 # Returns: a list of @RockerPort information
99 # Since: 2.4
101 # Example:
103 #     -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
104 #     <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
105 #                       "autoneg": "off", "link-up": true, "speed": 10000},
106 #                      {"duplex": "full", "enabled": true, "name": "sw1.2",
107 #                       "autoneg": "off", "link-up": true, "speed": 10000}
108 #        ]}
110 { 'command': 'query-rocker-ports',
111   'data': { 'name': 'str' },
112   'returns': ['RockerPort'] }
115 # @RockerOfDpaFlowKey:
117 # Rocker switch OF-DPA flow key
119 # @priority: key priority, 0 being lowest priority
121 # @tbl-id: flow table ID
123 # @in-pport: physical input port
125 # @tunnel-id: tunnel ID
127 # @vlan-id: VLAN ID
129 # @eth-type: Ethernet header type
131 # @eth-src: Ethernet header source MAC address
133 # @eth-dst: Ethernet header destination MAC address
135 # @ip-proto: IP Header protocol field
137 # @ip-tos: IP header TOS field
139 # @ip-dst: IP header destination address
141 # Note: optional members may or may not appear in the flow key
142 #     depending if they're relevant to the flow key.
144 # Since: 2.4
146 { 'struct': 'RockerOfDpaFlowKey',
147   'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
148              '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
149              '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
150              '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
153 # @RockerOfDpaFlowMask:
155 # Rocker switch OF-DPA flow mask
157 # @in-pport: physical input port
159 # @tunnel-id: tunnel ID
161 # @vlan-id: VLAN ID
163 # @eth-src: Ethernet header source MAC address
165 # @eth-dst: Ethernet header destination MAC address
167 # @ip-proto: IP Header protocol field
169 # @ip-tos: IP header TOS field
171 # Note: optional members may or may not appear in the flow mask
172 #     depending if they're relevant to the flow mask.
174 # Since: 2.4
176 { 'struct': 'RockerOfDpaFlowMask',
177   'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
178              '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
179              '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
182 # @RockerOfDpaFlowAction:
184 # Rocker switch OF-DPA flow action
186 # @goto-tbl: next table ID
188 # @group-id: group ID
190 # @tunnel-lport: tunnel logical port ID
192 # @vlan-id: VLAN ID
194 # @new-vlan-id: new VLAN ID
196 # @out-pport: physical output port
198 # Note: optional members may or may not appear in the flow action
199 #     depending if they're relevant to the flow action.
201 # Since: 2.4
203 { 'struct': 'RockerOfDpaFlowAction',
204   'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
205              '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
206              '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
209 # @RockerOfDpaFlow:
211 # Rocker switch OF-DPA flow
213 # @cookie: flow unique cookie ID
215 # @hits: count of matches (hits) on flow
217 # @key: flow key
219 # @mask: flow mask
221 # @action: flow action
223 # Since: 2.4
225 { 'struct': 'RockerOfDpaFlow',
226   'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
227             'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
230 # @query-rocker-of-dpa-flows:
232 # Return rocker OF-DPA flow information.
234 # @name: switch name
236 # @tbl-id: flow table ID.  If tbl-id is not specified, returns flow
237 #     information for all tables.
239 # Returns: rocker OF-DPA flow information
241 # Since: 2.4
243 # Example:
245 #     -> { "execute": "query-rocker-of-dpa-flows",
246 #          "arguments": { "name": "sw1" } }
247 #     <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
248 #                       "hits": 138,
249 #                       "cookie": 0,
250 #                       "action": {"goto-tbl": 10},
251 #                       "mask": {"in-pport": 4294901760}
252 #                      },
253 #                      {...more...},
254 #        ]}
256 { 'command': 'query-rocker-of-dpa-flows',
257   'data': { 'name': 'str', '*tbl-id': 'uint32' },
258   'returns': ['RockerOfDpaFlow'] }
261 # @RockerOfDpaGroup:
263 # Rocker switch OF-DPA group
265 # @id: group unique ID
267 # @type: group type
269 # @vlan-id: VLAN ID
271 # @pport: physical port number
273 # @index: group index, unique with group type
275 # @out-pport: output physical port number
277 # @group-id: next group ID
279 # @set-vlan-id: VLAN ID to set
281 # @pop-vlan: pop VLAN headr from packet
283 # @group-ids: list of next group IDs
285 # @set-eth-src: set source MAC address in Ethernet header
287 # @set-eth-dst: set destination MAC address in Ethernet header
289 # @ttl-check: perform TTL check
291 # Note: optional members may or may not appear in the group depending
292 #     if they're relevant to the group type.
294 # Since: 2.4
296 { 'struct': 'RockerOfDpaGroup',
297   'data': { 'id': 'uint32',  'type': 'uint8', '*vlan-id': 'uint16',
298             '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32',
299             '*group-id': 'uint32', '*set-vlan-id': 'uint16',
300             '*pop-vlan': 'uint8', '*group-ids': ['uint32'],
301             '*set-eth-src': 'str', '*set-eth-dst': 'str',
302             '*ttl-check': 'uint8' } }
305 # @query-rocker-of-dpa-groups:
307 # Return rocker OF-DPA group information.
309 # @name: switch name
311 # @type: group type.  If type is not specified, returns group
312 #     information for all group types.
314 # Returns: rocker OF-DPA group information
316 # Since: 2.4
318 # Example:
320 #     -> { "execute": "query-rocker-of-dpa-groups",
321 #          "arguments": { "name": "sw1" } }
322 #     <- { "return": [ {"type": 0, "out-pport": 2,
323 #                       "pport": 2, "vlan-id": 3841,
324 #                       "pop-vlan": 1, "id": 251723778},
325 #                      {"type": 0, "out-pport": 0,
326 #                       "pport": 0, "vlan-id": 3841,
327 #                       "pop-vlan": 1, "id": 251723776},
328 #                      {"type": 0, "out-pport": 1,
329 #                       "pport": 1, "vlan-id": 3840,
330 #                       "pop-vlan": 1, "id": 251658241},
331 #                      {"type": 0, "out-pport": 0,
332 #                       "pport": 0, "vlan-id": 3840,
333 #                       "pop-vlan": 1, "id": 251658240}
334 #        ]}
336 { 'command': 'query-rocker-of-dpa-groups',
337   'data': { 'name': 'str', '*type': 'uint8' },
338   'returns': ['RockerOfDpaGroup'] }