All of lore.kernel.org
 help / color / mirror / Atom feed
* socket.c added support for unix domain socket datagram transport
@ 2021-04-23  6:56 Ralph Schmieder
  2021-04-23  9:16 ` Daniel P. Berrangé
  2021-04-23 15:29 ` Stefano Brivio
  0 siblings, 2 replies; 15+ messages in thread
From: Ralph Schmieder @ 2021-04-23  6:56 UTC (permalink / raw)
  To: qemu-devel

Hey...  new to this list.  I was looking for a way to use Unix domain sockets as a network transport between local VMs.

I'm part of a team where we run dozens if not hundreds of VMs on a single compute instance which are highly interconnected.

In the current implementation, I use UDP sockets (e.g. something like 

-netdev id=bla,type=socket,udp=localhost:1234,localaddr=localhost:5678) 

which works great.

The downside of this approach is that I need to keep track of all the UDP ports in use and that there's a potential for clashes.  Clearly, having Unix domain sockets where I could store the sockets in the VM's directory would be much easier to manage.

However, even though there is some AF_UNIX support in net/socket.c, it's

- not configurable
- it doesn't work

As a side note, I tried to pass in an already open FD, but that didn't work either.

So, I added some code which does work for me... e.g.

- can specify the socket paths like -netdev id=bla,type=socket,unix=/tmp/in:/tmp/out
- it does forward packets between two Qemu instances running back-to-back

I'm wondering if this is of interest for the wider community and, if so, how to proceed.

Thanks,
-ralph

Commit https://github.com/rschmied/qemu/commit/73f02114e718ec898c7cd8e855d0d5d5d7abe362



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-04-29 12:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  6:56 socket.c added support for unix domain socket datagram transport Ralph Schmieder
2021-04-23  9:16 ` Daniel P. Berrangé
2021-04-23 13:38   ` Ralph Schmieder
2021-04-23 15:29 ` Stefano Brivio
2021-04-23 15:48   ` Ralph Schmieder
2021-04-23 16:39     ` Stefano Brivio
2021-04-26 11:14       ` Ralph Schmieder
2021-04-27 21:51         ` Stefano Brivio
2021-04-23 16:21   ` Daniel P. Berrangé
2021-04-23 16:54     ` Stefano Brivio
2021-04-26 12:05       ` Ralph Schmieder
2021-04-26 12:56       ` Daniel P. Berrangé
2021-04-27 21:52         ` Stefano Brivio
2021-04-28  9:02           ` Daniel P. Berrangé
2021-04-29 12:07             ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.