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 2082540 - Update device to update the rss setting report success but no changes in xml
Summary: Update device to update the rss setting report success but no changes in xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-06 11:43 UTC by yalzhang@redhat.com
Modified: 2023-01-18 14:44 UTC (History)
9 users (show)

Fixed In Version: libvirt-8.4.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:04:39 UTC
Type: Bug
Target Upstream Version: 8.4.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker LIBVIRTAT-13251 0 None None None 2022-07-28 01:58:31 UTC
Red Hat Issue Tracker RHELPLAN-121266 0 None None None 2022-05-06 11:52:35 UTC
Red Hat Product Errata RHSA-2022:8003 0 None None None 2022-11-15 10:05:06 UTC

Description yalzhang@redhat.com 2022-05-06 11:43:05 UTC
Description of problem:
Update device to update the rss setting report success but no changes in xml

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

How reproducible:
100%

Steps to Reproduce:
1. Start vm with rss setting:
# virsh dumpxml rhel | grep /interface -B12
<interface type='network'>
      <mac address='52:54:00:1b:ba:6a'/>
      <source network='default' portid='88587315-7b1e-4364-82f9-4a6856bfae49' bridge='virbr0'/>
      <target dev='vnet14'/>
      <model type='virtio'/>
      <driver queues='4' rss='on' rss_hash_report='on'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </interface>

2. update the interface rss setting:
# cat test.xml
<interface type='network'>
      <mac address='52:54:00:1b:ba:6a'/>
      <source network='default' portid='88587315-7b1e-4364-82f9-4a6856bfae49' bridge='virbr0'/>
      <target dev='vnet14'/>
      <model type='virtio'/>
      <driver queues='4' rss='off' rss_hash_report='off'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </interface>
# virsh update-device rhel test.xml
Device updated successfully

# virsh dumpxml rhel | grep /interface -B12
<interface type='network'>
      <mac address='52:54:00:1b:ba:6a'/>
      <source network='default' portid='88587315-7b1e-4364-82f9-4a6856bfae49' bridge='virbr0'/>
      <target dev='vnet14'/>
      <model type='virtio'/>
      <driver queues='4' rss='on' rss_hash_report='on'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </interface>

Actual results:
Update device to update the rss setting report success, but failed to update the rss setting

Expected results:
The update should be forbid like:
error: Failed to update device from test.xml
error: Operation not supported: cannot modify virtio network device driver attributes

Additional info:

Comment 1 Michal Privoznik 2022-05-23 15:23:53 UTC
Patch proposed on the list:

https://listman.redhat.com/archives/libvir-list/2022-May/231715.html

Comment 2 Michal Privoznik 2022-05-24 07:03:02 UTC
Merged upstream as:

commit 2df6849d78f10cd47df9bc2a938583d933cb9e69
Author:     Michal Prívozník <mprivozn>
AuthorDate: Mon May 23 17:17:02 2022 +0200
Commit:     Michal Prívozník <mprivozn>
CommitDate: Tue May 24 09:02:00 2022 +0200

    qemu_hotplug: Deny changing @rss and @rss_hash_report attributes of virtio vNICs
    
    We have virDomainUpdateDeviceFlags() API that allows changing of
    some attributes of a device whilst domain is still running (e.g.
    setting different QoS, link state change on vNICs). But only very
    limited set of attributes can be changed and we have to check
    whether user isn't trying to sneak in a change that's not
    allowed. Well, in case of a virtio vNIC we forgot to check for
    @rss and @rss_hash_report attributes of <driver/>.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2082540
    Signed-off-by: Michal Privoznik <mprivozn>
    Reviewed-by: Laine Stump <laine>

v8.3.0-234-g2df6849d78

Comment 4 yalzhang@redhat.com 2022-05-30 02:57:56 UTC
Retest the scenarios in comment 0 with v8.4.0-rc1-12-ga5d9c70621, the bug is fixed.

# virsh update-device rhel test.xml
error: Failed to update device from test.xml
error: Operation not supported: cannot modify virtio network device driver attributes

Comment 7 yalzhang@redhat.com 2022-06-13 02:03:26 UTC
Test on libvirt-8.4.0-1.el9.x86_64

1. start vm with below interface settings:
# virsh dumpxml test | grep /interface -B8
    <interface type='network'>
      <mac address='52:54:00:a7:92:8e'/>
      <source network='default' portid='347fde93-490e-4432-89cd-8d3b7bf71518' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver queues='4'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

2.
# cat update1.xml 
    <interface type='network'>
      <mac address='52:54:00:a7:92:8e'/>
      <source network='default' portid='347fde93-490e-4432-89cd-8d3b7bf71518' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver queues='4' rss='on' rss_hash_report='on'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

# virsh update-device test update1.xml
error: Failed to update device from update1.xml
error: Operation not supported: cannot modify virtio network device driver attributes

3. 
# cat update2.xml 
    <interface type='network'>
      <mac address='52:54:00:a7:92:8e'/>
      <source network='default' portid='347fde93-490e-4432-89cd-8d3b7bf71518' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver queues='4' rss='off' rss_hash_report='off'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>
# virsh update-device test update2.xml
error: Failed to update device from update2.xml
error: Operation not supported: cannot modify virtio network device driver attributes

4. start vm with below settings:
# virsh dumpxml test | grep /interface -B8
    <interface type='network'>
      <mac address='52:54:00:a7:92:8e'/>
      <source network='default' portid='2077f928-d787-4315-ba35-43f43a36ef35' bridge='virbr0'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <driver queues='4' rss='on' rss_hash_report='on'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

# cat update3.xml 
    <interface type='network'>
      <mac address='52:54:00:a7:92:8e'/>
      <source network='default' portid='347fde93-490e-4432-89cd-8d3b7bf71518' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <driver queues='4' rss='off'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

# virsh update-device test update3.xml 
error: Failed to update device from update3.xml
error: Operation not supported: cannot modify virtio network device driver attributes

# virsh dumpxml test | grep /interface -B8
    <interface type='network'>
      <mac address='52:54:00:a7:92:8e'/>
      <source network='default' portid='2077f928-d787-4315-ba35-43f43a36ef35' bridge='virbr0'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <driver queues='4' rss='on' rss_hash_report='on'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

the result is as expected.

Comment 9 errata-xmlrpc 2022-11-15 10:04:39 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 (Low: 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-2022:8003

Comment 10 Mizar Zhou 2023-01-18 14:44:41 UTC
Thanks for the page, is there any solutions for changing queue of <driver/> ?


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