]> git.proxmox.com Git - mirror_qemu.git/blob - qapi/rocker.json
Merge tag 'pull-aspeed-20240201' of https://github.com/legoater/qemu into staging
[mirror_qemu.git] / qapi / rocker.json
1 # -*- Mode: Python -*-
2
3 ##
4 # = Rocker switch device
5 ##
6
7 ##
8 # @RockerSwitch:
9 #
10 # Rocker switch information.
11 #
12 # @name: switch name
13 #
14 # @id: switch ID
15 #
16 # @ports: number of front-panel ports
17 #
18 # Since: 2.4
19 ##
20 { 'struct': 'RockerSwitch',
21 'data': { 'name': 'str', 'id': 'uint64', 'ports': 'uint32' } }
22
23 ##
24 # @query-rocker:
25 #
26 # Return rocker switch information.
27 #
28 # Returns: @Rocker information
29 #
30 # Since: 2.4
31 #
32 # Example:
33 #
34 # -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
35 # <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
36 #
37 ##
38 { 'command': 'query-rocker',
39 'data': { 'name': 'str' },
40 'returns': 'RockerSwitch' }
41
42 ##
43 # @RockerPortDuplex:
44 #
45 # An eumeration of port duplex states.
46 #
47 # @half: half duplex
48 #
49 # @full: full duplex
50 #
51 # Since: 2.4
52 ##
53 { 'enum': 'RockerPortDuplex', 'data': [ 'half', 'full' ] }
54
55 ##
56 # @RockerPortAutoneg:
57 #
58 # An eumeration of port autoneg states.
59 #
60 # @off: autoneg is off
61 #
62 # @on: autoneg is on
63 #
64 # Since: 2.4
65 ##
66 { 'enum': 'RockerPortAutoneg', 'data': [ 'off', 'on' ] }
67
68 ##
69 # @RockerPort:
70 #
71 # Rocker switch port information.
72 #
73 # @name: port name
74 #
75 # @enabled: port is enabled for I/O
76 #
77 # @link-up: physical link is UP on port
78 #
79 # @speed: port link speed in Mbps
80 #
81 # @duplex: port link duplex
82 #
83 # @autoneg: port link autoneg
84 #
85 # Since: 2.4
86 ##
87 { 'struct': 'RockerPort',
88 'data': { 'name': 'str', 'enabled': 'bool', 'link-up': 'bool',
89 'speed': 'uint32', 'duplex': 'RockerPortDuplex',
90 'autoneg': 'RockerPortAutoneg' } }
91
92 ##
93 # @query-rocker-ports:
94 #
95 # Return rocker switch port information.
96 #
97 # Returns: a list of @RockerPort information
98 #
99 # Since: 2.4
100 #
101 # Example:
102 #
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 # ]}
109 #
110 ##
111 { 'command': 'query-rocker-ports',
112 'data': { 'name': 'str' },
113 'returns': ['RockerPort'] }
114
115 ##
116 # @RockerOfDpaFlowKey:
117 #
118 # Rocker switch OF-DPA flow key
119 #
120 # @priority: key priority, 0 being lowest priority
121 #
122 # @tbl-id: flow table ID
123 #
124 # @in-pport: physical input port
125 #
126 # @tunnel-id: tunnel ID
127 #
128 # @vlan-id: VLAN ID
129 #
130 # @eth-type: Ethernet header type
131 #
132 # @eth-src: Ethernet header source MAC address
133 #
134 # @eth-dst: Ethernet header destination MAC address
135 #
136 # @ip-proto: IP Header protocol field
137 #
138 # @ip-tos: IP header TOS field
139 #
140 # @ip-dst: IP header destination address
141 #
142 # Note: optional members may or may not appear in the flow key
143 # depending if they're relevant to the flow key.
144 #
145 # Since: 2.4
146 ##
147 { 'struct': 'RockerOfDpaFlowKey',
148 'data' : { 'priority': 'uint32', 'tbl-id': 'uint32', '*in-pport': 'uint32',
149 '*tunnel-id': 'uint32', '*vlan-id': 'uint16',
150 '*eth-type': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
151 '*ip-proto': 'uint8', '*ip-tos': 'uint8', '*ip-dst': 'str' } }
152
153 ##
154 # @RockerOfDpaFlowMask:
155 #
156 # Rocker switch OF-DPA flow mask
157 #
158 # @in-pport: physical input port
159 #
160 # @tunnel-id: tunnel ID
161 #
162 # @vlan-id: VLAN ID
163 #
164 # @eth-src: Ethernet header source MAC address
165 #
166 # @eth-dst: Ethernet header destination MAC address
167 #
168 # @ip-proto: IP Header protocol field
169 #
170 # @ip-tos: IP header TOS field
171 #
172 # Note: optional members may or may not appear in the flow mask
173 # depending if they're relevant to the flow mask.
174 #
175 # Since: 2.4
176 ##
177 { 'struct': 'RockerOfDpaFlowMask',
178 'data' : { '*in-pport': 'uint32', '*tunnel-id': 'uint32',
179 '*vlan-id': 'uint16', '*eth-src': 'str', '*eth-dst': 'str',
180 '*ip-proto': 'uint8', '*ip-tos': 'uint8' } }
181
182 ##
183 # @RockerOfDpaFlowAction:
184 #
185 # Rocker switch OF-DPA flow action
186 #
187 # @goto-tbl: next table ID
188 #
189 # @group-id: group ID
190 #
191 # @tunnel-lport: tunnel logical port ID
192 #
193 # @vlan-id: VLAN ID
194 #
195 # @new-vlan-id: new VLAN ID
196 #
197 # @out-pport: physical output port
198 #
199 # Note: optional members may or may not appear in the flow action
200 # depending if they're relevant to the flow action.
201 #
202 # Since: 2.4
203 ##
204 { 'struct': 'RockerOfDpaFlowAction',
205 'data' : { '*goto-tbl': 'uint32', '*group-id': 'uint32',
206 '*tunnel-lport': 'uint32', '*vlan-id': 'uint16',
207 '*new-vlan-id': 'uint16', '*out-pport': 'uint32' } }
208
209 ##
210 # @RockerOfDpaFlow:
211 #
212 # Rocker switch OF-DPA flow
213 #
214 # @cookie: flow unique cookie ID
215 #
216 # @hits: count of matches (hits) on flow
217 #
218 # @key: flow key
219 #
220 # @mask: flow mask
221 #
222 # @action: flow action
223 #
224 # Since: 2.4
225 ##
226 { 'struct': 'RockerOfDpaFlow',
227 'data': { 'cookie': 'uint64', 'hits': 'uint64', 'key': 'RockerOfDpaFlowKey',
228 'mask': 'RockerOfDpaFlowMask', 'action': 'RockerOfDpaFlowAction' } }
229
230 ##
231 # @query-rocker-of-dpa-flows:
232 #
233 # Return rocker OF-DPA flow information.
234 #
235 # @name: switch name
236 #
237 # @tbl-id: flow table ID. If tbl-id is not specified, returns
238 # flow information for all tables.
239 #
240 # Returns: rocker OF-DPA flow information
241 #
242 # Since: 2.4
243 #
244 # Example:
245 #
246 # -> { "execute": "query-rocker-of-dpa-flows",
247 # "arguments": { "name": "sw1" } }
248 # <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
249 # "hits": 138,
250 # "cookie": 0,
251 # "action": {"goto-tbl": 10},
252 # "mask": {"in-pport": 4294901760}
253 # },
254 # {...more...},
255 # ]}
256 #
257 ##
258 { 'command': 'query-rocker-of-dpa-flows',
259 'data': { 'name': 'str', '*tbl-id': 'uint32' },
260 'returns': ['RockerOfDpaFlow'] }
261
262 ##
263 # @RockerOfDpaGroup:
264 #
265 # Rocker switch OF-DPA group
266 #
267 # @id: group unique ID
268 #
269 # @type: group type
270 #
271 # @vlan-id: VLAN ID
272 #
273 # @pport: physical port number
274 #
275 # @index: group index, unique with group type
276 #
277 # @out-pport: output physical port number
278 #
279 # @group-id: next group ID
280 #
281 # @set-vlan-id: VLAN ID to set
282 #
283 # @pop-vlan: pop VLAN headr from packet
284 #
285 # @group-ids: list of next group IDs
286 #
287 # @set-eth-src: set source MAC address in Ethernet header
288 #
289 # @set-eth-dst: set destination MAC address in Ethernet header
290 #
291 # @ttl-check: perform TTL check
292 #
293 # Note: optional members may or may not appear in the group depending
294 # if they're relevant to the group type.
295 #
296 # Since: 2.4
297 ##
298 { 'struct': 'RockerOfDpaGroup',
299 'data': { 'id': 'uint32', 'type': 'uint8', '*vlan-id': 'uint16',
300 '*pport': 'uint32', '*index': 'uint32', '*out-pport': 'uint32',
301 '*group-id': 'uint32', '*set-vlan-id': 'uint16',
302 '*pop-vlan': 'uint8', '*group-ids': ['uint32'],
303 '*set-eth-src': 'str', '*set-eth-dst': 'str',
304 '*ttl-check': 'uint8' } }
305
306 ##
307 # @query-rocker-of-dpa-groups:
308 #
309 # Return rocker OF-DPA group information.
310 #
311 # @name: switch name
312 #
313 # @type: group type. If type is not specified, returns
314 # group information for all group types.
315 #
316 # Returns: rocker OF-DPA group information
317 #
318 # Since: 2.4
319 #
320 # Example:
321 #
322 # -> { "execute": "query-rocker-of-dpa-groups",
323 # "arguments": { "name": "sw1" } }
324 # <- { "return": [ {"type": 0, "out-pport": 2,
325 # "pport": 2, "vlan-id": 3841,
326 # "pop-vlan": 1, "id": 251723778},
327 # {"type": 0, "out-pport": 0,
328 # "pport": 0, "vlan-id": 3841,
329 # "pop-vlan": 1, "id": 251723776},
330 # {"type": 0, "out-pport": 1,
331 # "pport": 1, "vlan-id": 3840,
332 # "pop-vlan": 1, "id": 251658241},
333 # {"type": 0, "out-pport": 0,
334 # "pport": 0, "vlan-id": 3840,
335 # "pop-vlan": 1, "id": 251658240}
336 # ]}
337 #
338 ##
339 { 'command': 'query-rocker-of-dpa-groups',
340 'data': { 'name': 'str', '*type': 'uint8' },
341 'returns': ['RockerOfDpaGroup'] }