Re: How to configure MacVtap passthrough mode to SR-IOV VF?

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

 



On 01/19/2014 12:08 PM, opendaylight wrote:
> Hi guys.
>             These days I'm doing research on SR-IOV & Live migration. As we all know there is big problem that SR-IOV & Live migration can not exist at the same time. 
>             I heard that KVM + SRIOV + MacVtap can solve this problem. So I want to try.
>             My environment:
>             Host: Dell R610, OS: RHEL 6.4 ( kernel 2.6.32)
>             NIC: intel 82599
>             I follow a document from intel guy, it said that I should write xml like below:
> ============================
> <network>
>                  <name>macvtap_passthrough’</name>
>                  <forward mode=’passthrough>
>                           <interface dev=’vf0’ />
>                           <interface dev=’vf1’ />
>                           .. ..
>                 </forward>

About a year ago I played around with an Intel 82599 SR-IOV card using RHEL 6.5 latest version. 
It worked fine for me. My setup is as follows:

Eth2 is the PF, which has 2 VF. I load the ixgbe device driver with max_vfs=2 parameter.
Eth4 and Eth5 are the 2 VF on top of my PF.

[root@c7b5 lldpad]# ip l sh dev eth2
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:1b:21:63:bf:80 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 3e:97:40:4d:fb:82
    vf 1 MAC 52:54:00:98:14:08
[root@c7b5 lldpad]# ip a sh dev eth5
8: eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 52:54:00:98:14:08 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.5/24 scope global eth5
    inet6 fe80::1c12:b6ff:fe1c:d213/64 scope link tentative dadfailed 
       valid_lft forever preferred_lft forever
[root@c7b5 lldpad]# 

The PF has no ip address, but my VF eth5 has. So I can ping this address from other boxes.

Next I start a VM with this network attachment, extract from my VM xml file.
<interface type='direct'>
      <mac address='52:54:00:98:14:08'/>
      <source dev='eth5' mode='passthrough'/>
      <target dev='macvtap0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>      
</interface>

[root@c7b5 lldpad]# ip a sh dev macvtap0
21: macvtap0@eth5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 500
    link/ether 52:54:00:98:14:08 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fe98:1408/64 scope link 
       valid_lft forever preferred_lft forever
[root@c7b5 lldpad]#

My VM has the ip address 192.168.0.205 (static assigned) and I can ping it from a another box:
...
64 bytes from 192.168.0.205: icmp_seq=125 ttl=64 time=0.462 ms
64 bytes from 192.168.0.205: icmp_seq=126 ttl=64 time=0.472 ms
64 bytes from 192.168.0.205: icmp_seq=127 ttl=64 time=0.477 ms

This setup worked for me. I can not say more about other setups...
Hope this helps


-- 
Thomas Richter, Dept 3250, IBM LTC Boeblingen, Data Center Networking
--
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

--
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]