mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add support for bandwidth filtering on LXC guests
Call virBandwidthEnable after creating the LXC veth, so that any bandwidth controls get applied * src/lxc/lxc_driver.c: Enable bandwidth limiting
This commit is contained in:
parent
6c9e2eb23b
commit
6cc9ee9b18
@ -1166,6 +1166,14 @@ static int lxcSetupInterfaces(virConnectPtr conn,
|
|||||||
if (vethInterfaceUpOrDown(parentVeth, 1) < 0)
|
if (vethInterfaceUpOrDown(parentVeth, 1) < 0)
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
|
||||||
|
if (virBandwidthEnable(virDomainNetGetActualBandwidth(def->nets[i]),
|
||||||
|
def->nets[i]->ifname) < 0) {
|
||||||
|
lxcError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("cannot set bandwidth limits on %s"),
|
||||||
|
def->nets[i]->ifname);
|
||||||
|
goto error_exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (def->nets[i]->filter &&
|
if (def->nets[i]->filter &&
|
||||||
virDomainConfNWFilterInstantiate(conn, def->nets[i]) < 0)
|
virDomainConfNWFilterInstantiate(conn, def->nets[i]) < 0)
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user