[PATCH 0/5 v3] Interface pools and passthrough mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Interface Pools and Passthrough mode:

Current Method:
The passthrough mode uses a macvtap direct connection to connect each
guest to the network. The physical interface to be used is picked from
among those listed in <interface> sub elements of the <forward> element.

The current specification for <forward> extends to allow 0 or more
<interface> sub-elements:
Example:
<forward mode='passthrough' dev='eth10'/>
<interface dev='eth10'/>
<interface dev='eth12'/>
<interface dev='eth18'/>
<interface dev='eth20'/>
</forward>

However with an ethernet card with 64 VF's or more, the above method
gets tedious on the system.

On the other hand, just parameterizing a string (eth%d) is inadequate,
eg, when there are multiple non-contiguous ranges.

Proposed Method:
The 4 patches provided:

i) Introduce a new element 'pf' to implicitly create an interface pool
of all the Virtual Functions attached to the specified Physical
Function.  
ii) Modify the networkAllocateActualDevice, networkNotifyActualDevice
and networkReleaseActualDevice API to use the above mentioned interface
pool in the passthrough mode.
iii) Allow virsh net-dumpxml to use an option --inactive to
differentiate between explicit and implicit interface pools

Hence Libvirt will now support both the methods mentioned below:

* Explicit interface list. App inputs:

    <forward mode='passthrough'>
     <interface dev='eth10'/>
     <interface dev='eth11'/>
     <interface dev='eth12'/>
     <interface dev='eth13'/>
    </forward>

   libvirt does not change XML

* Automatically interface list from PF. App inputs:

     <forward mode='passthrough'>
      <pf dev='eth0'/>
     </forward>

   libvirt expands XML to be

    <forward mode='passthrough'>
      <pf dev='eth0'/>
      <interface dev='eth10'/>
      <interface dev='eth11'/>
      <interface dev='eth12'/>
      <interface dev='eth13'/>
     </forward>

In the above case we need to differentiate between the implicit and
explicit interface pool, which can be done by comparing the dumpxml from
active and inactive domains. 
This will need the addition of the flag VIR_NETWORK_XML_INACTIVE to
virNetworkGetXMLDesc().

This patch series supports the use of option --inactive with virsh
net-dumpxml.


Shradha Shah (5):
  Added function pciSysfsFile to enable access to the PCI SYSFS files.
  Added Function virNetDevGetVirtualFunctions
  Adding the element pf to network xml.
  Functionality to implicitly get interface pool from SR-IOV PF.
  Added new option to virsh net-dumpxml called --inactive

 docs/schemas/network.rng     |    7 +++
 include/libvirt/libvirt.h.in |    4 ++
 src/conf/network_conf.c      |   79 +++++++++++++++++++++++++++++++---
 src/conf/network_conf.h      |    5 ++-
 src/network/bridge_driver.c  |   97 ++++++++++++++++++++++++++++++++---------
 src/test/test_driver.c       |    2 +-
 src/util/pci.c               |   39 +++++++++++++++++
 src/util/pci.h               |    7 +++
 src/util/virnetdev.c         |   83 ++++++++++++++++++++++++++++++++++++
 src/util/virnetdev.h         |    6 +++
 src/vbox/vbox_tmpl.c         |    2 +-
 tests/networkxml2xmltest.c   |    2 +-
 tools/virsh.c                |   13 +++++-
 13 files changed, 311 insertions(+), 35 deletions(-)

-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]