Bug 678488

Summary: guest can't get ip when add vf as an interface to macvtap
Product: Red Hat Enterprise Linux 6 Reporter: Chao Yang <chayang>
Component: qemu-kvmAssignee: Alex Williamson <alex.williamson>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: akong, dwu, juzhang, michen, mkenneth, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-28 21:08:51 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:
Bug Depends On:    
Bug Blocks: 580954    

Description Chao Yang 2011-02-18 08:29:24 UTC
Description of problem:


Version-Release number of selected component (if applicable):
# rpm -qa|grep qemu-kvm
qemu-kvm-debuginfo-0.12.1.2-2.144.el6.x86_64
qemu-kvm-0.12.1.2-2.144.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.144.el6.x86_64


# uname -r
2.6.32-115.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.generate vfs, vf can get ip
# ethtool -i eth34
driver: igbvf
version: 1.0.8-k0
firmware-version: N/A
bus-info: 0000:03:10.1

# ifconfig eth34
eth34     Link encap:Ethernet  HWaddr 2A:F0:30:E2:6B:32  
          inet addr:10.66.73.75  Bcast:10.66.73.255  Mask:255.255.254.0
          inet6 addr: fe80::28f0:30ff:fee2:6b32/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3215 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:283516 (276.8 KiB)  TX bytes:6713 (6.5 KiB)

2.create a macvtap device
ip link add link eth34 dev macvtap0 type macvtap
ip link set macvtap0 address 2A:F0:30:32:0B:12 up
ip link show macvtap0
22: macvtap0@eth34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 500
    link/ether 2a:f0:30:32:0b:12 brd ff:ff:ff:ff:ff:ff


3.boot a guest with vhost=on
# /usr/libexec/qemu-kvm -M rhel6.1.0 -enable-kvm -m 4096 -smp 4 -cpu qemu64,+sse2,+x2apic -name rhel6.1 -uuid e81ebb81-cd9f-4a1e-a10f-c2cfd8d1b4ba -rtc base=localtime -boot c -drive file=/root/images-rhel6.1/rhel6.1-ide.qcow2,if=none,id=drive-ide0-0-0,media=disk,format=qcow2,cache=none -device ide-drive,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on,fd=5 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=2A:F0:30:32:0B:12 5<>/dev/tap22 -usb -device usb-tablet,id=input0 -vnc :1 -monitor stdio -balloon none
  
Actual results:
In guest, nic can't get ip, hope following message may help:

Feb 19 00:00:03 localhost kernel: IPv6 over IPv4 tunneling driver
Feb 19 00:00:03 localhost kernel: sit0: Disabled Privacy Extensions
Feb 19 00:00:03 localhost kernel: lo: Disabled Privacy Extensions
Feb 19 00:00:07 localhost dhclient: DHCPDISCOVER on eth5022 to 255.255.255.255 port 67 interval 3
Feb 19 00:00:10 localhost dhclient: DHCPDISCOVER on eth5022 to 255.255.255.255 port 67 interval 7
Feb 19 00:00:17 localhost dhclient: DHCPDISCOVER on eth5022 to 255.255.255.255 port 67 interval 16
Feb 19 00:00:33 localhost dhclient: DHCPDISCOVER on eth5022 to 255.255.255.255 port 67 interval 14
Feb 19 00:00:47 localhost dhclient: DHCPDISCOVER on eth5022 to 255.255.255.255 port 67 interval 18
Feb 19 00:01:05 localhost dhclient: DHCPDISCOVER on eth5022 to 255.255.255.255 port 67 interval 3
Feb 19 00:01:08 localhost dhclient: No DHCPOFFERS received.


Expected results:
In guest, nic can get ip.

Additional info:
If add pf as an interface to macvtap, guest can get ip successfully.

Comment 2 Alex Williamson 2011-02-24 14:55:11 UTC
Is the PF eth device that's associated with the VF (03:00.1) ifconfig'd up?

Comment 4 Alex Williamson 2011-02-28 21:08:51 UTC
82576 VFs have vlan and mac spoof filtering and the driver always configures it on.  We cannot support macvtap on VFs until the driver provides a way to de-configure this security feature.

*** This bug has been marked as a duplicate of bug 655013 ***