This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2147518 - [RFE][vDPA] VM with vdpa interface can start successfully with different settings from libvirt and vdpa tool
Summary: [RFE][vDPA] VM with vdpa interface can start successfully with different sett...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: lulu@redhat.com
QA Contact: Lei Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-24 07:13 UTC by yalzhang@redhat.com
Modified: 2023-09-22 15:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-22 15:52:23 UTC
Type: Story
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-7298 0 None Migrated None 2023-09-22 15:52:18 UTC
Red Hat Issue Tracker RHELPLAN-140364 0 None None None 2022-11-24 07:24:37 UTC

Description yalzhang@redhat.com 2022-11-24 07:13:08 UTC
Description of problem:
VM with vdpa interface can start successfully with different settings from libvirt and vdpa tool

Version-Release number of selected component (if applicable):
libvirt-8.9.0-2.el9.x86_64
qemu-kvm-7.1.0-5.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
Vdpa tool can set the mac and queue size for the vdpa device. But for vhost-vdpa, when we use libvirt to start the guest, libvirt can set mac and queue size as well. Only the values set by the vdpa tool will be honored in the guest’s os. If the two settings are different, it can be confusing:

1. Start a vm with vdpa interface set as below:
(the vdpa device initialized by vdpa tool was set by "vdpa dev add name vdpa0 mgmtdev pci/$pci_addr mac 00:11:22:33:44:00 max_vqp 8")

# virsh dumpxml vdpa | grep /interface -B7
    <interface type='vdpa'>
      <mac address='52:54:00:9a:aa:31'/>
      <source dev='/dev/vhost-vdpa-0'/>
      <model type='virtio'/>
      <driver queues='4'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
PS: libvirt will generate a random mac address if not it is not set

# virsh domiflist vdpa
 Interface   Type   Source              Model    MAC
--------------------------------------------------------------------
 -           vdpa   /dev/vhost-vdpa-0   virtio   52:54:00:9a:aa:31

Qemu cmd line:
-add-fd set=0,fd=24,opaque=net0-vdpa \
-netdev vhost-vdpa,vhostdev=/dev/fdset/0,queues=4,id=hostnet0 \
-device '{"driver":"virtio-net-pci","mq":true,"vectors":10,"netdev":"hostnet0","id":"net0","mac":"52:54:00:9a:aa:31","bus":"pci.1","addr":"0x0"}' \

# vdpa -jp dev config show
{
    "config": {
        "vdpa0": {
            "mac": "00:11:22:33:44:00",
            "link ": "up",
            "link_announce ": false,
            "max_vq_pairs": 8,
            "mtu": 1500,
            "negotiated_features": [ "CSUM","GUEST_CSUM","HOST_TSO4","HOST_TSO6","STATUS","CTRL_VQ","MQ","CTRL_MAC_ADDR","VERSION_1","ACCESS_PLATFORM" ]
        }
    }
}

2. Start the vm, and check on guest, the value set by vdpa tool will be honored 
# ip l show enp1s0
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:11:22:33:44:00 brd ff:ff:ff:ff:ff:ff

# ethtool -l enp1s0
Channel parameters for enp1s0:
Pre-set maximums:
RX:		n/a
TX:		n/a
Other:		n/a
Combined:	8
Current hardware settings:
RX:		n/a
TX:		n/a
Other:		n/a
Combined:	8

Actual results:
If we set a different queue size or mac address with the vdpa tool for the vdpa interface, the vm can start successfully, but libvirt settings will not be honored. It can be confusing.

Expected results:
The vm fail to start if the settings from libvirt and vdpa tool are different

Additional info:

Comment 2 Lei Yang 2022-11-24 07:56:59 UTC
The setting of mac address also has the same problem. After communicating with Cindy, they belong to the same problem and will be fixed together, so add this comments as a supplementary explanation.

Comment 3 RHEL Program Management 2023-09-22 15:51:08 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-22 15:52:23 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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