From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K.V" Subject: Re: [PATCH 4/5] tools/kvm/9p: Fix the pdu len. Date: Sun, 19 Jun 2011 10:41:35 +0530 Message-ID: <87ips21k3c.fsf@linux.vnet.ibm.com> References: <1308419348-31934-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1308419348-31934-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1308423079.3766.7.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: penberg@kernel.org, kvm@vger.kernel.org To: Sasha Levin Return-path: Received: from e39.co.us.ibm.com ([32.97.110.160]:39624 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750773Ab1FSFLu (ORCPT ); Sun, 19 Jun 2011 01:11:50 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e39.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p5J4vQFJ008514 for ; Sat, 18 Jun 2011 22:57:26 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p5J5BhKC177782 for ; Sat, 18 Jun 2011 23:11:43 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p5INBFAH013438 for ; Sat, 18 Jun 2011 17:11:16 -0600 In-Reply-To: <1308423079.3766.7.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, 18 Jun 2011 14:51:19 -0400, Sasha Levin wrote: > On Sat, 2011-06-18 at 23:19 +0530, Aneesh Kumar K.V wrote: > > The TSTAT output formwat is wS. So not sure whey we > > need sizeof(u16)*2 in pdu length. > > See http://ericvh.github.com/9p-rfc/rfc9p2000.html#anchor32 > > "BUGS > > To make the contents of a directory, such as returned by read(5), > easy to parse, each directory entry begins with a size field. For > consistency, the entries in Twstat and Rstat messages also contain their > size, which means the size appears twice. For example, the Rstat message > is formatted as ``(4+1+2+2+n)[4] Rstat tag[2] n[2] (n-2)[2] type[2] > dev[4]...,'' where n is the value returned by convD2M." > The value returned by virtio_p9_fill_stat will include the accounting for extra size field added to rstat reply. So we just need an additional sizeof(u16). Not sizeof(u16) * 2 right ? -aneesh