Bug 853567

Summary: Request for taking fix for PF shutdown in 802.1Qbh
Product: Red Hat Enterprise Linux 6 Reporter: Nishank Trivedi <nistrive>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, ajia, dyasny, dyuan, jdenemar, laine, mzhan, rwu, stbechto, veillard, weizhan, yupzhang, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.1-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: When a virtual guest had a network interface that was connected to an SR-IOV Virtual Function (VF) using macvtap "passthrough" mode, and from there to an 802.1Qbh-capable switch, shutting down the guest would cause the Physical Function (PF) associated with the SR-IOV device to be taken offline. Here is an example of the type of interface that would be affected: <interface type='direct'> <source dev='eth7' mode='passthrough'/> <virtualport type='802.1Qbh'> <parameters profileid='test'/> </virtualport> </interface> Consequence: If the PF was being used by the host for its own network connectivity, host networking would be disabled whenever the guest was shut down (or when the guest's network device was detached) Fix: This problem was caused by libvirt erroneously taking down the PF instead of the VF. That bit of code has been fixed. Result: When a guest using macvtap in passthrough mode to connect to an 802.1Qbh-capable switch is shut down, the PF associated with the VF used by the macvtap connection now continues to work.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:22:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nishank Trivedi 2012-08-31 21:38:36 UTC
Description of problem:
This is a feature request to take a fix for libvirt-0.9.10 package. 
More details can be found here -
http://www.redhat.com/archives/libvir-list/2012-August/msg00462.html
http://www.redhat.com/archives/libvir-list/2012-August/msg01954.html

Version-Release number of selected component (if applicable):
0.9.10

How reproducible:
For a 802.1Qbh device in SR-IOV mode, create one VF with pci passthrough. Shutdown VF and PF interface will go down too. 

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Jiri Denemark 2012-09-01 20:33:01 UTC
Fixed upstream by v0.10.0-17-g3044433:

commit 3044433f29eacd57f98360e688634b42f1d48d56
Author: Nishank Trivedi <nistrive>
Date:   Thu Aug 30 15:27:27 2012 -0400

    Fix issue of PF brought down if VF is 8021.Qbh and pci passthrough
    
    If a 8021.Qbh network device supports SRIOV and its VF is being used
    in pci passthrough mode, when the guest is shutdown or destroyed, the
    PF inteface is also brought down. qemuDomainHostdevNetConfigRestore()
    finds out the PF for provided hostdev (which is VF) and passes it to
    virNetDevPortProfileDisassociate() as linkdev. Later, linkdev gets passed
    to virNetDevSetOnline() where the interface is brought down by clearing
    IFF_UP flag.
    
    Bringing down a PF, when only VF is being brought down is not expected
    behavior. This patch adds a check so that virNetDevSetOnline() is called
    only for PF and not if device is a VF.

Comment 3 Daniel Veillard 2012-09-03 03:04:43 UTC
This is available in libvirt-0.10.1-1.el6 build which can be
found for testing in my yum repo at:

  http://veillard.com/libvirt/6.4/

Daniel

Comment 5 zhe peng 2012-09-03 06:11:09 UTC
Hi Nishank:

   I'm QE of libvirt, we don't have 802.1Qbh-capable hardware switch in our SR-IOV now, would you help to verify this bug? build can get with Daniel's link,very thanks in advance.

Comment 6 Nishank Trivedi 2012-10-29 21:56:34 UTC
Hi Zhe,

Apologies for delaying this. I used following packages and from this p.o.v., things work as expected (i.e. PF stays up after shutdown).

libvirt-client-0.10.2-1.el6.x86_64
libvirt-python-0.10.2-1.el6.x86_64
libvirt-devel-0.10.2-1.el6.x86_64
libvirt-debuginfo-0.10.2-1.el6.x86_64
libvirt-0.10.2-1.el6.x86_64
qemu-kvm-0.12.1.2-2.305.el6.x86_64
qemu-img-0.12.1.2-2.305.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.305.el6.x86_64

Thanks for taking this patch and spending cycles on it.

Comment 7 zhe peng 2012-10-30 02:21:34 UTC
Very thanks Nishank's help, per comment 6 , move to verify.

Comment 8 errata-xmlrpc 2013-02-21 07:22:52 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, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHSA-2013-0276.html