[libvirt] Network device abstraction aka virtual switch - V3

Christian Benvenuti (benve) benve at cisco.com
Sun Jul 3 19:42:12 UTC 2011


> -----Original Message-----
> From: sendmail [mailto:justsendmailnothingelse at gmail.com] On Behalf Of
> Laine Stump
> Sent: Saturday, July 02, 2011 10:36 PM
> To: Christian Benvenuti (benve)
> Cc: Libvirt
> Subject: Re: [libvirt] Network device abstraction aka virtual switch -
> V3
> 
> On 06/16/2011 09:56 PM, Christian Benvenuti (benve) wrote:
> > Laine Stump wrote:
> >> Interface Pools
> >> ---------------
> >>
> >> In many cases, a single host network may have multiple physical
> >> network devices associated with it (especially in the case of an
> >> SRIOV-capable ethernet card, which will have several "virtual
> >> functions" associated with a single physical ethernet connection).
> The
> >> host will at least want to balance the load of multiple guests
> between
> >> these multiple devices, and may even require (in the case of
> >> passthrough mode, for example) that only a single guest interface
be
> >> attached to each host device.
> > Even though vnlink does not use 'passthrough' (it uses 'private'
> mode),
> > it
> > actually comes with the same requirement: the lower device cannot be
> > shared.
> >> In the case of mode='passthrough', only one guest interface can be
> >> connected to a device at a time.
> > In the case of BH that I mentioned above, the libvirt/BH code does
> > not currently enforce it, but it does have the same requirement.
> 
> Christian,
> 
> Can this (the fact that the desired mode of operation will not allow
> for
> sharing of interfaces) be determined absolutely from the existing
> config
> information? In other words, is it safe to say that any time you have
> the combination of "direct"/"private"/"802.1Qbh" that interfaces can't
> be shared, but that for direct/private/<not-802.1Qbh> they *can* be
> shared?
> 
> I'm currently writing the code that picks an interface to use from the
> pool; the information I have is roughly equivalent to what gets
> configured for current libvirt domain interfaces:
> 
> | <interface type='direct'>
> | <source dev='XYZ' mode='private'/>
> | <virtualport type='802.1Qbh">
> | <parameters
> | </virtualport>
> | </interface>
> 
> I want to avoid adding an explicit config item to the XML to
> allow/prevent interface sharing if at all possible (I already prevent
> sharing for passthrough mode; if adding a check for private mode with
> virtualport type='802.1Qbh' would be enough, then I'm happy)

Yes, I think that would be enough.

BH does not use passthrou mode because it does not need/want
to put the lower dev into promiscuous mode.
Adding a config item would be more flexible, but as of now only
BH would use it (there are no other cases I can think of), therefore
it does not seem necessary.

/Chris




More information about the libvir-list mailing list