Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 676015 - set_link <tap> off not working with vhost-net
set_link <tap> off not working with vhost-net
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Michael S. Tsirkin
Virtualization Bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-08 10:54 EST by Michael S. Tsirkin
Modified: 2011-05-19 09:01 EDT (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:21:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Description Michael S. Tsirkin 2011-02-08 10:54:09 EST
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 01:55:24 EST
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 15:33:04 EDT
    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 07:21:36 EDT
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 09:01:32 EDT
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.