Mac address is assigned to wrong port of Mellanox

Hi all,

I am trying to get sriov working with Mellanox. I have KVM hypervisor, and I have 2 port Mellanox cards. I am using port 1 of all cards.

This is my output of lspci | grep Mel

[root@hyp-1 hyp-1]# lspci | grep Mel

02:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]

02:00.1 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

02:00.2 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

02:00.3 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

02:00.4 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

02:00.5 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

03:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]

03:00.1 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

03:00.2 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

03:00.3 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

03:00.4 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

03:00.5 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

04:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]

04:00.1 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

04:00.2 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

04:00.3 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

04:00.4 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

04:00.5 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

82:00.0 Ethernet controller: Mellanox Technologies MT27520 Family [ConnectX-3 Pro]

82:00.1 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

82:00.2 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

82:00.3 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

82:00.4 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

82:00.5 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3 Virtual Function]

When I bring up a vm through an xml file, whatever mac address is specified in the xml file gets assigned to the vf of port 2 instead of being assigned to vf of port 1. shouldn’t it get assigned to the vf of the physical port that is in use? I have to do an ip link set manually on the correct ports vf to get it working

Hi, thanks a lot for your response.

This is my xml file:

<VM_LABEL>

<VM_UUID>

Timos VM

62914560

62914560

11

hvm

/usr/libexec/qemu-kvm

Regards,

Kavita

Can you provide XML file? Did you check a RedHat web site - 13.2. Using SR-IOV https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/sect-Virtualization_Host_Configuration_and_Guest_Installation_Guide-SR_IOV-How_SR_IOV_Libvirt_Works.html

Did you use exact instruction how to add device data to the XML file?