target/s390x: Fix typo
[qemu/ar7.git] / qapi / rocker.json
blob97e2b8376f950024239615b956df5e3a1574e268
1 ##
2 # = Rocker switch device
3 ##
5 ##
6 # @RockerSwitch:
8 # Rocker switch information.
10 # @name: switch name
12 # @id: switch ID
14 # @ports: number of front-panel ports
16 # Since: 2.4
18 { 'struct': 'RockerSwitch',
19   'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
22 # @query-rocker:
24 # Return rocker switch information.
26 # Returns: @Rocker information
28 # Since: 2.4
30 # Example:
32 # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
33 # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
36 { 'command': 'query-rocker',
37   'data': { 'name': 'str' },
38   'returns': 'RockerSwitch' }
41 # @RockerPortDuplex:
43 # An eumeration of port duplex states.
45 # @half: half duplex
47 # @full: full duplex
49 # Since: 2.4
51 { 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
54 # @RockerPortAutoneg:
56 # An eumeration of port autoneg states.
58 # @off: autoneg is off
60 # @on: autoneg is on
62 # Since: 2.4
64 { 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
67 # @RockerPort:
69 # Rocker switch port information.
71 # @name: port name
73 # @enabled: port is enabled for I/O
75 # @link-up: physical link is UP on port
77 # @speed: port link speed in Mbps
79 # @duplex: port link duplex
81 # @autoneg: port link autoneg
83 # Since: 2.4
85 { 'struct': 'RockerPort',
86   'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
87             'speed': 'uint32', 'duplex': 'RockerPortDuplex',
88             'autoneg': 'RockerPortAutoneg' } }
91 # @query-rocker-ports:
93 # Return rocker switch port information.
95 # Returns: a list of @RockerPort information
97 # Since: 2.4
99 # Example:
101 # -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
102 # <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
103 #                   "autoneg": "off", "link-up": true, "speed": 10000},
104 #                  {"duplex": "full", "enabled": true, "name": "sw1.2",
105 #                   "autoneg": "off", "link-up": true, "speed": 10000}
106 #    ]}
109 { 'command': 'query-rocker-ports',
110   'data': { 'name': 'str' },
111   'returns': ['RockerPort'] }
114 # @RockerOfDpaFlowKey:
116 # Rocker switch OF-DPA flow key
118 # @priority: key priority, 0 being lowest priority
120 # @tbl-id: flow table ID
122 # @in-pport: #optional physical input port
124 # @tunnel-id: #optional tunnel ID
126 # @vlan-id: #optional VLAN ID
128 # @eth-type: #optional Ethernet header type
130 # @eth-src: #optional Ethernet header source MAC address
132 # @eth-dst: #optional Ethernet header destination MAC address
134 # @ip-proto: #optional IP Header protocol field
136 # @ip-tos: #optional IP header TOS field
138 # @ip-dst: #optional IP header destination address
140 # Note: fields are marked #optional to indicate that they may or may not
141 # appear in the flow key depending if they're relevant to the flow key.
143 # Since: 2.4
145 { 'struct': 'RockerOfDpaFlowKey',
146   'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
147              '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
148              '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
149              '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
152 # @RockerOfDpaFlowMask:
154 # Rocker switch OF-DPA flow mask
156 # @in-pport: #optional physical input port
158 # @tunnel-id: #optional tunnel ID
160 # @vlan-id: #optional VLAN ID
162 # @eth-src: #optional Ethernet header source MAC address
164 # @eth-dst: #optional Ethernet header destination MAC address
166 # @ip-proto: #optional IP Header protocol field
168 # @ip-tos: #optional IP header TOS field
170 # Note: fields are marked #optional to indicate that they may or may not
171 # appear in the flow mask depending if they're relevant to the flow mask.
173 # Since: 2.4
175 { 'struct': 'RockerOfDpaFlowMask',
176   'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
177              '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
178              '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
181 # @RockerOfDpaFlowAction:
183 # Rocker switch OF-DPA flow action
185 # @goto-tbl: #optional next table ID
187 # @group-id: #optional group ID
189 # @tunnel-lport: #optional tunnel logical port ID
191 # @vlan-id: #optional VLAN ID
193 # @new-vlan-id: #optional new VLAN ID
195 # @out-pport: #optional physical output port
197 # Note: fields are marked #optional to indicate that they may or may not
198 # appear in the flow action depending if they're relevant to the flow action.
200 # Since: 2.4
202 { 'struct': 'RockerOfDpaFlowAction',
203   'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
204              '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
205              '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
208 # @RockerOfDpaFlow:
210 # Rocker switch OF-DPA flow
212 # @cookie: flow unique cookie ID
214 # @hits: count of matches (hits) on flow
216 # @key: flow key
218 # @mask: flow mask
220 # @action: flow action
222 # Since: 2.4
224 { 'struct': 'RockerOfDpaFlow',
225   'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
226             'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
229 # @query-rocker-of-dpa-flows:
231 # Return rocker OF-DPA flow information.
233 # @name: switch name
235 # @tbl-id: #optional flow table ID.  If tbl-id is not specified, returns
236 # flow information for all tables.
238 # Returns: rocker OF-DPA flow information
240 # Since: 2.4
242 # Example:
244 # -> { "execute": "query-rocker-of-dpa-flows",
245 #      "arguments": { "name": "sw1" } }
246 # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
247 #                   "hits": 138,
248 #                   "cookie": 0,
249 #                   "action": {"goto-tbl": 10},
250 #                   "mask": {"in-pport": 4294901760}
251 #                  },
252 #                  {...more...},
253 #    ]}
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: #optional VLAN ID
271 # @pport: #optional physical port number
273 # @index: #optional group index, unique with group type
275 # @out-pport: #optional output physical port number
277 # @group-id: #optional next group ID
279 # @set-vlan-id: #optional VLAN ID to set
281 # @pop-vlan: #optional pop VLAN headr from packet
283 # @group-ids: #optional list of next group IDs
285 # @set-eth-src: #optional set source MAC address in Ethernet header
287 # @set-eth-dst: #optional set destination MAC address in Ethernet header
289 # @ttl-check: #optional perform TTL check
291 # Note: fields are marked #optional to indicate that they may or may not
292 # appear in the group depending 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: #optional group type.  If type is not specified, returns
312 # group 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 #    ]}
337 { 'command': 'query-rocker-of-dpa-groups',
338   'data': { 'name': 'str', '*type': 'uint8' },
339   'returns': ['RockerOfDpaGroup'] }