Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
boot guest with rtl8139/e1000 nic device, then set_link the rtl8139/e1000 network card's status to 'off' and check it status is 'down' in guest, but after reboot guest, it will return back to 'up' status.
BTW, both the rtl8139 and e1000 nic device have this issue, but virtio_net has no such issue.
Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-351.el6.x86_64
qemu-kvm-0.12.1.2-2.348.el6.x86_64
guest info:
rhel6.4 64bit
kernel-2.6.32-351.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1.boot guest with rtl8139/e1000/virtio_net nic device.
eg:...-netdev tap,id=hostnet1,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet1,id=e1000-net-pci1,mac=34:40:B5:9E:D3:91,bus=pci.0,addr=0x5
2.check nic status in guest(default: 'up').
# cat /sys/class/net/eth0/operstate
up
3.change nic status in monitor.
(qemu) set_link $network_device off
4.re-check nic status in guest.
# cat /sys/class/net/eth0/operstate
down
5.reboot guest and recheck nic status.
# cat /sys/class/net/eth0/operstate
Actual results:
after step 5, the rtl8139/e1000 network card's status return back to 'up', but the virtio_net nic is still 'down' status.
# cat /sys/class/net/eth0/operstate
up <---------for rtl8139/e1000
Expected results:
the rtl8139/e1000 network card's status is still 'down' status after reboot guest.
# cat /sys/class/net/eth0/operstate
down
Additional info:
This problem can also be reproduced by this steps:
1. boot a guest with e1000 / rtl8139 nic (pause guest by -S option)
2. set link down by monitor
(qemu) set_link ... off
3. continue guest
(qemu) c
4. check link status in guest
I tried with latest guest kernel (3.6.10-2.fc17.x86_64, driver updated) & latest upstream qemu
+ virtio-net:
after reboot, link status is down in guest, network is unavailable.
+ rtl8139:
after reboot, link status is unexpectedly up in guest, network is unavailable.
+e1000: (guest reboot will reset qemu setup)
after reboot, link will be reset to be up, and network is (unexpectedly) available.
(In reply to comment #3)
> I tried with latest guest kernel (3.6.10-2.fc17.x86_64, driver updated) &
> latest upstream qemu
>
> + virtio-net:
> after reboot, link status is down in guest, network is unavailable.
> + rtl8139:
> after reboot, link status is unexpectedly up in guest, network is
> unavailable.
> +e1000: (guest reboot will reset qemu setup)
> after reboot, link will be reset to be up, and network is (unexpectedly)
> available.
Need to check whether the link status were preserved during reset for 8139. For e1000, I remember that there's a patch to preserved the link status, need to check whether the link status negotiation emulation patch has side effect of this.
Thanks
For e1000, link auto-negotiation emulation will always set link up in e1000_autoneg_timer, it's a regression bug, can be fixed by this patch:
diff --git a/hw/e1000.c b/hw/e1000.c
index 5537ad2..a3b602e 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -164,6 +164,10 @@ static void
set_phy_ctrl(E1000State *s, int index, uint16_t val)
{
if ((val & MII_CR_AUTO_NEG_EN) && (val & MII_CR_RESTART_AUTO_NEG)) {
+ if (s->nic->nc.link_down) {
+ s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
+ return;
+ }
s->nic->nc.link_down = true;
e1000_link_down(s);
s->phy_reg[PHY_STATUS] &= ~MII_SR_AUTONEG_COMPLETE;
Hi Ademar,
> +e1000: (guest reboot will reset qemu setup)
> after reboot, link will be reset to be up, and network is (unexpectedly)
> available.
^^^ rhel6 kernel & qemu-kvm-rhel6 also got this result
So if Admin limits VM user network by set_link, user can smartly re-got network by a reboot
For e1000, it is a regression introduced in RHEL6.4 by this commit:
so I agree to bug this bz in 6.4 by exception+
| commit ebfdba95f6fd2719dda11f4ebd9267af270e921b
| Author: Xiao Wang <jasowang>
| Date: Fri Aug 10 09:03:49 2012 -0300
|
| e1000: link auto-negotiation emulation
(In reply to comment #7)
> For e1000, it is a regression introduced in RHEL6.4 by this commit:
> so I agree to bug this bz in 6.4 by exception+
>
> | commit ebfdba95f6fd2719dda11f4ebd9267af270e921b
> | Author: Xiao Wang <jasowang>
> | Date: Fri Aug 10 09:03:49 2012 -0300
> |
> | e1000: link auto-negotiation emulation
Thanks for the details. Adding Regression keyword and requesting the blocker flag.
Verify this bug on qemu-kvm-0.12.1.2-2.349.el6.x86_64 with the comment #0 steps.
host info:
kernel-2.6.32-351.el6.x86_64
qemu-kvm-0.12.1.2-2.349.el6.x86_64
guest info:
kernel-2.6.32-351.el6.x86_64
steps:
the same to comment #0
Results:
after step 5, the rtl8139/e1000 network card's status is still 'down' status after reboot guest, and the network is unavailable.
Base on above, this issue has been fixed correctly.
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/RHBA-2013-0527.html