Comment by rwmj
2 months ago
vsock isn't a replacement for TCP, because you can't assume that IP exists or is routable / not firewalled between the guest and the host.
Having said that, yes it also really ought to be faster. It's a decent, modern protocol so there's no particular reason for it, so with a bit of tuning somewhere it should be possible.
Couldn’t you just use a broadcast address and get the same result ?
VMs might not have a network connection at all, or (in a more normal secure configuration) have all their network traffic trunked onto a VLAN that avoids touching the host. Vsock is designed so it can only be used for traffic between the hypervisor/host and guests (or between guests on the same host). It's more akin to virtio or hypercalls than a traditional network.