Scott Feldman <scofeldm@cisco.com> wrote on 05/24/2010 04:48:40 PM:

> [image removed]

>
> [v3 PATCH] add 802.1Qbh handling for port-profiles based on Stefan's
> previous patches

>
> Scott Feldman

>
> to:

>
> libvir-list

>
> 05/24/2010 04:48 PM

>
> Cc:

>
> Stefan Berger, chrisw, dallan

>
> From: Scott Feldman <scofeldm@cisco.com>
>
> This patch builds on the work recently posted by Stefan Berger.  It builds
> on top of Stefan's two posted patches:
>
>         [PATCH v8] vepa: parsing for 802.1Qb{g|h} XML
>         [RFC][PATCH 1/3] vepa+vsi: Introduce dependency on libnl
>         [PATCH v3] Add host UUID (to libvirt capabilities)


You'll likely have to adapt this patch to the underlying v9.


>  static int
>  associatePortProfileId(const char *macvtap_ifname,
> +                       const char *linkdev,
>                         const virVirtualPortProfileDefPtr virtPort,
> -                       int vf,
>                         const unsigned char *vmuuid)
>  {
> +    char *physfndev;
> +    unsigned char hostuuid[VIR_UUID_BUFLEN];
> +    int32_t vf;
>      int rc = 0;
> +
>      VIR_DEBUG("Associating port profile '%p' on link device '%s'",
>                virtPort, macvtap_ifname);
> -    (void)vf;
> -    (void)vmuuid;
> +
> +    rc = virGetHostUUID(hostuuid);
> +    if (rc)
> +        goto err_exit;
> +
> +    rc = getPhysfn(linkdev, &vf, &physfndev);
> +    if (rc)
> +        goto err_exit;


I'd really prefer the getPhysfn to be called inside 'doPortProfileOp8021Qbh' for now because otherwise macvtap
testing will be impossible without hardware.

   Stefan