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 676015 - set_link <tap> off not working with vhost-net
Summary: set_link <tap> off not working with vhost-net
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michael S. Tsirkin
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-08 15:54 UTC by Michael S. Tsirkin
Modified: 2011-05-19 13:01 UTC (History)
6 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.145.el6
Doc Type: Bug Fix
Doc Text:
Cause: vhost keeps being enabled when qemu NIC link is set to 'off'. Consequence: 'set_link <tap> off' doesn't work when using vhost-net. Fix: disable vhost when 'set_link <tap> off' monitor command is used. Result: 'set_link <tap> off' monitor command now works when using vhost.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:21:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description Michael S. Tsirkin 2011-02-08 15:54:09 UTC
Test Procedure:
-----------------------

    1) Boot up guest with one nic
    2) Ping guest from host
    3) Disable guest link from qemu monitor using set_link <adapter>
    off  and ping guest from host
    4) Re-enable guest link and ping guest from host

Expected results:
-------------------------

   When guest network link is disabled using "set_link"  command from
   qemu monitor, guest network should go down and then host shouldnt be
   pingable from guest.

Actual results:
--------------------

   i tried to disable netowrk link using "set_link",
   When vhost is enabled, network never goes down for guest.

   When vhost disabled, set_link works as expected.

Guest Kernel:
------------------

2.6.32-71.el6.x86_64

Host Kernel:
-----------------------
2.6.37.rc8 on HS22

command used:
-------------------------
/usr/local/bin/qemu-system-x86_64 -name vm1 -monitor
unix:/tmp/monitor-humanmonitor1-20110128-125452-iQor,server,nowait
-serial unix:/tmp/serial-20110128-125452-iQor,server,nowait -drive
file=/tmp/kvm_autotest_root/images/rhel6-64.raw,index=0,if=virtio,cache=none,boot=on
-device virtio-net-pci,netdev=idDUN4bZ,mac=9a:85:7a:7f:c1:94 -netdev
tap,id=idDUN4bZ,vhost=on,ifname=t0-125452-iQor,script=/home/new/autotest/client/tests/kvm/scripts/qemu-ifup,downscript=no
-m 1024 -smp 2 -vnc :0 -monitor stdio

Qemu_monitor commands used:

(qemu) set_link idDUN4bZ off
(qemu) set_link idDUN4bZ on
(qemu) set_link idDUN4bZ off


--Pradeep

Notes:
- set_link on the virtio device works fine.
- link state was tested by ping

Comment 5 Shaolong Hu 2011-02-17 06:55:24 UTC
Verify this bug with qemu-kvm-0.12.1.2-2.146.el6 as following steps:

Test Procedure:
----------------
1.boot guest with vhost=off, ping guest from host.
2.in qemu monitor:
(qemu)set_link hostnet0 off
3.in qemu monitor:
(qemu)set_link hostnet0 on
4.boot guest with vhost=on, then do step 2-3


Actual results:
----------------
Both vhost=on/off works correctly.


Conclusion:
---------------
According to above results, this bug has been resolved.

Comment 7 Eduardo Habkost 2011-05-03 19:33:04 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: vhost keeps being enabled when qemu NIC link is set to 'off'.

Consequence: 'set_link <tap> off' doesn't work when using vhost-net.

Fix: disable vhost when 'set_link <tap> off' monitor command is used.

Result: 'set_link <tap> off' monitor command now works when using vhost.

Comment 8 errata-xmlrpc 2011-05-19 11:21:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 9 errata-xmlrpc 2011-05-19 13:01:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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