mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view'
When setting up QoS for a domain <interface/>, or when reporting its statistics we may need to swap TX/RX values. This is all explained in comment to virDomainNetTypeSharesHostView(). However, this function claims that VIR_DOMAIN_NET_TYPE_ETHERNET also shares the 'host view', meaning the TX/RX values must be swapped. But that's not true. An easy reproducer is to start a domain with two <interface/>-s: one type of network, the other of type ethernet and configure the same <bandwidth/> for both. Reversed setting can then be observed (e.g. via tc). Reported-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
3b2630a96a
commit
0862cb3ce4
@ -29106,9 +29106,9 @@ virDomainNetTypeSharesHostView(const virDomainNetDef *net)
|
||||
virDomainNetType actualType = virDomainNetGetActualType(net);
|
||||
switch (actualType) {
|
||||
case VIR_DOMAIN_NET_TYPE_DIRECT:
|
||||
case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
||||
return true;
|
||||
case VIR_DOMAIN_NET_TYPE_USER:
|
||||
case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
||||
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
||||
case VIR_DOMAIN_NET_TYPE_SERVER:
|
||||
case VIR_DOMAIN_NET_TYPE_CLIENT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user