On 4/2/20 5:03 AM, Laurent Vivier wrote:
This new command shows internal status of a VirtQueue.
(vrings and indexes).

Signed-off-by: Laurent Vivier <lviv...@redhat.com>
---
  hw/virtio/virtio-stub.c |  6 +++
  hw/virtio/virtio.c      | 35 +++++++++++++++
  qapi/virtio.json        | 98 +++++++++++++++++++++++++++++++++++++++++
  3 files changed, 139 insertions(+)


+++ b/qapi/virtio.json
@@ -117,3 +117,101 @@
    'data': { 'path': 'str' },
    'returns': 'VirtioStatus'
  }
+
+##
+# @VirtQueueStatus:
+#
+# Status of a VirtQueue
+#
+# @queue_index: VirtQueue queue_index

More naming conventions. queue-index. I'll quit pointing them out, but the whole series should be scrubbed.


+# Example:
+#
+# -> { "execute": "virtio-queue-status",
+#      "arguments": {
+#          "path": "/machine/peripheral-anon/device[3]/virtio-backend",
+#          "queue": 0
+#      }
+#   }
+# <- { "return": {
+#      "signalled_used": 373,

Of course, if you fix the naming conventions, you'll also need to regenerate the examples.

Hmm, it's a bit annoying that our current QMP output is non-deterministic. It doesn't affect correctness, but it would be nice if our output was in the same order as our declaration. Not the fault of your patch, nor something you need to worry about.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to