diff mbox

[V9fs-developer,RFC,1/7,net/9p] Additional elements to p9_fcall to accomodate zero copy.

Message ID 1297063283-2180-2-git-send-email-jvrao@linux.vnet.ibm.com (mailing list archive)
State RFC, archived
Delegated to: Eric Van Hensbergen
Headers show

Commit Message

jvrao Feb. 7, 2011, 7:21 a.m. UTC
None
diff mbox

Patch

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,