vsock support in osv

94 views
Skip to first unread message

zhiting zhu

unread,
Nov 4, 2019, 6:13:32 PM11/4/19
to OSv Development
Hey,

Does osv support vsock?

Best,
Zhiting

Asias He

unread,
Nov 4, 2019, 6:37:20 PM11/4/19
to zhiting zhu, Osv Dev
No, I do not think it is supposed yet.

Waldek Kozaczuk

unread,
Nov 5, 2019, 2:29:29 PM11/5/19
to OSv Development
Asias,

I saw somewhere that you are one of the original authors of vsock so you may have first-hand suggestions. Isn't vsock (called socket device in virtio spec - https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-39000010) quite similar to virtio-net device (same rx and tx vqueues plus event one). Would it make sense to use/re-use virtio-net code in OSv as a basic for vsock device?

Also as I understand vsock allows for guest-host communication. But what are the practical examples when this is useful? Configuration management? Would it be somewhat similar to what cloud init provides, no?

Waldek

Asias He

unread,
Nov 6, 2019, 9:49:27 AM11/6/19
to Waldek Kozaczuk, OSv Development
On Wed, Nov 6, 2019 at 3:29 AM Waldek Kozaczuk <jwkoz...@gmail.com> wrote:
Asias,

I saw somewhere that you are one of the original authors of vsock so you may have first-hand suggestions. Isn't vsock (called socket device in virtio spec - https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-39000010) quite similar to virtio-net device (same rx and tx vqueues plus event one). Would it make sense to use/re-use virtio-net code in OSv as a basic for vsock device?

Yes, I worked on vsock in the past. It is similar to virtio-net in the sense it uses the virt-queues, but it is not an ethernet device. It is a socket (both stream and datagram) level transport. We can reuse the virtio infrastructure in osv but other than that it makes little sense to reuse the virtio-net code. 
 

Also as I understand vsock allows for guest-host communication. But what are the practical examples when this is useful? Configuration management? Would it be somewhat similar to what cloud init provides, no?

It allows guest-host and guest-host communication. It is zero config so that the guest does not need to do the ip address configuration. It can be used to replace the virtio-serial device for management. It can also be used as a guest-host file sharing using nfs on top of vsock.

The nice thing about vsock is that it is easy to use from the application point of view. Any tcp/udp socket programs can be easily modified to run on top of vsock. Change the protocol number and recompile. That's it.
 

Waldek

On Monday, November 4, 2019 at 6:37:20 PM UTC-5, Asias He wrote:
No, I do not think it is supposed yet.

--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/142a1cc4-78fa-4b2e-ae65-eb779c54340a%40googlegroups.com.


--
Asias
Reply all
Reply to author
Forward
0 new messages