[Bug 217558] In KVM guest with VF of X710 NIC passthrough, the mac address of VF is inconsistent with it in host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=217558

--- Comment #4 from Chen, Fan (farrah.chen@xxxxxxxxx) ---
Add mateusz.palczewski@xxxxxxxxx and mateusz.palczewski@xxxxxxxxx

-----Original Message-----
From: bugzilla-daemon@xxxxxxxxxx <bugzilla-daemon@xxxxxxxxxx> 
Sent: Wednesday, June 21, 2023 9:26 PM
To: kvm@xxxxxxxxxxxxxxx
Subject: [Bug 217558] In KVM guest with VF of X710 NIC passthrough, the mac
address of VF is inconsistent with it in host

https://bugzilla.kernel.org/show_bug.cgi?id=217558

--- Comment #3 from Chen, Fan (farrah.chen@xxxxxxxxx) --- We bisect and found
the first bad commit, I don't understand if this commit is intend to do so?
Make the mac of VF in VM different from it in host? We think they use the same
mac is better for users, with the same mac, the mac of VF is known for us
before creating VM, then we can get IP address of the VF interface in VM from
mac without using vnc or other UI or serial port. How can we make the mac of VF
keep the same in host and VM now?

commit ceb29474bbbc377e11be3a70589a0005305e4fc3
Author: Sylwester Dziedziuch <sylwesterx.dziedziuch@xxxxxxxxx>
Date:   Thu Mar 30 10:00:22 2023 -0700

    i40e: Add support for VF to specify its primary MAC address

    Currently in the i40e driver there is no implementation of different
    MAC address handling depending on whether it is a legacy or primary.
    Introduce new checks for VF to be able to specify its primary MAC
    address based on the VIRTCHNL_ETHER_ADDR_PRIMARY type.

    Primary MAC address are treated differently compared to legacy
    ones in a scenario where:
    1. If a unicast MAC is being added and it's specified as
    VIRTCHNL_ETHER_ADDR_PRIMARY, then replace the current
    default_lan_addr.addr.
    2. If a unicast MAC is being deleted and it's type
    is specified as VIRTCHNL_ETHER_ADDR_PRIMARY, then zero the
    hw_lan_addr.addr.

Actually, we also tried to use "ip link set ens28f0 vf 0 mac <mac>" to fix a
mac for VF, it works in host, but we create VM with this VF passthrough, it has
a high probability failed to assign the mac to VF in vm, and the interface
failed yo get IP either, error dmesg in VM: 
[    3.037955] iavf 0000:00:04.0: Invalid MAC address 00:00:00:00:00:00, using
random
[    3.039523] iavf 0000:00:04.0: Multiqueue Enabled: Queue pair count = 4
[    3.040466] iavf 0000:00:04.0: MAC address: 3a:38:ca:66:f9:65
[    3.040980] iavf 0000:00:04.0: GRO is enabled
[    3.042240] iavf 0000:00:05.0: Multiqueue Enabled: Queue pair count = 4
[    3.043232] iavf 0000:00:05.0: MAC address: 36:91:96:9d:5d:05
[    3.043770] iavf 0000:00:05.0: GRO is enabled
[    3.044401] iavf 0000:00:04.0 ens4: renamed from eth0
[    3.049199] iavf 0000:00:05.0 ens5: renamed from eth1
[    3.072576] ppdev: user-space parallel port driver
[    3.094077] XFS (vda2): Mounting V5 Filesystem
8736b23e-ddde-4cca-9166-2623d2e57e5a
[    3.102245] XFS (vda2): Ending clean mount
[    3.550242] iavf 0000:00:04.0: Failed to add MAC filter, error IAVF_ERR_NVM
[    3.617176] iavf 0000:00:04.0 ens4: NIC Link is Up Speed is 10 Gbps Full
Duplex
[    3.618173] IPv6: ADDRCONF(NETDEV_CHANGE): ens4: link becomes ready
[    3.628189] iavf 0000:00:05.0 ens5: NIC Link is Up Speed is 10 Gbps Full
Duplex
[    3.629039] IPv6: ADDRCONF(NETDEV_CHANGE): ens5: link becomes ready

Fix this issue will be very helpful for us.

I failed to CC the primary author sylwesterx.dziedziuch@xxxxxxxxx and
mateusz.palczewski@xxxxxxxxx in bugliza.

Thanks,
Fan

--
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux