From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Venkateswararao Jujjuri (JV)" Subject: [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate zero copy. Date: Sun, 6 Feb 2011 23:21:17 -0800 Message-ID: <1297063283-2180-2-git-send-email-jvrao@linux.vnet.ibm.com> References: <1297063283-2180-1-git-send-email-jvrao@linux.vnet.ibm.com> Cc: linux-fsdevel@vger.kernel.org, "Venkateswararao Jujjuri (JV)" To: v9fs-developer@lists.sourceforge.net Return-path: Received: from e35.co.us.ibm.com ([32.97.110.153]:57992 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287Ab1BGGo0 (ORCPT ); Mon, 7 Feb 2011 01:44:26 -0500 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e35.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p176UHQh004048 for ; Sun, 6 Feb 2011 23:30:17 -0700 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 p176iNeM124196 for ; Sun, 6 Feb 2011 23:44:23 -0700 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 p176iNW1018059 for ; Sun, 6 Feb 2011 23:44:23 -0700 In-Reply-To: <1297063283-2180-1-git-send-email-jvrao@linux.vnet.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Venkateswararao Jujjuri --- include/net/9p/9p.h | 6 ++++++ net/9p/protocol.c | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 071fd7a..9c939c2 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -689,6 +689,9 @@ struct p9_rwstat { * @tag: transaction id of the request * @offset: used by marshalling routines to track currentposition in buffer * @capacity: used by marshalling routines to track total capacity + * @pbuf: Payload buffer given by the caller + * @pbuf_size: pbuf size to be read/written + * @private: For transport layer's use. * @sdata: payload * * &p9_fcall represents the structure for all 9P RPC @@ -705,6 +708,9 @@ struct p9_fcall { size_t offset; size_t capacity; + const uint8_t *pbuf; + size_t pbuf_size; + void *private; uint8_t *sdata; }; diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 1e308f2..c500a0b 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c @@ -606,6 +606,9 @@ void p9pdu_reset(struct p9_fcall *pdu) { pdu->offset = 0; pdu->size = 0; + pdu->private = NULL; + pdu->pbuf = NULL; + pdu->pbuf_size = 0; } int p9dirent_read(char *buf, int len, struct p9_dirent *dirent, -- 1.6.5.2