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);
}
}
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:
/* 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;
/* clear network bandwidth */
if (virDomainNetGetActualBandwidth(detach) &&
- virNetDevSupportBandwidth(actualType) &&
+ virNetDevSupportsBandwidth(actualType) &&
virNetDevBandwidthClear(detach->ifname))
goto cleanup;
/* 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;
/* 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;
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) {
/* 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;
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);