[LiSA-Devel] integrating LiSA in libvirt

Radu Rendec radu.rendec at mindbit.ro
Sun Jun 23 22:35:47 EEST 2013


Hi,

Please see my answers below.

On Thu, 2013-06-20 at 16:25 +0300, Andreea-Cristina Hodea wrote:
> > virNetDevLisaAddPort(const char *portname, const char *if_tag,
> > virNetDevVlanPtr virtVlan) {
> >      obtain if_index on portname
> >      if (if_tag)
> >         switch_set_if_tag(if_index, if_tag)
> >      if (virtVlan)
>           foreach vlan
>               sw_ops->add_vif(...)
>         else
>           sw_ops->if_add(...)
> > }

I'm not sure I understand the intended meaning of virtVlan. From my
point of view, the only thing libvirt needs to take care of is adding
the corresponding tap device as a port in lisa.

Further configuration (such as whether access/trunk mode and vlans)
should be invisible to libvirt.

> Moreover I was able to create a bridge from virsh (the virtual shell
> from libvirt) by running `virsh net-create config_file.xml`. It might
> seem stupid, but I still cannot figure out when I express my
> preference on the connection type: either bridge, macvtap or lisa. **
> Is it when I select the host device? In the drop-down list of Host
> device should be an entry for lisa_switch? **

Double click on a machine (or select it from the menu and then go to
Edit and then Virtual Machine Details). From the Virtual Machine window,
go to View and select "Details". The hardware list appears on the left.
Go to NIC. You have 2 drop-down lists:
      * Source device: this specifies how the network interface is
        connected on the host side. This is where you should have a new
        option for lisa.
      * Device model: this specifies what kind of hardware is emulated
        in the guest (or what type of network card the guest will see).

> For task 4), there are some functions that generate XML config and
> parse XML (see tools/virsh-domain.c and src/conf/domain_conf.c). For
> example in cmdAttachInterface, based on the interface type (network or
> bridge) it is generated the <source> tag. My intuition is that here I
> should extend the if-else with LiSA's <source> tag. As I've said, the
> <source> tag is generated based on interface type, so let's assume
> that for referring the lisa switch the configuration would contain a
> `<source lisa_switch="true"/>` tag, but ** what value would interface
> type would take? ** Now it takes values as <interface type="bridge"/>
> or <interface type="network"/> or <interface type="direct"/> etc. Is
> it ok `<interface type="switch"/>`?

I would suggest <interface type="lisa">, but it's really not that
important. Apparently we missed the "type" attribute on the "interface"
tag. So the interface type is not determined by the attributes of the
"source" tag (as we initially thought). This makes much more sense.

In the case of lisa interfaces, I think the "source" attribute should
only contain an attribute that specifies the tag that we use in lisa.

> I'm not sure if it is relevant, but in terms of virtual port there is
> a <virtualport /> tag, with a type property that for now takes values
> such as "openvswitch" and "802.1Qbh".

Well, we need to learn what they understand by "virtualport". There's a
configure option called "--with-virtualport" that enables support for
this at compile time. And there are a lot of references to this in the
ChangeLog file which is in the project root. Maybe it's also documented.

Thanks,

Radu




More information about the LiSA-Devel mailing list