Hi, 

In OpenStack we have a port type macvtap. 
Mavtap port is just a tap device connected to VF.

In Libvirt the guest xml look like 
<interface type='direct'>                                                       
                  
  <mac address='fa:16:3e:b1:06:4e'/>                                            
                  
  <source dev='p1p6' mode='passthrough'/>                                       
                  
  <target dev='macvtap1'/>                                                      
                  
  <model type='virtio'/>                                                        
                  
  <driver name='vhost'/>
  <alias name='net0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>


In the hypervisor we can see that the  mac of the VF which is fa:16:3e:f3:9b:e8 
- is set by OpenStack see [1]
9: ens3f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master 
ovs-system state UP mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:29:24:4e brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking off, link-state disable
    vf 1 MAC 00:00:00:00:00:00, spoof checking off, link-state disable
    vf 2 MAC fa:16:3e:f3:9b:e8, vlan 48, spoof checking on, link-state enable
    vf 3 MAC fa:16:3e:f6:02:c8, vlan 48, spoof checking on, link-state enable
41: ens3f4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode 
DEFAULT group default qlen 1000
    link/ether fa:16:3e:f6:02:c8 brd ff:ff:ff:ff:ff:ff
42: macvtap0@ens3f4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel 
state UP mode DEFAULT group default qlen 500
    link/ether fa:16:3e:f6:02:c8, brd ff:ff:ff:ff:ff:ff

The netdevice of the VF which is ens3f4 has also the same mac. This mac is set 
when using Libvirt 1.2.2 (Ubuntu 14.04),
But when we tested with new Libvirt versions >= 1.2.17 (Fedora 23/Ubuntu 16.04) 
the mac  netdevice of the VF (ens3f4) is not set.
This change in Libvirt breaks the guest from getting DHCP in OpenStack.
Do you know why the behavior change in newer releases? 
We have a WIP patch in OpenStack  for setting also the mac for the netdevice of 
the VF  [2]. Just wanted to know that this is the correct approach.


[1] - 
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/vif.py#L616-L621
[2] - https://review.openstack.org/#/c/364121/ 



Thanks,
Moshe Levi



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

Reply via email to