Re: [PATCH] esx: Support VLAN tags in virtual network port groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/8/20 Laine Stump <laine@xxxxxxxxx>:
> On 08/18/2012 07:46 AM, Matthias Bolte wrote:
>> ---
>>  src/esx/esx_network_driver.c |   38 +++++++++++++++++++++++++++++++++-----
>>  1 files changed, 33 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
>> index 09d46d3..2f5f1ab 100644
>> --- a/src/esx/esx_network_driver.c
>> +++ b/src/esx/esx_network_driver.c
>> @@ -489,7 +489,16 @@ esxNetworkDefineXML(virConnectPtr conn, const char *xml)
>>              goto cleanup;
>>          }
>>
>> -        hostPortGroupSpec->vlanId->value = 0;
>> +        if (def->portGroups[i].vlan.trunk) {
>> +            hostPortGroupSpec->vlanId->value = 4095;
>> +        } else if (def->portGroups[i].vlan.nTags == 1) {
>> +            hostPortGroupSpec->vlanId->value = *def->portGroups[i].vlan.tag;
>> +        } else if (def->portGroups[i].vlan.nTags > 1) {
>> +            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>> +                           _("Can apply one VLAN tag per port group only"));
>> +        } else {
>> +            hostPortGroupSpec->vlanId->value = 0;
>> +        }
>
> So in vmware you can specify that a port is to be used for trunking,
> (and you do that by specifying a tag of 4095), but can't limit the list
> of tags to allow - is that correct?

Yes.

> Aside from this, you are interpreting the <vlan> element in portgroups,
> but not the overlying <vlan> for the entire network (in practice this is
> what would be used if no portgroup was chosen, and no vlan info came
> from the domain's interface definition). If there isn't any practical
> way to implement this, you should check for it and log a
> CONFIG_UNSUPPORTED error if found.

There is no way to not choose a portgroup in VMware, but I could use
the following logic. If a portgroup has no <vlan> element but the
network has one than use the network's <vlan> for the portgroup.

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]