mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: re-situate <bandwidth> element in <interface>
This moves the call to virNetDevBandwidthFormat() in virDomainNetDefFormat() to be called right after the call to virNetDevVPortProfileFormat(), so that a single chunk of that function can be placed inside an if that conditionally calls virDomainActualNetDefContentsFormat() instead (next patch). The re-ordering necessitates modifying a couple of test data files.
This commit is contained in:
parent
7c39214cd4
commit
65487c0fc5
src/conf
tests
qemuhotplugtestdata
qemuxml2argvdata
@ -15599,6 +15599,9 @@ virDomainNetDefFormat(virBufferPtr buf,
|
|||||||
return -1;
|
return -1;
|
||||||
if (virNetDevVPortProfileFormat(def->virtPortProfile, buf) < 0)
|
if (virNetDevVPortProfileFormat(def->virtPortProfile, buf) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
if (virNetDevBandwidthFormat(def->bandwidth, buf) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
virBufferEscapeString(buf, "<script path='%s'/>\n",
|
virBufferEscapeString(buf, "<script path='%s'/>\n",
|
||||||
def->script);
|
def->script);
|
||||||
if (def->ifname &&
|
if (def->ifname &&
|
||||||
@ -15651,9 +15654,6 @@ virDomainNetDefFormat(virBufferPtr buf,
|
|||||||
virDomainNetInterfaceLinkStateTypeToString(def->linkstate));
|
virDomainNetInterfaceLinkStateTypeToString(def->linkstate));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virNetDevBandwidthFormat(def->bandwidth, buf) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
virBufferAdjustIndent(buf, -6);
|
virBufferAdjustIndent(buf, -6);
|
||||||
|
|
||||||
if (virDomainDeviceInfoFormat(buf, &def->info,
|
if (virDomainDeviceInfoFormat(buf, &def->info,
|
||||||
|
@ -59,12 +59,12 @@
|
|||||||
<interface type='network'>
|
<interface type='network'>
|
||||||
<mac address='52:54:00:ea:35:6f'/>
|
<mac address='52:54:00:ea:35:6f'/>
|
||||||
<source network='default'/>
|
<source network='default'/>
|
||||||
<target dev='vnet0'/>
|
|
||||||
<model type='virtio'/>
|
|
||||||
<bandwidth>
|
<bandwidth>
|
||||||
<inbound average='4000' peak='8000' floor='200' burst='1024'/>
|
<inbound average='4000' peak='8000' floor='200' burst='1024'/>
|
||||||
<outbound average='4000' peak='8000' burst='1024'/>
|
<outbound average='4000' peak='8000' burst='1024'/>
|
||||||
</bandwidth>
|
</bandwidth>
|
||||||
|
<target dev='vnet0'/>
|
||||||
|
<model type='virtio'/>
|
||||||
<alias name='net0'/>
|
<alias name='net0'/>
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
@ -59,12 +59,12 @@
|
|||||||
<interface type='network'>
|
<interface type='network'>
|
||||||
<mac address='52:54:00:ea:35:6f'/>
|
<mac address='52:54:00:ea:35:6f'/>
|
||||||
<source network='default'/>
|
<source network='default'/>
|
||||||
<target dev='vnet0'/>
|
|
||||||
<model type='virtio'/>
|
|
||||||
<bandwidth>
|
<bandwidth>
|
||||||
<inbound average='4000' peak='8000' floor='200' burst='1024'/>
|
<inbound average='4000' peak='8000' floor='200' burst='1024'/>
|
||||||
<outbound average='4000' peak='8000' burst='1024'/>
|
<outbound average='4000' peak='8000' burst='1024'/>
|
||||||
</bandwidth>
|
</bandwidth>
|
||||||
|
<target dev='vnet0'/>
|
||||||
|
<model type='virtio'/>
|
||||||
<alias name='net0'/>
|
<alias name='net0'/>
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||||
</interface>
|
</interface>
|
||||||
|
@ -45,11 +45,11 @@
|
|||||||
<interface type='network'>
|
<interface type='network'>
|
||||||
<mac address='52:54:00:24:a5:9f'/>
|
<mac address='52:54:00:24:a5:9f'/>
|
||||||
<source network='default'/>
|
<source network='default'/>
|
||||||
<model type='rtl8139'/>
|
|
||||||
<bandwidth>
|
<bandwidth>
|
||||||
<inbound average='1000' peak='4000' burst='1024'/>
|
<inbound average='1000' peak='4000' burst='1024'/>
|
||||||
<outbound average='128' peak='256' burst='32768'/>
|
<outbound average='128' peak='256' burst='32768'/>
|
||||||
</bandwidth>
|
</bandwidth>
|
||||||
|
<model type='rtl8139'/>
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
|
||||||
</interface>
|
</interface>
|
||||||
<serial type='pty'>
|
<serial type='pty'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user