From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Rusty Russell To: Ira Snyder Subject: Re: [RFC v1] virtio: add virtio-over-PCI driver Date: Wed, 18 Feb 2009 17:13:03 +1030 References: <20090217222425.GA18801@ovro.caltech.edu> In-Reply-To: <20090217222425.GA18801@ovro.caltech.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200902181713.03820.rusty@rustcorp.com.au> Cc: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Jan-Bernd Themann List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wednesday 18 February 2009 08:54:25 Ira Snyder wrote: > This adds support to Linux for using virtio between two computers linked by > a PCI interface. This allows the use of virtio_net to create a familiar, > fast interface for communication. It should be possible to use other virtio > devices in the future, but this has not been tested. Hi Ira, It's only first glance, but this looks sane. Two things on first note: don't restrict yourself to 32 feature bits (only PCI does this, and they're going to have to hack when we reach feature 32). Secondly: > +You will notice that the algorithm has no way of handling chains that are > +not exactly the same on the host and guest system. Without setting any of > +the fancier virtio_net features, this is the case. Hmm, I think we can do slightly better than this. How about prepending a 4 byte length on the host buffers? Allows host to specify length (for host->guest), and guest writes it to allow truncated buffers on guest->host. That won't allow you to transfer *more* than one buffersize to the host, but you could use a different method (perhaps the 4 bytes indicates the *total* length?). Do 4-byte DMA's suck for some reason? Cheers, Rusty.