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

Shradha Shah sshah at solarflare.com
Thu Jan 12 10:43:03 UTC 2012


On 01/10/2012 11:23 AM, Daniel P. Berrange wrote:
> On Wed, Dec 14, 2011 at 10:47:23AM +0000, Shradha Shah wrote:
>> 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.
> 
> 
> The design and code all looks good to me. Just some fairly minor
> code & style bugs to deal with, which I've replied to inline.
> 
> Regards,
> Daniel

Thanks Daniel.

Regards,
Shradha Shah




More information about the libvir-list mailing list