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