From: Chris Wright Subject: Re: copyless virtio net thoughts? Date: Thu, 19 Feb 2009 03:37:52 -0800 Message-ID: <20090219113752.GB25891@sequoia.sous-sol.org> References: <20090205020732.GA27684@sequoia.sous-sol.org> <200902182208.00843.rusty@rustcorp.com.au> <20090218233126.GA3105@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Rusty Russell , Chris Wright , Arnd Bergmann , Herbert Xu , kvm@vger.kernel.org To: Simon Horman Return-path: Received: from sous-sol.org ([216.99.217.87]:53337 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751526AbZBSLjW (ORCPT ); Thu, 19 Feb 2009 06:39:22 -0500 Content-Disposition: inline In-Reply-To: <20090218233126.GA3105@verge.net.au> Sender: kvm-owner@vger.kernel.org List-ID: * Simon Horman (horms@verge.net.au) wrote: > On Wed, Feb 18, 2009 at 10:08:00PM +1030, Rusty Russell wrote: > > 2) Direct NIC attachment This is particularly interesting with SR-IOV or > > other multiqueue nics, but for boutique cases or benchmarks, could be for > > normal NICs. So far I have some very sketched-out patches: for the > > attached nic dev_alloc_skb() gets an skb from the guest (which supplies > > them via some kind of AIO interface), and a branch in netif_receive_skb() > > which returned it to the guest. This bypasses all firewalling in the > > host though; we're basically having the guest process drive the NIC > > directly. > > Can I clarify that the idea with utilising SR-IOV would be to assign > virtual functions to guests? That is, something conceptually similar to > PCI pass-through in Xen (although I'm not sure that anyone has virtual > function pass-through working yet). If so, wouldn't this also be useful > on machines that have multiple NICs? This would be the typical usecase for sr-iov. But I think Rusty is referring to giving a nic "directly" to a guest but the guest is still seeing a virtio nic (not pass-through/device-assignment). So there's no bridge, and zero copy so the dma buffers are supplied by guest, but host has the driver for the physical nic or the VF. thanks, -chris