qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v3 00/11] qapi: net: add unix socket type support to netd


From: Dr. David Alan Gilbert
Subject: Re: [RFC PATCH v3 00/11] qapi: net: add unix socket type support to netdev backend
Date: Tue, 21 Jun 2022 11:31:36 +0100
User-agent: Mutt/2.2.5 (2022-05-16)

* Laurent Vivier (lvivier@redhat.com) wrote:
> On 20/06/2022 20:24, Dr. David Alan Gilbert wrote:
> > * Laurent Vivier (lvivier@redhat.com) wrote:
> > > "-netdev socket" only supports inet sockets.
> > > 
> > > It's not a complex task to add support for unix sockets, but
> > > the socket netdev parameters are not defined to manage well unix
> > > socket parameters.
> > > 
> > > As discussed in:
> > > 
> > >    "socket.c added support for unix domain socket datagram transport"
> > >    
> > > https://lore.kernel.org/qemu-devel/1C0E1BC5-904F-46B0-8044-68E43E67BE60@gmail.com/
> > > 
> > > This series adds support of unix socket type using SocketAddress QAPI 
> > > structure.
> > > 
> > > Two new netdev backends, "stream" and "dgram" are added, that are barely 
> > > a copy of "socket"
> > > backend but they use the SocketAddress QAPI to provide socket parameters.
> > > And then they also implement unix sockets (TCP and UDP).
> > 
> > Had you considered a -netdev chardev?
> > 
> 
> I think by definition a "chardev" doesn't behave like a "netdev". Moreover
> "chardev" is already a frontend for several backends (socket, udp, ...),
> this would mean we use the frontend "chardev" as a backend of a "netdev".
> More and more layers...

Yeh definitely more layers; but perhaps avoiding some duplication.

> And in the case of "-netdev dgram", we can use unix socket and
> sendto()/recv() while something like "-chardev udp,id=char0 -netdev
> chardev,chardev=char0,id=net0" doesn't support unix (see
> qio_channel_socket_dgram_sync()/socket_dgram()) and uses a
> "connect()/sendmsg()/recv()" (that really changes the behaviour of the
> backend)

It was -chardev socket, path=/unix/socket/path    that I was thinking
of; -chardev socket supports both tcp and unix already.

> The aim of this series is to add unix socket support.

Yes.

Dave

> Thanks,
> Laurent
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]