Skip to contentSkip to conversation

xen & MacVtap

DISCUSSION topperxin 5 participants 12 messages Jan 8, 2014 – Jan 10, 2014

lore
Share & tools
lore

topperxin

author
#0 lore raw

Hi list
As we all know, SR-IOV technology can improve VNIC's performance, while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 7 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance,
while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

I think years ago (2009, perhaps) when SR-IOV was first demoed with Xen it was demoed with live migration.. it was a mixture of SR-IOV VF + Xen vif.

So with some toolstack/script hackery you can do it. (=use the vif pv driver during migration, normally sr-iov vf).

-- Pasi

#2 lore raw
Quoted 9 lines · Pasi Kärkkäinen
Quoted 7 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance,
while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

Quoted 4 lines

I think years ago (2009, perhaps) when SR-IOV was first demoed with Xen it was demoed with live migration.. it was a mixture of SR-IOV VF + Xen vif.

So with some toolstack/script hackery you can do it. (=use the vif pv driver during migration, normally sr-iov vf).

You may find creating an active-backup bond in the guest useful. The active bond link is the SR-IOV device and the backup is the VIF.

I've not tried this myself.

David

#5 lore raw
In reply to topperxin
Quoted 8 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance, while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

AIUI MacVtap runs in emulation mode and connects to VirtIO to implement the feature you want. That would mean you also need to use VirtIO network driver for Xen's HVM domain, if you manage to configure MacVtap for Xen.

Basically that means a configuration that nobody ever tried. Good luck. :-)

Wei.

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw
Quoted 10 lines · Wei Liu
Quoted 8 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance, while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

Quoted 7 lines

AIUI MacVtap runs in emulation mode and connects to VirtIO to implement the feature you want. That would mean you also need to use VirtIO network driver for Xen's HVM domain, if you manage to configure MacVtap for Xen.

Basically that means a configuration that nobody ever tried. Good luck. :-)

Do you know what would be needed to make MacVtap run with Xen's drivers?

#7 lore raw
Quoted 16 lines · Konrad Rzeszutek Wilk
Quoted 15 lines · Wei Liu
Quoted 8 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance, while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

AIUI MacVtap runs in emulation mode and connects to VirtIO to implement the feature you want. That would mean you also need to use VirtIO network driver for Xen's HVM domain, if you manage to configure MacVtap for Xen.

Quoted 4 lines
Quoted 2 lines

Basically that means a configuration that nobody ever tried. Good luck. :-)

Do you know what would be needed to make MacVtap run with Xen's drivers?

No idea. Never looked into it.

Wei.

author
#4 lore raw
In reply to Pasi Kärkkäinen

hi Pasi
Thanks for your reply, I think we know what you said, we have ever tried these ways.
While you know, these ways are not stable enough for the engineering requirement, we have to apply many patches, and there are many restrictions for the Guest VM types. We need a more general & engineering solution.
Any way thanks for your reply.

Quoted 9 lines · At 2014-01-08 20:27:10,"Pasi Kärkkäinen" <[email protected]> wrote:
Quoted 7 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance,
while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

Quoted 7 lines

I think years ago (2009, perhaps) when SR-IOV was first demoed with Xen it was demoed with live migration.. it was a mixture of SR-IOV VF + Xen vif.

So with some toolstack/script hackery you can do it. (=use the vif pv driver during migration, normally sr-iov vf).

-- Pasi

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#3 lore raw
In reply to David Vrabel

Hi David
Thanks for your reply.
I have ever heard bond way, not try.
What I want to know is whether bond driver can provide stable and engineering solution for the live migration?

Quoted 13 lines · 在 2014-01-08 21:18:32,"David Vrabel" <[email protected]> 写道:
Quoted 12 lines · Pasi Kärkkäinen
Quoted 7 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance,
while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

I think years ago (2009, perhaps) when SR-IOV was first demoed with Xen it was demoed with live migration.. it was a mixture of SR-IOV VF + Xen vif.

Quoted 8 lines
Quoted 1 line

So with some toolstack/script hackery you can do it. (=use the vif pv driver during migration, normally sr-iov vf).

You may find creating an active-backup bond in the guest useful. The active bond link is the SR-IOV device and the backup is the VIF.

I've not tried this myself.

David

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#8 lore raw
In reply to Wei Liu



Hi Wei

Thanks for your reply, I know you are in charge of porting Virtio to xen, how about the process? May we configure Virtio on xen?
So far as you said, the MacVtap was written specially for Virtio, other virtual NIC driver model can not use it, right?
I get the information from http://virt.kernelnewbies.org/MacVTap
"Macvtap is a new device driver meant to simplify virtualized bridged networking. It replaces the combination of the tun/tap and bridge drivers with a single module based on the macvlan device driver. A macvtap endpoint is a character device that largely follows the tun/tap ioctl interface and can be used directly by kvm/qemu and other hypervisors that support the tun/tap interface."
So far as I comprehend, any hypervisors can configure MacVtap so long as it can support tun/tap interface, right? So May I say there is no so closely relationship between MacVtap and Virtio , right?
Looking forward to your reply. thanks.

