RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2175449 - Networking receive/transmit_bytes metrics values are swapped for pre-created macvtap device
Summary: Networking receive/transmit_bytes metrics values are swapped for pre-created ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-05 00:43 UTC by yalzhang@redhat.com
Modified: 2023-11-07 09:39 UTC (History)
4 users (show)

Fixed In Version: libvirt-9.2.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:30:47 UTC
Type: Bug
Target Upstream Version: 9.2.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker LIBVIRTAT-14115 0 None None None 2023-04-20 03:16:33 UTC
Red Hat Issue Tracker RHELPLAN-150673 0 None None None 2023-03-05 00:44:02 UTC
Red Hat Product Errata RHSA-2023:6409 0 None None None 2023-11-07 08:31:33 UTC

Description yalzhang@redhat.com 2023-03-05 00:43:09 UTC
Description of problem:
The statistics from domifstat will be reversed for pre-created macvtap devices

Version-Release number of selected component (if applicable):
libvirt-9.0.0-7.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. create a macvtap device:
# ip link add link eno1 name mymacvtap0 address 52:54:00:11:11:11  type macvtap mode bridge
# ip link set mymacvtap0 up

2. start a vm with ethernet interface with managed=no and use this macvtap device:
# virsh dumpxml rhel --xpath //interface
<interface type="ethernet">
  <mac address="52:54:00:11:11:11"/>
  <target dev="mymacvtap0" managed="no"/>
  <model type="virtio"/>
  <alias name="net0"/>  
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

3. start the vm and download a file, then check the statistics both on guest and host:
[on guest]# ip -s l show enp1s0
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:11:11:11 brd ff:ff:ff:ff:ff:ff
    RX:  bytes packets errors dropped  missed   mcast          
     517301139  347222      0     135       0       0
    TX:  bytes packets errors dropped carrier collsns          
      18240947  224857      0       0       0       0

[on host]# virsh domifstat rhel mymacvtap0   ---- > it's not guest view, which is reversed
mymacvtap0 rx_bytes 18241853    
mymacvtap0 rx_packets 224868
mymacvtap0 rx_errs 0
mymacvtap0 rx_drop 0
mymacvtap0 tx_bytes 517337187
mymacvtap0 tx_packets 347773
mymacvtap0 tx_errs 0
mymacvtap0 tx_drop 51

Actual results:
The statistics from domifstat will be reversed for pre-created macvtap devices

Expected results:
The statistics get from the domifstat should show the guest view

Additional info:

Comment 1 Michal Privoznik 2023-03-06 09:48:45 UTC
Patches posted on the list:

https://listman.redhat.com/archives/libvir-list/2023-March/238400.html

Comment 2 Michal Privoznik 2023-03-06 11:24:19 UTC
Merged upstream as:

928e741172 src: Document virDomainInterfaceStats() limitation
172dd3d9f7 conf: Make macvtap ethernet share host view

v9.1.0-57-g928e741172

Comment 3 yalzhang@redhat.com 2023-04-04 16:14:23 UTC
Test on libvirt-9.2.0-1.el9.x86_64 with the same steps in comment 0, the issue is fixed.
From the guest:
# ip -s l show enp1s0
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:11:11:11 brd ff:ff:ff:ff:ff:ff
    RX:  bytes packets errors dropped  missed   mcast           
     625194377   95305      0       0       0       0 
    TX:  bytes packets errors dropped carrier collsns           
       5499660   83251      0       0       0       0

From the host:
# virsh domifstat avocado-vt-vm1 mymacvtap0
mymacvtap0 rx_bytes 625204985
mymacvtap0 rx_packets 95421
mymacvtap0 rx_errs 0
mymacvtap0 rx_drop 0
mymacvtap0 tx_bytes 5500954
mymacvtap0 tx_packets 83266
mymacvtap0 tx_errs 0
mymacvtap0 tx_drop 0

Comment 7 yalzhang@redhat.com 2023-05-19 02:22:21 UTC
Test on libvirt-9.3.0-2.el9.x86_64, the result is as expected.

Comment 9 errata-xmlrpc 2023-11-07 08:30:47 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 (Moderate: libvirt security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2023:6409


Note You need to log in before you can comment on or make changes to this bug.