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.

Bug 741865

Summary: First ping will lost packages if execute "ping -I eth0(pass-through nic) under pass-through nic and emulation nic
Product: Red Hat Enterprise Linux 6 Reporter: daiwei <wdai>
Component: qemu-kvmAssignee: Alex Williamson <alex.williamson>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 6.2CC: acathrow, juzhang, michen, mkenneth, shuang, tburke, virt-maint
Target Milestone: rc   
Target Release: 6.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-09 10:58:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ping screenshot none

Description daiwei 2011-09-28 08:54:53 UTC
Description of problem:

ping lost packages when assign a pf to guest

Version-Release number of selected component (if applicable):
# uname -r
2.6.32-202.el6.x86_64

#rpm -qa|grep qemu
qemu-kvm-0.12.1.2-2.192.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.unbind a nic form host,such as:
  # lspci |grep Ether
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 05)
03:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
03:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
04:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
04:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
# lspci -n|grep 04:00.1
04:00.1 0200: 8086:1526 (rev 01)
# echo "8086 1526" > /sys/bus/pci/drivers/pci-stub/new_id
# echo 0000:04:00.1 > /sys/bus/pci/devices/0000\:04\:00.1/driver/unbind
# echo 0000:04:00.1 > /sys/bus/pci/drivers/pci-stub/bind

2.boot a guset with two NIC cards,one of them is assigned nic,such as:
/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -name RHEL-Server-6.2-64 -smp 2 -m 2G -uuid `uuidgen` -boot menu=on -drive file=/home/qcow2/RHEL-Server-6.2-64.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native,media=disk,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-blk-pci0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=44:37:E6:5E:A3:F2,bus=pci.0,addr=0x4,id=net0 -drive if=none,media=cdrom,readonly=on,format=raw,id=drive-ide1-0-0 -device ide-drive,drive=drive-ide1-0-0,id=ide1-0-0 -vnc :1 -balloon none -monitor stdio -usb -usbdevice tablet -device pci-assign,host=04:00.1,id=h2guest_nic_1

3.if the assigned nic in guest is eth0 ,execute "ifup eth0;ping -I eth0 www.google.com"
  
Actual results:
 packages lost.

 with an attachment screenshot.

Expected results:
no package lost.

Additional info:
with "-device e1000" or "-device rtl8139" in qemu-kvm command line also have this issue.

with "-net none" in qemu-kvm command line ,pf work well in guest.

Comment 1 daiwei 2011-09-28 08:56:45 UTC
Created attachment 525305 [details]
ping screenshot

Comment 3 juzhang 2011-09-28 09:13:51 UTC
> Additional info:
> with "-device e1000" or "-device rtl8139" in qemu-kvm command line also have
> this issue.
> 
> with "-net none" in qemu-kvm command line ,pf work well in guest.
we just hit package loss when we first ping.second ping,... works well.

Comment 4 Dor Laor 2011-12-08 09:01:49 UTC
Can you issue a single packet ping (ping -c 1) and provide the netdumps and arp tables?

Comment 5 Alex Williamson 2011-12-08 22:53:20 UTC
Is the guest configured to use dhcp or static ip address?

Is there a time factor?  For instance do you get the same result from:

  # ifup eth0; ping -I eth0 www.google.com

as from

  # ifup eth0; sleep 30; ping -I eth0 www.google.com

If you ifdown and re-do the test, do you again experience some packets lost or is it once per boot?

I could imagine emulated devices could drop packets if the bridge forwarding delay is set wrong.  In those cases, what bridge is being used and how is it configured?

I agree with Dor that it would be useful to see tcpdumps.

Comment 6 daiwei 2011-12-09 10:58:15 UTC
At Alex's suggestion,I re-do the test,add "sleep 30" and then no package lost.