On 05/29/2015 08:01 AM, sfel...@gmail.com wrote: > From: Scott Feldman <sfel...@gmail.com> > > v3: > > Address review comments from Stefan Hajnoczi: > > - Add missing hw/net/rocker/qmp-norocker.c file. > - Add missing curly brackets to a for loop > > v2: > > Address review comments from Stefan Hajnoczi: > > - Add missing qapi/rocker.json file. > - Use PRIx64 for print uint64 value > - when CONFIG_ROCKER is not defined, build qmp-norocker.o stub using > hw/net/Makefile.objs rather than in the top-level Makefile.target > > Change qapi/rocker.json "since 2.3" comments to "since 2.4", since qmp/hmp > support didn't get into 2.3. > > v1:
Again, version info belongs after ---. > > Add QMP/HMP support for rocker devices. This is mostly for debugging purposes > to see inside the device's tables and port configurations. Some examples: > > (qemu) info rocker sw1 > name: sw1 > id: 0x0000013512005452 > ports: 4 > > (qemu) info rocker-ports sw1 > ena/ speed/ auto > port link duplex neg? > sw1.1 up 10G FD No > sw1.2 up 10G FD No > sw1.3 !ena 10G FD No > sw1.4 !ena 10G FD No > > +++ b/qapi/rocker.json > +## > +# @rocker: This comment... > +# > +# Return rocker switch information. > +# > +# Returns: @Rocker information > +# > +# Since: 2.4 > +## > +{ 'command': 'query-rocker', ...does not match this command name. > + > +## > +# @rocker-ports: > +# > +# Return rocker switch information. > +# > +# Returns: @Rocker information > +# > +# Since: 2.4 > +## > +{ 'command': 'query-rocker-ports', and again. > + > +## > +# @rocker-of-dpa-flows: > +# > +# Return rocker OF-DPA flow information. > +# > +# @name: switch name > +# > +# @tbl-id: #optional flow table ID. If tbl-id is not specified, returns > +# flow information for all tables. > +# > +# Returns: @Rocker OF-DPA flow information > +# > +# Since: 2.4 > +## > +{ 'command': 'query-rocker-of-dpa-flows', And again. > +## > +# @rocker-of-dpa-groups: > +# > +# Return rocker OF-DPA group information. > +# > +# @name: switch name > +# > +# @type: #optional group type. If type is not specified, returns > +# group information for all group types. > +# > +# Returns: @Rocker OF-DPA group information > +# > +# Since: 2.4 > +## > +{ 'command': 'query-rocker-of-dpa-groups', and again. > +++ b/qmp-commands.hx > +SQMP > +Show rocker switch ports > +------------------------ > + > +Arguments: > + > +- "name": switch name > + > +Example: > + > +-> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } } > +<- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1", > "autoneg": "off", "link-up": true, "speed": 10000}, > + {"duplex": "full", "enabled": true, "name": "sw1.2", > "autoneg": "off", "link-up": true, "speed": 10000} You might want to wrap these long lines. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature