1 Reply Latest reply on Mar 16, 2012 10:53 AM by Patrick_Kutch

    How to identify the underlying VF within a VM

    vshyamk

      Hi Folks,

       

      We have the following need. We expose multiple SRIOV VF's from different SRIOV NIC's into a KVM linux VM. Within the VM we want to consistently name the VF's & assign an unique functionality for each of them with a static IP. For this at the physical host level we use "ip link set addr" to set the mac address of a VF and then pass this mac address in an injected config file (injected as a disk into the VM). The VM uses the mac address to map the underlying VF's & based on that determines what functionality a particular eth within VM should have.


      First time when a VM is brought up we setup udev persistent-net rules such that the eth interfaces have a consistent name. However we run into an issue. Whenever the underlying physical host SRIOV PF is down, ixgbevf driver within the VM cannot determine the mac address of the VF. It prints a message like "PF in reset state. Assigning new mac" & arbitarily assings a new mac to the VF. With this our unique way to identify a VF is broken within the VM & alsopersistent net rules no longer apply.

       

      We were wondering if we can somehow pass the SRIOV VF number to the VM & if the ixgbevf driver can somehow decode the VF number so that we can match it always within the VM using the pci-coordinates of the eth interface rather than using the mac address. Question is, is this an option? Is there a way sitting within a VM to query the VF as to the underlying co-ordinates?

       

      Thanks.

       

      --Shyam