]> xenbits.xensource.com Git - libvirt.git/commitdiff
Change the tag name "num_queues" into "queues"
authorOsier Yang <jyang@redhat.com>
Wed, 24 Apr 2013 09:24:13 +0000 (17:24 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 24 Apr 2013 15:36:07 +0000 (23:36 +0800)
Instead of making a choice between the underscore and camelCase, this
simply changes "num_queues" into "queues", which is also consistent
with Michal's multiple queue support for interface.

docs/formatdomain.html.in
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml

index bb75943bc4f33a2152cc39006510932b2dc67bac..4e9665fb3181210c7fa4e04733e1857b1d0ddf52 100644 (file)
       controller.  A "scsi" controller has an optional
       attribute <code>model</code>, which is one of "auto", "buslogic",
       "ibmvscsi", "lsilogic", "lsisas1068", "lsisas1078", "virtio-scsi" or
-      "vmpvscsi".  The attribute <code>num_queues</code>
+      "vmpvscsi".  The attribute <code>queues</code>
       (<span class="since">1.0.5 (QEMU and KVM only)</span>) specifies
       the number of queues for the controller. For best performance, it's
       recommended to specify a value matching the number of vCPUs.  A "usb"
index 3976b82952e7575495a11f5bfbaa845302d99c3f..b1c4c2f8545c3ee2f6a5982e372e342043582e93 100644 (file)
               </attribute>
             </optional>
             <optional>
-              <attribute name="num_queues">
+              <attribute name="queues">
                 <ref name="unsignedInt"/>
               </attribute>
             </optional>
index dc0ecaa1dc3cd7f6702fb3d5d673224f0e0d33cb..253c9ef70a4ddc8953243818d800a892b86838b3 100644 (file)
@@ -5159,7 +5159,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
     char *type = NULL;
     char *idx = NULL;
     char *model = NULL;
-    char *num_queues = NULL;
+    char *queues = NULL;
 
     if (VIR_ALLOC(def) < 0) {
         virReportOOMError();
@@ -5195,10 +5195,10 @@ virDomainControllerDefParseXML(xmlNodePtr node,
         def->model = -1;
     }
 
-    if ((num_queues = virXMLPropString(node, "num_queues"))) {
-        if (virStrToLong_ui(num_queues, NULL, 10, &def->num_queues) < 0) {
+    if ((queues = virXMLPropString(node, "queues"))) {
+        if (virStrToLong_ui(queues, NULL, 10, &def->queues) < 0) {
             virReportError(VIR_ERR_XML_ERROR,
-                           _("Malformed 'num_queues' value '%s'"), num_queues);
+                           _("Malformed 'queues' value '%s'"), queues);
             goto error;
         }
     }
@@ -5280,7 +5280,7 @@ cleanup:
     VIR_FREE(type);
     VIR_FREE(idx);
     VIR_FREE(model);
-    VIR_FREE(num_queues);
+    VIR_FREE(queues);
 
     return def;
 
@@ -13524,8 +13524,8 @@ virDomainControllerDefFormat(virBufferPtr buf,
         virBufferEscapeString(buf, " model='%s'", model);
     }
 
-    if (def->num_queues)
-        virBufferAsprintf(buf, " num_queues='%u'", def->num_queues);
+    if (def->queues)
+        virBufferAsprintf(buf, " queues='%u'", def->queues);
 
     switch (def->type) {
     case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL:
index 5b069b681c06852f8010b0b9cc2f8c46d12703d2..acf18f8b6c35afb8d6f5cc143e4e644abe79239b 100644 (file)
@@ -742,7 +742,7 @@ struct _virDomainControllerDef {
     int type;
     int idx;
     int model; /* -1 == undef */
-    unsigned int num_queues;
+    unsigned int queues;
     union {
         virDomainVirtioSerialOpts vioserial;
     } opts;
index 1e2be0d2bed1d6a0d94d31677a1b87263a9bb0b2..7245b27c185a126aa472900f34f88f6ef9c5ad94 100644 (file)
@@ -3524,11 +3524,11 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
     virBuffer buf = VIR_BUFFER_INITIALIZER;
     int model;
 
-    if (def->num_queues &&
+    if (def->queues &&
         !(def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI &&
           def->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("'num_queues' is only supported by virtio-scsi controller"));
+                       _("'queues' is only supported by virtio-scsi controller"));
         return NULL;
     }
 
@@ -3615,8 +3615,8 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
         goto error;
     }
 
-    if (def->num_queues)
-        virBufferAsprintf(&buf, ",num_queues=%u", def->num_queues);
+    if (def->queues)
+        virBufferAsprintf(&buf, ",num_queues=%u", def->queues);
 
     if (qemuBuildDeviceAddressStr(&buf, &def->info, qemuCaps) < 0)
         goto error;
index dfa9cf183cf505d5e967b6e78a89aa4eb6cb36cb..b3b1289f85c208aa6baf104c603cadb20a0083d3 100644 (file)
@@ -20,7 +20,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
+    <controller type='scsi' index='0' model='virtio-scsi' queues='8'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>