[libvirt] [PATCH 0/1] Add VLAN capability to openvswitch virtualport types

Kyle Mestery kmestery at cisco.com
Wed Aug 8 19:47:23 UTC 2012


With this change, it is now possible to support VLANs (both access and trunks)
for openvswitch ports in libvirt. This also takes into account the profileid
parameter, as the vlantag parameter is also optional.

Examples of this configuration are below.

Setup the port as an access port:

<interface type='bridge'>
  <mac address='52:54:00:30:23:a6'/>
  <source bridge='data-br'/>
  <virtualport type='openvswitch'> 
    <parameters interfaceid='cdbbbc31-b7fe-16ca-a715-cc7cc76e18b2' vlantag='70'/>
  </virtualport>                    
  <model type='virtio'/>                  
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

Setup the port as an trunk port:

<interface type='bridge'>
  <mac address='52:54:00:30:23:a6'/>
  <source bridge='data-br'/>
  <virtualport type='openvswitch'>
    <parameters interfaceid='cdbbbc31-b7fe-16ca-a715-cc7cc76e18b2' vlantag='70,71,72'/>
  </virtualport>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

 src/conf/netdev_vport_profile_conf.c | 34 ++++++++++++++++++++++++++++++----
 src/util/virnetdevopenvswitch.c      | 23 +++++++++++++++++++++--
 src/util/virnetdevvportprofile.h     |  2 ++
 3 files changed, 53 insertions(+), 6 deletions(-)

-- 
1.7.11.2




More information about the libvir-list mailing list