• M
    networkAllocateActualDevice: Set QoS for bridgeless networks too · 2996e6be
    Michal Privoznik 提交于
    https://bugzilla.redhat.com/show_bug.cgi?id=1055484
    
    Currently, libvirt's XML schema of network allows QoS to be defined for
    every network even though it has no bridge. For instance:
    
    <network>
        <name>vdsm-no-bridge</name>
        <forward mode='passthrough'>
          <interface dev='em1.10'/>
        </forward>
        <bandwidth>
            <inbound average='1000' peak='5000' burst='1024'/>
            <outbound average='1000' burst='1024'/>
        </bandwidth>
    </network>
    
    The bandwidth limitations can be, however, applied even on such
    networks. In fact, they are going to be applied on the interface that
    will be connected to the network on a domain startup. This approach,
    however, has one limitation. With bridged networks, there are two points
    where QoS can be set: bridge and domain interface. The lower limit of
    the two is enforced then. For instance, if the interface has 10Mbps
    average, but the network only 1Mbps, there's no way for interface to
    transmit packets faster than the 1Mbps limit. With two points this is
    enforced by kernel.  With only one point, we must combine both QoS
    settings into one which is set afterwards. Look at
    virNetDevBandwidthMinimal() and you'll understand immediately what I
    mean.
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    2996e6be
virnetdevbandwidth.h 3.1 KB