From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Venkateswararao Jujjuri (JV)" Subject: [RFC-V3 1/7] [net/9p] Additional elements to p9_fcall to acoomodate zero copy. Date: Thu, 10 Feb 2011 17:25:05 -0800 Message-ID: <1297387511-2697-2-git-send-email-jvrao@linux.vnet.ibm.com> References: <1297387511-2697-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 e34.co.us.ibm.com ([32.97.110.152]:49505 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546Ab1BKArY (ORCPT ); Thu, 10 Feb 2011 19:47:24 -0500 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p1B0a3cw011759 for ; Thu, 10 Feb 2011 17:36:03 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1B0lOhc127104 for ; Thu, 10 Feb 2011 17:47:24 -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 p1B0lNVd028020 for ; Thu, 10 Feb 2011 17:47:23 -0700 In-Reply-To: <1297387511-2697-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 | 8 ++++++++ net/9p/protocol.c | 4 ++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 071fd7a..7aefa6d 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -689,6 +689,10 @@ 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 + * @pubuf: Payload user buffer given by the caller + * @pubuf: Payload kernel buffer given by the caller + * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write. + * @private: For transport layer's use. * @sdata: payload * * &p9_fcall represents the structure for all 9P RPC @@ -705,6 +709,10 @@ struct p9_fcall { size_t offset; size_t capacity; + char __user *pubuf; + char *pkbuf; + size_t pbuf_size; + void *private; uint8_t *sdata; }; diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 1e308f2..d888847 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c @@ -606,6 +606,10 @@ void p9pdu_reset(struct p9_fcall *pdu) { pdu->offset = 0; pdu->size = 0; + pdu->private = NULL; + pdu->pubuf = NULL; + pdu->pkbuf = NULL; + pdu->pbuf_size = 0; } int p9dirent_read(char *buf, int len, struct p9_dirent *dirent, -- 1.6.5.2