Re: [PATCH/RFC 7/9] Virtual network guest device driver

ron minnich
2007-05-18T15:14:28Z

On 5/18/07, Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:
>
> > I also
> > am not sure the socket system call interface is quite what we want,
> > although it's a neat idea. It's also not that portable outside the
> > "everything is a Linux variant" world.
>
> A filesystem interface certainly isn't very portable outside the POSIX
> world :-)

Actually, it probably the most portable thing you can have.

> The interface you're proposing is almost functionally identical to a
> socket. In fact, once you open /data you've got an fd that you interact
> with in the same way as you would interact with a socket.

Well, sure, I stole the interface from Plan 9, and they use this
interface to do sockets, among *many* other things -- and there's the
point. The interface is not just sockets. But if you're used to
sockets, it looks familiar. I only steal from the best :-)

Note, btw, that the fd has a path, and can be examined easily, and
also passed to other programs for use. That's messy and ugly with
sockets.

>
> It's not that there's an unique value for this sort of interface in
> virtualization; I don't think you're making that argument. Instead,
> you're making a general argument as to why this way of doing things is
> better than what Unix has been doing forever (with things like
> sockets)

Yes, Unix has been "doing it this way" forever. The interface I am
proposing was
the one designed by the Unix guys -- once they realized how deficient
the Unix way of doing things had become.

But, forgetting all this argument, it still seems to me that the file
system interface is far simpler than a socket interface. No binary
structures. No new sockaddr structures needed. No alignment/padding
rules. You can actually set up a link from a shell script, or perl, or
python, or whatever, without a special set of bindings.

> A socket interface would provide a simple, well-understood interface
> that few people in the Linux community would disagree with (it's already
> there for s390).

Yes, but ... well understood to the Linux community. Can we look at a
broader scope?

We've got a golden opportunity here to build a really flexible VMIC
interface. I would hate to lose it.

Anyway, thanks for discussing this.

ron