mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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 <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
This commit is contained in:
parent
6752a1ebd1
commit
022cae3655
5 changed files with 139 additions and 0 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue