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.
Description of problem:
While NetworkManager is running and manually assigned a MAC for VF via 'ip' in host, it is fail to change the VF's MAC in guest:
SIOCSIFHWADDR: Cannot assign requested address
Have tested following scenarios:
+----------------------+---------------------------+-------------------------+
| NetworkManager(host) | Have assigned a MAC(host) | Could change MAC(guest) |
+----------------------+---------------------------+-------------------------+
| Running | Yes | No |
| Stopped | Yes | Yes |
| Running | No | Yes |
+----------------------+---------------------------+-------------------------+
NIC's info:
# lspci -s "0000:05:00.0"
05:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
Driver: igb
Version-Release number of selected component (if applicable):
NetworkManager-0.9.9.1-47.git20140326.4dba720.el7.x86_64
iproute-3.10.0-21.el7.x86_64
libgudev1-208-15.el7.x86_64
kernel-3.10.0-193.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Generate VF and bind it to vfio-pci
-------------------------------------------------------------------------------
# modprobe -r igb; modprobe igb max_vfs=1
# echo "0000:05:10.0" > /sys/bus/pci/drivers/igbvf/unbind
# lspci -n -s "05:10.0"
05:10.0 0200: 8086:10ca (rev 01)
# echo "8086 10ca" > /sys/bus/pci/drivers/vfio-pci/new_id
# ls /sys/bus/pci/drivers/vfio-pci/
0000:05:10.0 bind module new_id remove_id uevent unbind
2. Assign MAC address for this VF in host
-------------------------------------------------------------------------------
# ip link show eth1
39: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
link/ether 90:e2:ba:05:63:5e brd ff:ff:ff:ff:ff:ff
vf 0 MAC 32:af:1b:aa:73:2a, spoof checking on, link-state auto
# ip link set dev eth1 vf 0 mac 9a:64:65:66:67:68
# ip link show eth1
39: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
link/ether 90:e2:ba:05:63:5e brd ff:ff:ff:ff:ff:ff
vf 0 MAC 9a:64:65:66:67:68, spoof checking on, link-state auto
3. Launch a VM with the VF
-------------------------------------------------------------------------------
/bin/qemu-kvm \
-name 'virt-tests-vm1' \
-sandbox off \
-M pc \
-nodefaults \
-vga cirrus \
-chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control \
-chardev socket,id=serial_id_serial0,path=/tmp/serial,server,nowait \
-device isa-serial,chardev=serial_id_serial0 \
-chardev socket,id=seabioslog_id_20141104-131355-MVdfeGw9,path=/tmp/seabios,server,nowait \
-device isa-debugcon,chardev=seabioslog_id_20141104-131355-MVdfeGw9,iobase=0x402 \
-device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
-drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/dev/sdd \
-device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04 \
-device vfio-pci,host=05:10.0,id=id_05.10.0,bus=pci.0,addr=05 \
-m 2048 \
-smp 8,cores=4,threads=1,sockets=2 \
-cpu 'Nehalem',+kvm_pv_unhalt \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
-vnc :0 \
-rtc base=utc,clock=host,driftfix=slew \
-boot order=cdn,once=c,menu=off \
-no-kvm-pit-reinjection \
-enable-kvm \
-monitor stdio
4. Change the VF's MAC in guest
-------------------------------------------------------------------------------
# ip link show ens5
ip link show ens5
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 9a:64:65:66:67:68 brd ff:ff:ff:ff:ff:ff
# ifconfig ens5 hw ether 9a:64:65:66:67:72
SIOCSIFHWADDR: Cannot assign requested address
Dmesg log:
guest:
[ 279.555115] igbvf 0000:00:05.0: Link is Up 1000 Mbps Full Duplex
host:
[109334.897002] igb 0000:05:00.0: VF 0 attempted to override administratively set MAC address
Reload the VF driver to resume operations
Actual results:
Fail to change VF's MAC in guest
Expected results:
Could change VF's MAC successfully
Additional info:
Test result of scenario 2:
-------------------------------------------------------------------------------
(host)# service NetworkManager stop
(guest)# ifconfig ens5 hw ether 9a:64:65:66:67:72
(guest)# ip link show ens5
ip link show ens5
2: ens5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
link/ether 9a:64:65:66:67:72 brd ff:ff:ff:ff:ff:ff
Dmesg log:
host:
[109478.663070] igbvf 0000:05:10.1: Link is Up 1000 Mbps Full Duplex
Created attachment 967109[details]
NetworkManager.log
# ip link show
...
9: ens2f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
link/ether 90:e2:ba:05:63:5e brd ff:ff:ff:ff:ff:ff
vf 0 MAC 9a:64:65:66:67:68, spoof checking on, link-state auto
...
11: ens2f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
link/ether 90:e2:ba:05:63:5f brd ff:ff:ff:ff:ff:ff
vf 0 MAC e2:24:f5:eb:d6:a8, spoof checking on, link-state auto
(In reply to Dan Williams from comment #2)
> Could you provide the output of:
>
> journalctl -b -u NetworkManager
>
> when the problem occurs?
Log shows nothing about the PF(ens2f0) when the problem occurs, I attached the whole service log here. And this time, the VF's MAC could not be changed even if NetworkManager service is stopped. So, this issue may just relate to the driver(igb), where has been mentioned in comment 4.
(In reply to Jirka Klimes from comment #4)
> Maybe you didn't set the MAC with 'ip link set dev eth1 vf 0 mac
> 9a:64:65:66:67:68' in the test scenario 2.
I set VF's MAC on host at that time, but I have no ideas about why it did not work in recent test.
Thanks.
(In reply to Xu Han from comment #0)
> Description of problem:
> While NetworkManager is running and manually assigned a MAC for VF via 'ip'
> in host, it is fail to change the VF's MAC in guest:
> SIOCSIFHWADDR: Cannot assign requested address
So yes, as Jiri pointed out; that is the correct and expected behavior.
> Have tested following scenarios:
> +----------------------+---------------------------+-------------------------
> +
> | NetworkManager(host) | Have assigned a MAC(host) | Could change MAC(guest)
> |
> +----------------------+---------------------------+-------------------------
> +
> | Running | Yes | No
> |
> | Stopped | Yes | Yes
> |
> | Running | No | Yes
> |
> +----------------------+---------------------------+-------------------------
(In reply to Xu Han from comment #5)
> And this time, the VF's MAC could not be changed
> even if NetworkManager service is stopped. So, this issue may just relate to
> the driver(igb), where has been mentioned in comment 4.
Same for my tests. For me it looks like following (NetworkManager makes no difference):
+----------------------+---------------------------+-------------------------
+
| NetworkManager(host) | Have assigned a MAC(host) | Could change MAC(guest)
|
+----------------------+---------------------------+-------------------------
+
| Running | Yes | No
|
| Stopped | Yes | No
|
| Running | No | Yes
|
+----------------------+---------------------------+-------------------------
I'm wondering if you can reproduce the faulty behaviour (being able to change VF address despite an address was set in PF? Or can we just close this?
Description of problem: While NetworkManager is running and manually assigned a MAC for VF via 'ip' in host, it is fail to change the VF's MAC in guest: SIOCSIFHWADDR: Cannot assign requested address Have tested following scenarios: +----------------------+---------------------------+-------------------------+ | NetworkManager(host) | Have assigned a MAC(host) | Could change MAC(guest) | +----------------------+---------------------------+-------------------------+ | Running | Yes | No | | Stopped | Yes | Yes | | Running | No | Yes | +----------------------+---------------------------+-------------------------+ NIC's info: # lspci -s "0000:05:00.0" 05:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) Driver: igb Version-Release number of selected component (if applicable): NetworkManager-0.9.9.1-47.git20140326.4dba720.el7.x86_64 iproute-3.10.0-21.el7.x86_64 libgudev1-208-15.el7.x86_64 kernel-3.10.0-193.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Generate VF and bind it to vfio-pci ------------------------------------------------------------------------------- # modprobe -r igb; modprobe igb max_vfs=1 # echo "0000:05:10.0" > /sys/bus/pci/drivers/igbvf/unbind # lspci -n -s "05:10.0" 05:10.0 0200: 8086:10ca (rev 01) # echo "8086 10ca" > /sys/bus/pci/drivers/vfio-pci/new_id # ls /sys/bus/pci/drivers/vfio-pci/ 0000:05:10.0 bind module new_id remove_id uevent unbind 2. Assign MAC address for this VF in host ------------------------------------------------------------------------------- # ip link show eth1 39: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000 link/ether 90:e2:ba:05:63:5e brd ff:ff:ff:ff:ff:ff vf 0 MAC 32:af:1b:aa:73:2a, spoof checking on, link-state auto # ip link set dev eth1 vf 0 mac 9a:64:65:66:67:68 # ip link show eth1 39: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000 link/ether 90:e2:ba:05:63:5e brd ff:ff:ff:ff:ff:ff vf 0 MAC 9a:64:65:66:67:68, spoof checking on, link-state auto 3. Launch a VM with the VF ------------------------------------------------------------------------------- /bin/qemu-kvm \ -name 'virt-tests-vm1' \ -sandbox off \ -M pc \ -nodefaults \ -vga cirrus \ -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=serial_id_serial0,path=/tmp/serial,server,nowait \ -device isa-serial,chardev=serial_id_serial0 \ -chardev socket,id=seabioslog_id_20141104-131355-MVdfeGw9,path=/tmp/seabios,server,nowait \ -device isa-debugcon,chardev=seabioslog_id_20141104-131355-MVdfeGw9,iobase=0x402 \ -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/dev/sdd \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04 \ -device vfio-pci,host=05:10.0,id=id_05.10.0,bus=pci.0,addr=05 \ -m 2048 \ -smp 8,cores=4,threads=1,sockets=2 \ -cpu 'Nehalem',+kvm_pv_unhalt \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=c,menu=off \ -no-kvm-pit-reinjection \ -enable-kvm \ -monitor stdio 4. Change the VF's MAC in guest ------------------------------------------------------------------------------- # ip link show ens5 ip link show ens5 2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 9a:64:65:66:67:68 brd ff:ff:ff:ff:ff:ff # ifconfig ens5 hw ether 9a:64:65:66:67:72 SIOCSIFHWADDR: Cannot assign requested address Dmesg log: guest: [ 279.555115] igbvf 0000:00:05.0: Link is Up 1000 Mbps Full Duplex host: [109334.897002] igb 0000:05:00.0: VF 0 attempted to override administratively set MAC address Reload the VF driver to resume operations Actual results: Fail to change VF's MAC in guest Expected results: Could change VF's MAC successfully Additional info: Test result of scenario 2: ------------------------------------------------------------------------------- (host)# service NetworkManager stop (guest)# ifconfig ens5 hw ether 9a:64:65:66:67:72 (guest)# ip link show ens5 ip link show ens5 2: ens5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000 link/ether 9a:64:65:66:67:72 brd ff:ff:ff:ff:ff:ff Dmesg log: host: [109478.663070] igbvf 0000:05:10.1: Link is Up 1000 Mbps Full Duplex