aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/9p
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2011-01-28 17:11:13 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 10:57:34 -0400
commit022cae36551ba805bf82084047945b2901d75f36 (patch)
tree5d8a8ff0eb2102d0449f58ddfcb8907bd3625682 /include/net/9p
parent6752a1ebd13f69b9d5ff08914fe29ee2813cbeea (diff)
[net/9p] Preparation and helper functions for zero copy
This patch prepares p9_fcall structure for zero copy. Added fields send the payload buffer information to the transport layer. In addition it adds a 'private' field for the transport layer to store mapped/pinned page information so that it can be freed/unpinned during req_done. This patch also creates trans_common.[ch] to house helper functions. It adds the following helper functions. p9_release_req_pages - Release pages after the transaction. p9_nr_pages - Return number of pages needed to accomodate the payload. payload_gup - Translates user buffer into kernel pages. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net/9p')
-rw-r--r--include/net/9p/9p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 071fd7a8d781..7aefa6d975ac 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -689,6 +689,10 @@ struct p9_rwstat {
689 * @tag: transaction id of the request 689 * @tag: transaction id of the request
690 * @offset: used by marshalling routines to track currentposition in buffer 690 * @offset: used by marshalling routines to track currentposition in buffer
691 * @capacity: used by marshalling routines to track total capacity 691 * @capacity: used by marshalling routines to track total capacity
692 * @pubuf: Payload user buffer given by the caller
693 * @pubuf: Payload kernel buffer given by the caller
694 * @pbuf_size: pubuf/pkbuf(only one will be !NULL) size to be read/write.
695 * @private: For transport layer's use.
692 * @sdata: payload 696 * @sdata: payload
693 * 697 *
694 * &p9_fcall represents the structure for all 9P RPC 698 * &p9_fcall represents the structure for all 9P RPC
@@ -705,6 +709,10 @@ struct p9_fcall {
705 709
706 size_t offset; 710 size_t offset;
707 size_t capacity; 711 size_t capacity;
712 char __user *pubuf;
713 char *pkbuf;
714 size_t pbuf_size;
715 void *private;
708 716
709 uint8_t *sdata; 717 uint8_t *sdata;
710}; 718};