Bug 853567 - Request for taking fix for PF shutdown in 802.1Qbh
Summary: Request for taking fix for PF shutdown in 802.1Qbh
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2012-08-31 21:38 UTC by Nishank Trivedi
Modified: 2013-02-21 07:22 UTC (History)
13 users (show)

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.
Clone Of:
Last Closed: 2013-02-21 07:22:52 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

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 -

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

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:
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@cisco.com>
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:



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).


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.


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