<br><tt><font size=2>Gerhard Stenzel <gstenzel@linux.vnet.ibm.com>
wrote on 05/12/2010 12:34:09 PM:<br>
</font></tt>
<br><tt><font size=2>> <br>
> On Wed, 2010-05-12 at 12:13 -0400, Stefan Berger wrote:<br>
> > I'd suggest to use this patch as a base for triggering the setup<br>
> > protocol with the 802.1Qb{g|h} switch.<br>
> <br>
> Here is a RFC patch, which demonstrates how libvirt could communicate<br>
> with lldpad via the lldptool for the 802.1Qbg case. Please note, that<br>
> there is currently no public available version of lldptool which accepts<br>
> this command line. This is also work in progress. <br>
> <br>
<br>
[...]</font></tt>
<br><tt><font size=2><br>
> +    virFormatMacAddr(mac, macaddr);<br>
> +<br>
> +     rc = ifaceGetRootIface(-1, linkdev, rootifname);<br>
> +     if (rc != 0) {<br>
> +        macvtapError(VIR_ERR_INTERNAL_ERROR,<br>
> +                    
_("cannot get root interface for %s"),<br>
> +                    
linkdev);<br>
> +         return rc;<br>
> +     }<br>
> +    VIR_DEBUG("root iface of %s is %s\n", linkdev,
rootifname);<br>
> +<br>
> +    ifaceGetVlanID(linkdev, &vlanid);<br>
> +    VIR_DEBUG("vlan id of %s is %d\n", linkdev,
vlanid);</font></tt>
<br>
<br><tt><font size=2>I am wondering whether it would not be 'more general'
to have lldpad determine</font></tt>
<br><tt><font size=2>the root interface and handling bonding interfaces
on the way rather </font></tt>
<br><tt><font size=2>than libvirt trying to determine that here. So we
would just pass the</font></tt>
<br><tt><font size=2>linkdev or the even the macvtap to lldptool. The same
would be true</font></tt>
<br><tt><font size=2>for finding the VLAN ID. For both the code I posted
here on libvirt</font></tt>
<br><tt><font size=2>mailing list could be used in lldpad. For now I won't
check it in.</font></tt>
<br>
<br><tt><font size=2>    Stefan</font></tt>
<br>