From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ND2ZQ-00084e-7W for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:05:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ND2ZI-00081p-82 for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:05:05 -0500 Received: from [199.232.76.173] (port=58015 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND2ZI-00081m-5P for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:05:00 -0500 Received: from e5.ny.us.ibm.com ([32.97.182.145]:49617) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ND2ZH-00078g-Ce for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:04:59 -0500 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e5.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nAOKrvxP025484 for ; Tue, 24 Nov 2009 15:53:57 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAOL4nmq2125824 for ; Tue, 24 Nov 2009 16:04:49 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAOAxPS1019336 for ; Tue, 24 Nov 2009 05:59:25 -0500 Message-ID: <4B0C4A6F.3000305@linux.vnet.ibm.com> Date: Tue, 24 Nov 2009 15:04:47 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <20091124194502.GA4250@redhat.com> <4B0C3901.5010100@linux.vnet.ibm.com> <20091124195458.GA4290@redhat.com> In-Reply-To: <20091124195458.GA4290@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] qemu/virtio-net: remove wrong s/g layout assumptions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Shirley Ma , Rusty Russell , qemu-devel@nongnu.org Michael S. Tsirkin wrote: > On Tue, Nov 24, 2009 at 01:50:25PM -0600, Anthony Liguori wrote: > >> Michael S. Tsirkin wrote: >> >>> virtio net currently assumes that the first s/g element it gets is >>> always virtio net header. This is wrong. >>> There should be no assumption on sg boundaries. For example, the guest >>> should be able to put the virtio_net_hdr in the front of the skbuf data >>> if there is room. Get rid of this assumption, properly consume space >>> from iovec, always. >>> >>> >> Practically speaking, we ought to advertise a feature bit to let a >> kernel know that we are no longer broken. >> >> Otherwise, there are a ton of old userspaces that will break with new >> guests. >> > > My thinking is, first of all let's fix the bug. > We'll add a feature bit when or if some guest wants to use it. > Maybe this will be 100 years down the road when all old userspace > has died a natural death :) > Makes sense? > I don't think it's useful to do this without adding a feature bit. If we don't add a feature bit, the guest kernel cannot rely on this behavior so it means by definition this is dead code. -- Regards, Anthony Liguori