Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757559Ab0DOJHg (ORCPT ); Thu, 15 Apr 2010 05:07:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756817Ab0DOJHe (ORCPT ); Thu, 15 Apr 2010 05:07:34 -0400 Date: Thu, 15 Apr 2010 12:03:24 +0300 From: "Michael S. Tsirkin" To: "Xin, Xiaohui" Cc: Arnd Bergmann , "netdev@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mingo@elte.hu" , "davem@davemloft.net" , "jdike@linux.intel.com" Subject: Re: [RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net. Message-ID: <20100415090324.GA15135@redhat.com> References: <1270805865-16901-1-git-send-email-xiaohui.xin@intel.com> <1270805865-16901-2-git-send-email-xiaohui.xin@intel.com> <201004141655.21885.arnd@arndb.de> <97F6D3BD476C464182C1B7BABF0B0AF5C18969A5@shzsmsx502.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <97F6D3BD476C464182C1B7BABF0B0AF5C18969A5@shzsmsx502.ccr.corp.intel.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 877 Lines: 19 On Thu, Apr 15, 2010 at 05:01:10PM +0800, Xin, Xiaohui wrote: > >It smells like a layering violation to look at the iocb->private field > >from a lower-level driver. I would have hoped that it's possible to implement > >this without having this driver know about the higher-level vhost driver > >internals. Can you explain why this is needed? > > I don't like this too, but since the kiocb is maintained by vhost with a list_head. > And mp device is responsible to collect the kiocb into the list_head, > We need something known by vhost/mp both. Can't vhost supply a kiocb completion callback that will handle the list? -- MST -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/