From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: copyless virtio net thoughts? Date: Thu, 19 Feb 2009 22:06:17 +1030 Message-ID: <200902192206.17557.rusty@rustcorp.com.au> 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="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Chris Wright , Arnd Bergmann , Herbert Xu , kvm@vger.kernel.org To: Simon Horman Return-path: Received: from ozlabs.org ([203.10.76.45]:35480 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbZBSLg3 (ORCPT ); Thu, 19 Feb 2009 06:36:29 -0500 In-Reply-To: <20090218233126.GA3105@verge.net.au> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Thursday 19 February 2009 10:01:42 Simon Horman 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. > > Hi Rusty, > > 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). Not quite: I think PCI passthrough IMHO is the *wrong* way to do it: it makes migrate complicated (if not impossible), and requires emulation or the same NIC on the destination host. This would be the *host* seeing the virtual functions as multiple NICs, then the ability to attach a given NIC directly to a process. This isn't guest-visible: the kvm process is configured to connect directly to a NIC, rather than (say) bridging through the host. > If so, wouldn't this also be useful > on machines that have multiple NICs? Yes, but mainly as a benchmark hack AFAICT :) Hope that clarifies, Rusty.