Bug 1084477

Summary: [BUG] Quality of service does just apply to protocol "ip" instead of the device
Product: Red Hat Enterprise Linux 6 Reporter: Dan Kenigsberg <danken>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.5CC: asegurap, cpelland, dyuan, herrold, honzhang, jdenemar, jiahu, laine, mzhan, rbalakri, s.kieske
Target Milestone: rcKeywords: Upstream, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.10.2-33.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1084444 Environment:
Last Closed: 2014-10-14 04:21:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1084444    
Bug Blocks: 1084448, 1096806    

Description Dan Kenigsberg 2014-04-04 12:46:31 UTC
+++ This bug was initially created as a clone of Bug #1084444 +++

Description of problem:
when you specify qos settings according to:
http://libvirt.org/formatnetwork.html#elementQoS
this only gets applied for ipv4 traffic and not e.g. for ipv6
traffic or any other non-ip protocol

Version-Release number of selected component (if applicable):
I guess latest master should still not correctly implement this feature

How reproducible:
always

Steps to Reproduce:
1.define network qos as described above
2. test inside the vm, e.g. ftp with ip dual stack (v4 and v6)
3. watch qos being ignored for v6 traffic

Actual results:
qos gets just applied to deprecated ipv4 protcol

Expected results:
qos gets applied to the whole device, regardless which protocol is used

Additional info:
also backported feature in el6 is affected, also qos in downstream products like
ovirt is affected, as it relies on the libvirt functionality.
reproduced with libvirt-0.10.2-29.el6_5.3.x86_64

Comment 3 Jiri Denemark 2014-04-09 09:55:28 UTC
Fixed upstream by v1.2.3-50-gd9de144:

commit d9de144385201d66929bf10e1941e30ba43fd746
Author: Antoni S. Puimedon <asegurap>
Date:   Fri Apr 4 15:39:33 2014 +0200

    QoS: make tc filters match all traffic
    
    Up until now the traffic control filters for the vNIC QoS were
    matching only ip traffic. For egress traffic that was unnoticed
    because the unmatched traffic would just go to the default htb class
    and be shaped anyway. For ingress, though, since the policing of the
    rate is done by the filter itself.
    
    The problem is solved by changing protocol to all and making anything
    match the filter.
    
    Bug-Url: https://bugzilla.redhat.com/1084444
    Signed-off-by: Antoni S. Puimedon <asegurap>
    Signed-off-by: Michal Privoznik <mprivozn>

Comment 4 hongming 2014-04-10 05:32:02 UTC
Can reproduce it in libvirt-0.10.2-29.el6_5.4.x86_64

# virsh net-dumpxml default
<network>
  <name>default</name>
  <uuid>ffc4e572-1c97-43b7-a54b-f3995e9fd3ef</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:85:27:9F'/>
  <bandwidth>
    <inbound average='512' peak='1024' burst='32'/>
    <outbound average='512' peak='1024' burst='32'/>
  </bandwidth>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

# tc -d filter show dev virbr0 parent ffff:
filter protocol ip pref 49152 u32 
filter protocol ip pref 49152 u32 fh 800: ht divisor 1 
filter protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 
  match 00000000/00000000 at 12
 police 0x1 rate 4096Kbit burst 32Kb mtu 64Kb action drop overhead 0b 
ref 1 bind 1

Comment 7 hongming 2014-04-17 06:15:32 UTC
Verify it using libvirt-0.10.2-33.el6.x86_64. The result is expected. Move its status to VERIFIED.


# virsh net-dumpxml default
<network>
  <name>default</name>
  <uuid>ebfbd87d-cf22-483a-bfb7-776add027844</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:30:BC:DF'/>
  <bandwidth>
    <inbound average='512' peak='1024' burst='32'/>
    <outbound average='512' peak='1024' burst='32'/>
  </bandwidth>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
</network>

# tc -d filter show dev virbr0 parent ffff:
filter protocol all pref 49152 u32 
filter protocol all pref 49152 u32 fh 800: ht divisor 1 
filter protocol all pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 
  match 00000000/00000000 at 0
 police 0x1 rate 4096Kbit burst 32Kb mtu 64Kb action drop overhead 0b 
ref 1 bind 1

Comment 10 errata-xmlrpc 2014-10-14 04:21:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1374.html