Quoted 15 lines · At 2014-01-09 02:44:05,"Wei Liu" <[email protected]> wrote:
Quoted 8 lines · topperxin

Hi list
As we all know, SR-IOV technology can improve VNIC's performance, while it can not support live migration. I get some information recently that on KVM+Virtio platform, if we use MacVtap + SR-IOV, the live migration could be done successfully. What I want to know is may I configure MacVtap on Xen?
Any replies are welcome! Thanks a lot.

AIUI MacVtap runs in emulation mode and connects to VirtIO to implement the feature you want. That would mean you also need to use VirtIO network driver for Xen's HVM domain, if you manage to configure MacVtap for Xen.

Quoted 11 lines

Basically that means a configuration that nobody ever tried. Good luck. :-)

Wei.

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#9 lore raw
Quoted 6 lines · topperxin



Hi Wei

Thanks for your reply, I know you are in charge of porting Virtio to xen, how about the process? May we configure Virtio on xen?

I wouldn't say "I'm in charge". That was sort of experimental project two years ago. And I stopped after that. So my knowledge is in fact quite out dated.

I tried VirtIO on HVM guest about two months ago. It worked for me. That's the only thing I'm qualified to say. However Fabio reported it didn't work for him. So in short your mileage may vary.

Quoted 1 line

So far as you said, the MacVtap was written specially for Virtio, other virtual NIC driver model can not use it, right?

No, I didn't say that.

Quoted 3 lines

I get the information from http://virt.kernelnewbies.org/MacVTap
"Macvtap is a new device driver meant to simplify virtualized bridged networking. It replaces the combination of the tun/tap and bridge drivers with a single module based on the macvlan device driver. A macvtap endpoint is a character device that largely follows the tun/tap ioctl interface and can be used directly by kvm/qemu and other hypervisors that support the tun/tap interface."
So far as I comprehend, any hypervisors can configure MacVtap so long as it can support tun/tap interface, right? So May I say there is no so closely relationship between MacVtap and Virtio , right?

I can't speak for the thing I'm not familiar with. It would make sense to just try that configuration and see if it works or not.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#10 lore raw
Quoted 8 lines · 在 2014-01-09 20:14:08,"Wei Liu" <[email protected]> 写道:
Quoted 6 lines · topperxin



Hi Wei

Thanks for your reply, I know you are in charge of porting Virtio to xen, how about the process? May we configure Virtio on xen?

Quoted 7 lines

I wouldn't say "I'm in charge". That was sort of experimental project two years ago. And I stopped after that. So my knowledge is in fact quite out dated.

I tried VirtIO on HVM guest about two months ago. It worked for me. That's the only thing I'm qualified to say. However Fabio reported it didn't work for him. So in short your mileage may vary.

Could you please share us the elaborate steps about how to enable VirtIO on xen HVM guest? Thanks a lot

Quoted 4 lines
Quoted 1 line

So far as you said, the MacVtap was written specially for Virtio, other virtual NIC driver model can not use it, right?

No, I didn't say that.

Quoted 8 lines
Quoted 3 lines

I get the information from http://virt.kernelnewbies.org/MacVTap
"Macvtap is a new device driver meant to simplify virtualized bridged networking. It replaces the combination of the tun/tap and bridge drivers with a single module based on the macvlan device driver. A macvtap endpoint is a character device that largely follows the tun/tap ioctl interface and can be used directly by kvm/qemu and other hypervisors that support the tun/tap interface."
So far as I comprehend, any hypervisors can configure MacVtap so long as it can support tun/tap interface, right? So May I say there is no so closely relationship between MacVtap and Virtio , right?

I can't speak for the thing I'm not familiar with. It would make sense to just try that configuration and see if it works or not.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#11 lore raw
Quoted 15 lines · topperxin
Quoted 12 lines · 在 2014-01-09 20:14:08,"Wei Liu" <[email protected]> 写道:
Quoted 6 lines · topperxin



Hi Wei

Thanks for your reply, I know you are in charge of porting Virtio to xen, how about the process? May we configure Virtio on xen?

I wouldn't say "I'm in charge". That was sort of experimental project two years ago. And I stopped after that. So my knowledge is in fact quite out dated.

Quoted 7 lines
Quoted 3 lines

I tried VirtIO on HVM guest about two months ago. It worked for me. That's the only thing I'm qualified to say. However Fabio reported it didn't work for him. So in short your mileage may vary.

Could you please share us the elaborate steps about how to enable VirtIO on xen HVM guest? Thanks a lot

In your vif configuration, add in "model=virtio-net-pci" to specify VirtIO net as your emulated device. You also need to add in xen_emul_unplug=never in your *guest* kernel command line.

You might also find device_model_args= useful for appending arbitratry arguments to QEMU. Presumably you need to append some runes to QEMU to enable MacVtap.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel