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 1372534

Summary: [ppc64le] the mac info of spapr-vlan device shown from hmp won't change after modifying mac inside guest
Product: Red Hat Enterprise Linux 7 Reporter: Zhengtong <zhengtli>
Component: qemu-kvm-rhevAssignee: Laurent Vivier <lvivier>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: dgibson, hannsj_uhl, knoel, lmiksik, lvivier, qzhang, virt-maint, zhengtli
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1375165 (view as bug list) Environment:
Last Closed: 2016-09-14 02:04:20 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:
Bug Depends On: 1375165    
Bug Blocks:    

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 ***