<br><tt><font size=2>Scott Feldman <scofeldm@cisco.com> wrote on
05/10/2010 03:11:22 PM:<br>
<br>
> <br>
> chrisw, Gerhard Stenzel, libvir-list, libvir-list-bounces</font></tt>
<br><tt><font size=2>> <br>
> On 5/10/10 11:57 AM, "Stefan Berger" <stefanb@us.ibm.com>
wrote:<br>
> <br>
> > libvir-list-bounces@redhat.com wrote on 05/10/2010 02:35:49 PM:<br>
> > <br>
> > <br>
> >> <br>
> >> Correct, IFLA_VF_PORT_PROFILE is not in the kernel yet.  The
kernel<br>
> >> patch is be discussed on the kernel netdev mailing list.
 The most recent<br>
> >> discussion is on ways to merge VDP and CDCP into what I've
posted for<br>
> >> IFLA_VF_PORT_PROFILE.<br>
> >> <br>
> >> I'll send out another libvirt patch once the kernel discussions
are<br>
> >> final.<br>
> > <br>
> > I suppose you will provide the libvirt patch only for what seems
to be<br>
> > Cisco technology support.<br>
> <br>
> I can only test with our production equipment setup, so I'm hesitant
to<br>
> include additions to the patch for VDP/CDCP which I can't test.<br>
> <br>
> > Now the slight differences in technology<br>
> > that we seem to try to support here are reflected in the parameters
that<br>
> > go into the XML and end up in the netlink messages. Any way to<br>
> > consolidate that?<br>
> <br>
> I doesn't appear we'll be able to consolidate the parameters between
the two<br>
> technologies based on what I've seen from Arnd's latest patch on the
kernel<br>
> mailing list.  The latest proposal is to define a single netlink
msg that<br>
> can handle two disjoint sets of parameters.  If there is no way
for further<br>
> consolidation, it probably makes more senses to have two different
netlink<br>
> msgs, one for each parameter set.</font></tt>
<br>
<br><tt><font size=2>Would it be possible to support these 2 XML :</font></tt>
<br>
<br><tt><font size=2>    <interface type='direct'></font></tt>
<br><tt><font size=2>      <source dev='static' mode='vepa'/></font></tt>
<br><tt><font size=2>      <model type='virtio'/></font></tt>
<br><tt><font size=2 color=red>      <vsi managerid='12'
typeid='0x123456' typeidversion='1'</font></tt>
<br><tt><font size=2 color=red>           instanceid='fa9b7fff-b0a0-4893-8e0e-beef4ff18f8f'
/></font></tt>
<br><tt><font size=2>      <filterref filter='clean-traffic'/></font></tt>
<br><tt><font size=2>    </interface></font></tt>
<br>
<br><tt><font size=2>    <interface type='direct'></font></tt>
<br><tt><font size=2>      <source dev='static' mode='vepa'/></font></tt>
<br><tt><font size=2>      <model type='virtio'/></font></tt>
<br><tt><font size=2 color=red>      <vsi profileid='my_profile'/></font></tt>
<br><tt><font size=2>    </interface></font></tt>
<br><tt><font size=2><br>
and profileid becomes mutually exclusive to the parameters shown above.</font></tt>
<br><tt><font size=2>The internal data structures (domain_conf.h) to use
would be defined as this:</font></tt>
<br>
<br><tt><font size=2>enum virVSIType {</font></tt>
<br><tt><font size=2>    VIR_VSI_INVALID,</font></tt>
<br><tt><font size=2>    VIR_VSI_8021QBG,</font></tt>
<br><tt><font size=2>    VIR_VSI_8021QBH,</font></tt>
<br><tt><font size=2>};</font></tt>
<br>
<br><tt><font size=2>/* profile data for macvtap (VEPA) */</font></tt>
<br><tt><font size=2>typedef struct _virVSIProfileDef virVSIProfileDef;</font></tt>
<br><tt><font size=2>typedef virVSIProfileDef *virVSIProfileDefPtr;</font></tt>
<br><tt><font size=2>struct _virVSIProfileDef {</font></tt>
<br><tt><font size=2>    enum virVSIType   vsiType;</font></tt>
<br><tt><font size=2>    struct {</font></tt>
<br><tt><font size=2>        uint8_t    
  managerID;</font></tt>
<br><tt><font size=2>        uint32_t    
 typeID; // 24 bit valid</font></tt>
<br><tt><font size=2>        uint8_t    
  typeIDVersion;</font></tt>
<br><tt><font size=2>        unsigned char instanceID[VIR_UUID_BUFLEN];</font></tt>
<br><tt><font size=2>    } vsi8021Qbg;</font></tt>
<br><tt><font size=2>#ifdef IFLA_VF_PORT_PROFILE_MAX</font></tt>
<br><tt><font size=2>    struct {</font></tt>
<br><tt><font size=2>        char      
   profileID[IFLA_VF_PORT_PROFILE_MAX];</font></tt>
<br><tt><font size=2>    } vsi8021Qbh;</font></tt>
<br><tt><font size=2>#endif</font></tt>
<br><tt><font size=2>};</font></tt>
<br>
<br>
<br><tt><font size=2>[...]</font></tt>
<br>
<br><tt><font size=2>        struct {</font></tt>
<br><tt><font size=2>            char *linkdev;</font></tt>
<br><tt><font size=2>            int mode;</font></tt>
<br><tt><font size=2>            virVSIProfileDef
vsiProfile;</font></tt>
<br><tt><font size=2>        } direct;</font></tt>
<br>
<br>
<br><tt><font size=2>Regards,</font></tt>
<br>
<br><tt><font size=2>Stefan</font></tt>
<br>