conf: rename virNetDevSupportBandwidth to virNetDevSupportsBandwidth

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Mores <pmores@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2020-02-17 18:17:23 +01:00
parent b413b03f28
commit 82513048bf
7 changed files with 10 additions and 10 deletions

View File

@ -293,7 +293,7 @@ virDomainClearNetBandwidth(virDomainObjPtr vm)
for (i = 0; i < vm->def->nnets; i++) {
type = virDomainNetGetActualType(vm->def->nets[i]);
if (virDomainNetGetActualBandwidth(vm->def->nets[i]) &&
virNetDevSupportBandwidth(type))
virNetDevSupportsBandwidth(type))
virNetDevBandwidthClear(vm->def->nets[i]->ifname);
}
}

View File

@ -37,7 +37,7 @@ int virNetDevBandwidthFormat(const virNetDevBandwidth *def,
void virDomainClearNetBandwidth(virDomainObjPtr vm)
ATTRIBUTE_NONNULL(1);
static inline bool virNetDevSupportBandwidth(virDomainNetType type)
static inline bool virNetDevSupportsBandwidth(virDomainNetType type)
{
switch (type) {
case VIR_DOMAIN_NET_TYPE_BRIDGE:

View File

@ -3521,7 +3521,7 @@ lxcDomainAttachDeviceNetLive(virLXCDriverPtr driver,
/* Set bandwidth or warn if requested and not supported. */
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportBandwidth(actualType)) {
if (virNetDevSupportsBandwidth(actualType)) {
if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;
@ -3978,7 +3978,7 @@ lxcDomainDetachDeviceNetLive(virDomainObjPtr vm,
/* clear network bandwidth */
if (virDomainNetGetActualBandwidth(detach) &&
virNetDevSupportBandwidth(actualType) &&
virNetDevSupportsBandwidth(actualType) &&
virNetDevBandwidthClear(detach->ifname))
goto cleanup;

View File

@ -622,7 +622,7 @@ virLXCProcessSetupInterfaces(virLXCDriverPtr driver,
/* Set bandwidth or warn if requested and not supported. */
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportBandwidth(type)) {
if (virNetDevSupportsBandwidth(type)) {
if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;

View File

@ -8081,7 +8081,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
/* Set bandwidth or warn if requested and not supported. */
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportBandwidth(actualType)) {
if (virNetDevSupportsBandwidth(actualType)) {
if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;

View File

@ -11220,12 +11220,12 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
if (net) {
actualType = virDomainNetGetActualType(net);
qosSupported = virNetDevSupportBandwidth(actualType);
qosSupported = virNetDevSupportsBandwidth(actualType);
}
if (qosSupported && persistentNet) {
actualType = virDomainNetGetActualType(persistentNet);
qosSupported = virNetDevSupportBandwidth(actualType);
qosSupported = virNetDevSupportsBandwidth(actualType);
}
if (!qosSupported) {

View File

@ -1342,7 +1342,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
/* Set bandwidth or warn if requested and not supported. */
actualBandwidth = virDomainNetGetActualBandwidth(net);
if (actualBandwidth) {
if (virNetDevSupportBandwidth(actualType)) {
if (virNetDevSupportsBandwidth(actualType)) {
if (virNetDevBandwidthSet(net->ifname, actualBandwidth, false,
!virDomainNetTypeSharesHostView(net)) < 0)
goto cleanup;
@ -4582,7 +4582,7 @@ qemuDomainRemoveNetDevice(virQEMUDriverPtr driver,
return -1;
if (virDomainNetGetActualBandwidth(net) &&
virNetDevSupportBandwidth(virDomainNetGetActualType(net)) &&
virNetDevSupportsBandwidth(virDomainNetGetActualType(net)) &&
virNetDevBandwidthClear(net->ifname) < 0)
VIR_WARN("cannot clear bandwidth setting for device : %s",
net->ifname);