3 Replies Latest reply on Aug 1, 2016 2:34 PM by alkx

    Mac address is assigned to wrong port of Mellanox

    kavitad

      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

       

        • Re: Mac address is assigned to wrong port of Mellanox
          alkx

          Can you provide XML file? Did you check a RedHat web site - 13.2. Using SR-IOV

            • Re: Mac address is assigned to wrong port of Mellanox
              kavitad

              Hi, thanks a lot for your response.

              This is my  xml file:

              <domain type='kvm'>

                <name><VM_LABEL></name>

                <uuid><VM_UUID></uuid>

                <description>Timos VM</description>

                <memory>62914560</memory>

                <currentMemory>62914560</currentMemory>

                <cpu mode='host-passthrough'/>

                <memoryBacking>

                  <hugepages/>

                </memoryBacking>

                <numatune>

                  <memory mode='strict' nodeset='1'/>

                </numatune>

                <vcpu current='11'>11</vcpu>

                <cputune>

                  <vcpupin vcpu='0' cpuset='13'/>

                  <vcpupin vcpu='1' cpuset='14'/>

                  <vcpupin vcpu='2' cpuset='15'/>

                  <vcpupin vcpu='3' cpuset='16'/>

                  <vcpupin vcpu='4' cpuset='17'/>

                  <vcpupin vcpu='5' cpuset='18'/>

                  <vcpupin vcpu='6' cpuset='19'/>

                  <vcpupin vcpu='7' cpuset='20'/>

                  <vcpupin vcpu='8' cpuset='21'/>

                  <vcpupin vcpu='9' cpuset='22'/>

                  <vcpupin vcpu='10' cpuset='23'/>

                  <emulatorpin cpuset='12'/>

                </cputune>

                <os>

                  <type arch='x86_64' machine='pc'>hvm</type>

                  <smbios mode='emulate'/>

                </os>

                <clock offset='utc'>

                  <timer name='pit' tickpolicy='delay'/>

                  <timer name='rtc' tickpolicy='delay'/>

                </clock>

                <devices>

                  <emulator>/usr/libexec/qemu-kvm</emulator>

                  <disk type='file' device='disk'>

                    <driver name='qemu' type='qcow2' cache='none'/>

                    <source file='/<TESTBED>/images/flexibed/<VM_NAME>/boot_cf3.qcow2'/>

              <target dev='hda' bus='virtio'/>

                  </disk>

                  <interface type='bridge'>

                    <mac address='<VM_MAC_ETH0>'/>

                    <source bridge='breth0'/>

                    <model type='virtio'/>

                  </interface>

                  <interface type='bridge'>

                    <mac address='<VM_MAC_ETH1>'/>

                    <source bridge='breth1'/>

                    <model type='virtio'/>

                  </interface>

              <!--SRIOVMODE -->

                  <interface type='hostdev' managed='yes'>

                    <mac address='<VM_MAC_ETH4>'/>

                    <source>

                       <address type='pci' domain='0x0000' bus='0x82' slot='0x0' function='0x1'/>

                    </source>

                  </interface>

                  <console type='tcp'>

                    <source mode='bind' host='0.0.0.0' service='<VM_CONSOLE>'/>

                    <protocol type='telnet'/>

                    <target type='virtio' port='0'/>

                  </console>

                </devices>

                <seclabel type='none'/>

              </domain>

               

              Regards,

              Kavita