<br><tt><font size=2>Scott Feldman <scofeldm@cisco.com> wrote on
05/24/2010 04:48:40 PM:<br>
<br>
> [image removed] </font></tt>
<br><tt><font size=2>> <br>
> [v3 PATCH] add 802.1Qbh handling for port-profiles based on Stefan's<br>
> previous patches</font></tt>
<br><tt><font size=2>> <br>
> Scott Feldman </font></tt>
<br><tt><font size=2>> <br>
> to:</font></tt>
<br><tt><font size=2>> <br>
> libvir-list</font></tt>
<br><tt><font size=2>> <br>
> 05/24/2010 04:48 PM</font></tt>
<br><tt><font size=2>> <br>
> Cc:</font></tt>
<br><tt><font size=2>> <br>
> Stefan Berger, chrisw, dallan</font></tt>
<br><tt><font size=2>> <br>
> From: Scott Feldman <scofeldm@cisco.com><br>
> <br>
> This patch builds on the work recently posted by Stefan Berger.  It
builds<br>
> on top of Stefan's two posted patches:<br>
> <br>
>         [PATCH v8] vepa: parsing for 802.1Qb{g|h}
XML<br>
>         [RFC][PATCH 1/3] vepa+vsi: Introduce dependency
on libnl<br>
>         [PATCH v3] Add host UUID (to libvirt capabilities)</font></tt>
<br>
<br><tt><font size=2>You'll likely have to adapt this patch to the underlying
v9.</font></tt>
<br>
<br>
<br><tt><font size=2>>  static int<br>
>  associatePortProfileId(const char *macvtap_ifname,<br>
> +                    
  const char *linkdev,<br>
>                    
    const virVirtualPortProfileDefPtr virtPort,<br>
> -                    
  int vf,<br>
>                    
    const unsigned char *vmuuid)<br>
>  {<br>
> +    char *physfndev;<br>
> +    unsigned char hostuuid[VIR_UUID_BUFLEN];<br>
> +    int32_t vf;<br>
>      int rc = 0;<br>
> +<br>
>      VIR_DEBUG("Associating port profile '%p'
on link device '%s'",<br>
>                virtPort, macvtap_ifname);<br>
> -    (void)vf;<br>
> -    (void)vmuuid;<br>
> +<br>
> +    rc = virGetHostUUID(hostuuid);<br>
> +    if (rc)<br>
> +        goto err_exit;<br>
> +<br>
> +    rc = getPhysfn(linkdev, &vf, &physfndev);<br>
> +    if (rc)<br>
> +        goto err_exit;</font></tt>
<br>
<br><tt><font size=2>I'd really prefer the getPhysfn to be called inside
'doPortProfileOp8021Qbh' for now because otherwise macvtap</font></tt>
<br><tt><font size=2>testing will be impossible without hardware.</font></tt>
<br>
<br><tt><font size=2>   Stefan</font></tt>
<br>