Bug 1372534 - [ppc64le] the mac info of spapr-vlan device shown from hmp won't change after modifying mac inside guest
Summary: [ppc64le] the mac info of spapr-vlan device shown from hmp won't change after...
Keywords:
Status: CLOSED DUPLICATE of bug 1371419
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: ppc64le
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laurent Vivier
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1375165
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-02 03:10 UTC by Zhengtong
Modified: 2017-02-08 12:55 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1375165 (view as bug list)
Environment:
Last Closed: 2016-09-14 02:04:20 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Zhengtong 2016-09-02 03:10:24 UTC
Description of problem:
In rhel7.3 guest. After modifying the mac address of spap-vlan nic device inside guest. the MAC shown from hmp won't change 

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.6.0-22.el7
Host kernel:3.10.0-496.el7.ppc64le
Guest kernel:3.10.0-497.el7.ppc64le

How reproducible:
4/4

Steps to Reproduce:
1.boot up guest with spapr-vlan nic devices
#qemu-kvm ... \
    -device spapr-vlan,mac=9a:e9:ea:eb:ec:ee,id=net1,netdev=hostnet1  \
    -netdev tap,id=hostnet1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
...

2.Inside guest. link the nic device and modify the MAC address
[root@localhost ~]# ifconfig
...

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 9a:e9:ea:eb:ec:ee  txqueuelen 1000  (Ethernet)
        RX packets 37  bytes 5261 (5.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 22  
...
[root@localhost ~]# ifconfig eth1 down
[root@localhost ~]# ip link set eth1 address 9a:e8:66:55:44:33
[root@localhost ~]# ifconfig eth1
eth1: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 9a:e8:66:55:44:33  txqueuelen 1000  (Ethernet)
        RX packets 37  bytes 5261 (5.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 22  

3.Check the MAC address by "info network" cmd in hmp
(qemu) info network

Actual results:
(qemu) info network 
net0: index=0,type=nic,model=spapr-vlan,macaddr=9a:e9:ea:eb:ec:ed
 \ hostnet0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
net1: index=0,type=nic,model=spapr-vlan,macaddr=9a:e9:ea:eb:ec:ee
 \ hostnet1: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown

Expected results:
The MAC shown in hmp should follow the value inside guest

Additional info:

Works well with virtio_net device

***guest boot cmd:
/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pseries  \
    -nodefaults  \
    -vga std  \
    -device pci-ohci,id=usb1,bus=pci.0,addr=03 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=04 \
    -drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/RHEL-Server-7.3-ppc64le-virtio-scsi.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device spapr-vlan,mac=9a:e9:ea:eb:ec:ed,id=net0,netdev=hostnet0  \
    -netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
    -device spapr-vlan,mac=9a:e9:ea:eb:ec:ee,id=net1,netdev=hostnet1  \
    -netdev tap,id=hostnet1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
    -qmp tcp:0:66666,server,nowait \
    -m 8192  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -device usb-kbd \
    -device usb-mouse \
    -vnc :0  \
    -rtc base=utc,clock=host  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -monitor stdio

Comment 2 David Gibson 2016-09-12 00:43:40 UTC
Can you please retest with qemu-kvm-rhev-2.6.0-24.el7?

We think the fix for bug 1371419 which was included there will fix this one as well.

Comment 3 Zhengtong 2016-09-12 02:10:09 UTC
Tested with qemu-kvm-rhev-2.6.0-24.el7 . The issue still exist.

[root@ibm-p8-kvm-02-qe liuzt]# /usr/libexec/qemu-kvm --version
QEMU emulator version 2.6.0 (qemu-kvm-rhev-2.6.0-24.el7), Copyright (c) 2003-2008 Fabrice Bellard


Step 1. 
(qemu) info network 
vlan1: index=0,type=nic,model=spapr-vlan,macaddr=9a:04:05:06:07:03
 \ idTRaYjL: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown

Step 2.
[root@dhcp71-161 ~]# ifconfig eth0 down
[root@dhcp71-161 ~]# ip link set eth0 address 9a:02:02:02:02:02
[root@dhcp71-161 ~]# ifconfig eth0 up
[root@dhcp71-161 ~]# dhclient eth0
[root@dhcp71-161 ~]# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.16.71.24  netmask 255.255.248.0  broadcast 10.16.71.255
        inet6 fe80::9802:2ff:fe02:202  prefixlen 64  scopeid 0x20<link>
        inet6 2620:52:0:1040:9804:5ff:fe06:703  prefixlen 64  scopeid 0x0<global>
        ether 9a:02:02:02:02:02  txqueuelen 1000  (Ethernet)
        RX packets 11450  bytes 807116 (788.1 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 260  bytes 33884 (33.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 22  


Step 3.
(qemu) info network
vlan1: index=0,type=nic,model=spapr-vlan,macaddr=9a:04:05:06:07:03
 \ idTRaYjL: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown

Comment 4 Laurent Vivier 2016-09-12 06:58:02 UTC
This qemu fix works only with a RHEL6.8 guest, because the kernel uses the new h_call; We need to backport the same kernel patch to RHEL 7.3 kernel too.

Comment 5 Laurent Vivier 2016-09-12 11:01:20 UTC
As the feature is now missing in the guest kernel, I'm going to reset this BZ to POST and clone it for the kernel.

Comment 9 David Gibson 2016-09-14 02:04:20 UTC
Actually, wait.  bug 1375165 is the real (guest side) bug here.  The only qemu component of this bug *is* a duplicate of 1371419.  Closing.

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


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