From mboxrd@z Thu Jan 1 00:00:00 1970 From: Venkateswararao Jujjuri Subject: Re: [PATCH 1/3] [net/9p] Fix the size of receive buffer packing onto VirtIO ring. Date: Fri, 01 Jul 2011 09:29:20 -0700 Message-ID: <4E0DF5E0.3020701@linux.vnet.ibm.com> References: <1309475921-12171-1-git-send-email-jvrao@linux.vnet.ibm.com> <878vsint4z.fsf@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, ericvh@gmail.com To: "Aneesh Kumar K.V" Return-path: Received: from e32.co.us.ibm.com ([32.97.110.150]:55375 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756652Ab1GAQ3f (ORCPT ); Fri, 1 Jul 2011 12:29:35 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p61GHcPB016307 for ; Fri, 1 Jul 2011 10:17:38 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p61GTPp7118768 for ; Fri, 1 Jul 2011 10:29:25 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p61GTNpo018712 for ; Fri, 1 Jul 2011 10:29:25 -0600 In-Reply-To: <878vsint4z.fsf@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 07/01/2011 04:21 AM, Aneesh Kumar K.V wrote: > On Thu, 30 Jun 2011 16:18:39 -0700, "Venkateswararao Jujjuri (JV)" wrote: >> Signed-off-by: Venkateswararao Jujjuri " >> --- >> net/9p/trans_virtio.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c >> index 244e707..0ec5423 100644 >> --- a/net/9p/trans_virtio.c >> +++ b/net/9p/trans_virtio.c >> @@ -367,7 +367,7 @@ req_retry_pinned: >> in += inp; >> } else { >> in = pack_sg_list(chan->sg, out, VIRTQUEUE_NUM, rdata, >> - client->msize); >> + req->rc->capacity); >> } >> >> err = virtqueue_add_buf(chan->vq, chan->sg, out, in, req->tc); > So when will req->rc->capacity be different from client->msize ? Can we > get details for that documented in p9_tag_alloc ? > > The above pack_sg_list will only be called for non-zero copy case ? In > that case won't client->size be same as rc->capacity ? you mean client->msize? Yes this else case is only in the non-zc case. Basically the client->msize is the maximum pdu size. say our msize is 128k, and we are doing a TVERSION, the logic falls into the else case where no ZC is needed. In this case we are operating with the rc->capacity not the entire msize. Thanks, JV > -aneesh