<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      <br>
      On 08/28/2013 05:25 AM, Brian Rak wrote:<br>
    </div>
    <blockquote cite="mid:521D194A.3010503@gameservers.com" type="cite">If
      I'm using the SR-IOV Pool assignment method (from
      <a class="moz-txt-link-freetext" href="http://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition">http://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition</a>
      ), how would I check how many virtual functions are already in
      use?
      <br>
    </blockquote>
    <br>
    Hi Brian <br>
    <br>
    Hope the following can help you.<br>
    <br>
    <br>
    [root@sriov2 images]# virsh net-dumpxml hostnet<br>
    <network><br>
      <name>hostnet</name><br>
      <uuid>6b49be3c-bb91-c16d-b475-2929678720f4</uuid><br>
      <forward mode='hostdev' managed='yes'><br>
        <pf dev='eth2'/><br>
      </forward><br>
    </network><br>
    <br>
    [root@sriov2 images]# virsh start r6<br>
    Domain r6 started<br>
    <br>
    [root@sriov2 images]# virsh attach-device r6 vfpool.xml <br>
    Device attached successfully<br>
    <br>
    [root@sriov2 images]# virsh attach-device r6 vfpool.xml <br>
    Device attached successfully<br>
    <br>
    [root@sriov2 images]# virsh net-dumpxml hostnet<br>
    <network <b>connections='2'</b>> <b> <=====the value of
      connections means how many VFs in the pool are using.</b><br>
      <name>hostnet</name><br>
      <uuid>6b49be3c-bb91-c16d-b475-2929678720f4</uuid><br>
      <forward mode='hostdev' managed='yes'><br>
        <pf dev='eth2'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x10'
    function='0x0'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x10'
    function='0x2'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x10'
    function='0x4'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x10'
    function='0x6'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x11'
    function='0x0'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x11'
    function='0x2'/><br>
        <address type='pci' domain='0x0000' bus='0x0f' slot='0x11'
    function='0x4'/><br>
      </forward><br>
    </network><br>
    <br>
    <br>
    <blockquote cite="mid:521D194A.3010503@gameservers.com" type="cite">
      <br>
      Is there a method other then looping through all the active guests
      and determining if they're using the SR-IOV interface?
      <br>
      <br>
    </blockquote>
    [root@sriov2 images]# virsh dumpxml r6|grep interface -A 4<br>
        <interface type='network'><br>
          <mac address='52:54:00:0a:16:28'/><br>
          <source network=<b>'hostnet'/</b>><br>
          <alias name='<b>hostdev0'/</b>><br>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
    function='0x0'/><br>
        </interface><br>
        <interface type='network'><br>
          <mac address='52:54:00:08:62:66'/><br>
          <source network='<b>hostnet'</b>/><br>
          <alias name='<b>hostdev1</b>'/><br>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
    function='0x0'/><br>
        </interface><br>
    <br>
    <blockquote cite="mid:521D194A.3010503@gameservers.com" type="cite">_______________________________________________
      <br>
      libvirt-users mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a>
      <br>
      <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a>
      <br>
    </blockquote>
    <br>
  </body>
</html>