Since we use 'tc' to set QoS, or we instruct OVS which then uses
'tc', we have to make sure values are within range acceptable to
'tc'.
Resolves: https://issues.redhat.com/browse/RHEL-45200
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
#include "domain_validate.h"
#include "domain_conf.h"
+#include "netdev_bandwidth_conf.h"
#include "vircgroup.h"
#include "virconftypes.h"
#include "virlog.h"
return -1;
}
+ if (!virNetDevBandwidthValidate(bandwidth)) {
+ return -1;
+ }
+
if (virDomainNetDefValidatePortOptions(macstr, actualType, vport,
virDomainNetGetActualPortOptionsIsolated(net)) < 0) {
return -1;
return -1;
}
+ if (!virNetDevBandwidthValidate(net->bandwidth)) {
+ return -1;
+ }
+
switch (net->type) {
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
if (!virDomainNetIsVirtioModel(net)) {
</define>
<define name="speed">
- <data type="unsignedInt">
+ <data type="unsignedLong">
<param name="pattern">[0-9]+</param>
<param name="minInclusive">1</param>
+ <param name="maxInclusive">18014398509481984</param>
</data>
</define>
<define name="BurstSize">
return -1;
}
+ if (!virNetDevBandwidthValidate(def->bandwidth)) {
+ return -1;
+ }
+
/* we support configs with a single PF defined:
* <pf dev='eth0'/>
* or with a list of netdev names: