[libvirt] More SR-IOV VF support needed (IFLA_VF_VLAN/IFLA_VF_SPOOFCHK)

Dax Kelson dkelson at gurulabs.com
Wed Apr 25 18:10:25 UTC 2012


Hi guys,

I have some brand new hardware with a Intel X540-AT2 10Gbe NIC.

I see that 0.9.11 added <interface type='hostdev'> with the ability
define a MAC address to address the randomly generated MAC address
issue. Thank you!

I believe that additional functionality is needed in two areas, namely
support for transparent VLAN tagging and the ability to disable MAC
spoof checking within the NIC's embedded switch.

With transparent VLAN tagging (IFLA_VF_VLAN), the PF transparently
tags all traffic from the VF with a configured VLAN ID and strips the
VLAN tag from traffic going to the VM. The VM is not aware of the VLAN
tag.

Disabling of the MAC spoof check (IFLA_VF_SPOOFCHK) allows the VM to
be able to do NIC bonding of two VFs.

These two features correspond to the following commands:

ip link set em<X> vf <n> vlan <VLAN>

ip link set em<X> vf <n> spoofchk [on|off]  (note, requires iproute2 v3.3.0)

As far as XML format, how about something like:

  <devices>
    <interface type='hostdev'>
      <source>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/>
      </source>
      <mac address='52:54:00:6d:90:02'>
      <vlan id='241'>
      <disablespoofchk/>
    </interface>
  </devices>

Comments?

Dax Kelson
Guru Labs




More information about the libvir-list mailing list