Bug 1362340

Summary: Failed to acquire ip address if nic is attahed to downstream port which is attached to pxb-pcie
Product: Red Hat Enterprise Linux 7 Reporter: Yang Yang <yanyang>
Component: qemu-kvm-rhevAssignee: Amnon Ilan <ailan>
Status: CLOSED WONTFIX QA Contact: jingzhao <jinzhao>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.3CC: ailan, chayang, dyuan, jinzhao, juzhang, knoel, marcel, thuth, virt-maint, yalzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-13 13:16:33 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 Yang Yang 2016-08-02 02:23:49 UTC
Description of problem:
I have a pci controller topology in domain configuration, like this
pxb-pcie -- root-port -- upstream-port -- downstream-port. I attach
1 nic with either rtl8139 or e1000 to downstream port. I cannot acquire ip address in guest. Nic works well if using virtio model

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.6.0-15.el7.x86_64
libvirt-2.0.0-3.el7.x86_64
3.10.0-481.el7.x86_64 for guest

How reproducible:
100%

Steps to Reproduce:
1. start vm with pxb-pcie -- root-port -- upstream-port -- downstream-port. 

/usr/libexec/qemu-kvm -machine q35,accel=kvm,usb=off \
-smp 4,maxcpus=4,cores=2,threads=2,sockets=1 \
-cpu SandyBridge,enforce \
-m 2G \
-boot strict=on \
-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
-device pxb-pcie,id=pci.3,bus=pcie.0,bus_nr=10 \
-device ioh3420,bus=pci.3,id=pci.4,slot=1 \
-device x3130-upstream,bus=pci.4,id=pci.5 \
-device xio3130-downstream,bus=pci.5,id=pci.6,chassis=6 \
-netdev tap,id=macvtap0,fd=23 \
-device rtl8139,netdev=macvtap0,id=net0,bus=pci.6,mac=52:54:00:ee:0e:23 23<>/dev/tap23 \
-drive file=/mnt/nfs2/RHEL-7.3-latest.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci,scsi=off,bus=pci.2,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-monitor stdio -spice port=5931,disable-ticketing -boot menu=on \
-qmp tcp:0:6666,server,nowait

2.get ip addr in guest

guest]# ifconfig
enp13s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 52:54:00:ee:0e:26  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 289 overruns 0  carrier 0  collisions 0

guest]# dhclient -d
Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/enp13s0/52:54:00:ee:0e:26
Sending on   LPF/enp13s0/52:54:00:ee:0e:26
Sending on   Socket/fallback
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 8 (xid=0x12f12a51)
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 9 (xid=0x12f12a51)
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 9 (xid=0x12f12a51)
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 10 (xid=0x12f12a51)
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 9 (xid=0x12f12a51)
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 15 (xid=0x12f12a51)
DHCPDISCOVER on enp13s0 to 255.255.255.255 port 67 interval 1 (xid=0x12f12a51)
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

3.

Actual results:
virtio model nic: nic works normally
rtl8139, e1000 model nic: cannot get ip addr

Expected results:
Nic works well 

Additional info:

Comment 1 jingzhao 2016-08-02 02:54:24 UTC
Checked it without pxb-pcie devices, rtl8139 worked correctly

q35 machine type:

   root port -- upstream port --downstream port --rtl8139

pc machine type with rtl8139

Comment 2 jingzhao 2016-08-02 03:24:02 UTC
As QE understanding, rtl8139 should connected through i82801b11-bridge because the nic device is too old for q35 machine type.So I tested it with following scenario, but rtl8139 didn't be found (bug1358665).

   i82801b11-bridge  -- pci bridge --rtl8139

   pxb-pcie  -- i82801b11-bridge  -- pci bridge --rtl8139


Thanks
Jing Zhao

Comment 4 Marcel Apfelbaum 2016-08-02 06:56:24 UTC
(In reply to jingzhao from comment #2)
> As QE understanding, rtl8139 should connected through i82801b11-bridge
> because the nic device is too old for q35 machine type.So I tested it with
> following scenario, but rtl8139 didn't be found (bug1358665).
> 
>    i82801b11-bridge  -- pci bridge --rtl8139
> 
>    pxb-pcie  -- i82801b11-bridge  -- pci bridge --rtl8139
> 
> 
> Thanks
> Jing Zhao

Hi,

Does it happen if the no pxb-pcie: pcie.0 - i82801b11-bridge  -- pci bridge --rtl8139?
Does it happen on i440fx : pci bridge --rtl8139?

Thanks,
Marcel

Comment 5 Marcel Apfelbaum 2016-08-02 06:58:19 UTC
(In reply to Marcel Apfelbaum from comment #4)
> (In reply to jingzhao from comment #2)
> > As QE understanding, rtl8139 should connected through i82801b11-bridge
> > because the nic device is too old for q35 machine type.So I tested it with
> > following scenario, but rtl8139 didn't be found (bug1358665).
> > 
> >    i82801b11-bridge  -- pci bridge --rtl8139
> > 
> >    pxb-pcie  -- i82801b11-bridge  -- pci bridge --rtl8139
> > 
> > 
> > Thanks
> > Jing Zhao
> 
> Hi,
> 
> Does it happen if the no pxb-pcie: pcie.0 - i82801b11-bridge  -- pci bridge
> --rtl8139?
> Does it happen on i440fx : pci bridge --rtl8139?
> 
> Thanks,
> Marcel

Sorry, I didn't see comment #2.
Thanks,
Marcel

Comment 6 Marcel Apfelbaum 2016-08-02 07:03:42 UTC
Hi,

Thank you for your fast response!
Last question, will it happen with virtio-nic-pci?

Thanks,
Marcel

Comment 7 jingzhao 2016-08-02 07:05:12 UTC
(In reply to Marcel Apfelbaum from comment #6)
> Hi,
> 
> Thank you for your fast response!
> Last question, will it happen with virtio-nic-pci?
> 
> Thanks,
> Marcel

Hi Marcel

  Checked it with virtio-net-pci, didn't hit the issue.

Thanks 
Jing Zhao

Comment 8 Yang Yang 2016-08-16 01:59:50 UTC
comment#7 provides the answer, so clear the needinfo flag