linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
To: v9fs-developer@lists.sourceforge.net
Cc: linux-fsdevel@vger.kernel.org,
	"Venkateswararao Jujjuri (JV)" <jvrao@linux.vnet.ibm.com>
Subject: [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate zero copy.
Date: Sun,  6 Feb 2011 23:21:21 -0800	[thread overview]
Message-ID: <1297063283-2180-6-git-send-email-jvrao@linux.vnet.ibm.com> (raw)
In-Reply-To: <1297063283-2180-1-git-send-email-jvrao@linux.vnet.ibm.com>

This patch adds preferences field to the p9_trans_module.
Through this, now transport layer can express its preference about the
payload. i.e if payload neds to be part of the PDU or it prefers it
to be sent sepearetly so that the transport layer can handle it in
a better way.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
---
 include/net/9p/transport.h |    9 +++++++++
 net/9p/trans_virtio.c      |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 6d5886e..13c01a8 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -26,11 +26,19 @@
 #ifndef NET_9P_TRANSPORT_H
 #define NET_9P_TRANSPORT_H
 
+#define P9_TRANS_PREF_PAYLOAD_MASK 0x1
+
+/* Default. Add Payload to PDU before sending it down to transport layer */
+#define P9_TRANS_PREF_PAYLOAD_DEF  0x0 
+/* Send pay load seperately to transport layer along with PDU.*/
+#define P9_TRANS_PREF_PAYLOAD_SEP  0x1
+
 /**
  * struct p9_trans_module - transport module interface
  * @list: used to maintain a list of currently available transports
  * @name: the human-readable name of the transport
  * @maxsize: transport provided maximum packet size
+ * @pref: Preferences of this transport
  * @def: set if this transport should be considered the default
  * @create: member function to create a new connection on this transport
  * @request: member function to issue a request to the transport
@@ -47,6 +55,7 @@ struct p9_trans_module {
 	struct list_head list;
 	char *name;		/* name of transport */
 	int maxsize;		/* max message size of transport */
+	int pref;               /* Preferences of this transport */
 	int def;		/* this transport should be default */
 	struct module *owner;
 	int (*create)(struct p9_client *, const char *, char *);
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 607f064..c76ace6 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -521,6 +521,7 @@ static struct p9_trans_module p9_virtio_trans = {
 	.request = p9_virtio_request,
 	.cancel = p9_virtio_cancel,
 	.maxsize = PAGE_SIZE*16,
+	.pref = P9_TRANS_PREF_PAYLOAD_DEF,
 	.def = 0,
 	.owner = THIS_MODULE,
 };
-- 
1.6.5.2


  parent reply	other threads:[~2011-02-07  6:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07  7:21 [RFC-V2] [PATCH 0/7] Zero Copy Venkateswararao Jujjuri (JV)
2011-02-07  6:55 ` Venkateswararao Jujjuri (JV)
2011-02-07  7:21 ` [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate zero copy Venkateswararao Jujjuri (JV)
2011-02-07  7:21 ` Venkateswararao Jujjuri (JV)
2011-02-07  6:56   ` [RFC] [PATCH 2/7] [net/9p] Adds supporting functions for " Venkateswararao Jujjuri (JV)
2011-02-08 15:20     ` [V9fs-developer] " Latchesar Ionkov
2011-02-08 17:21       ` Venkateswararao Jujjuri (JV)
2011-02-07  7:21 ` [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate " Venkateswararao Jujjuri (JV)
2011-02-07  6:56   ` [RFC] [PATCH 3/7] [net/9p] Assign type of transaction to tc->pdu->id which is otherwise unsed Venkateswararao Jujjuri (JV)
2011-02-07  7:21 ` [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate zero copy Venkateswararao Jujjuri (JV)
2011-02-07  6:56   ` [RFC] [PATCH 4/7] [net/9p] Add gup/zero_copy support to VirtIO transport layer Venkateswararao Jujjuri (JV)
2011-02-07  7:21 ` Venkateswararao Jujjuri (JV) [this message]
2011-02-07  6:57   ` [RFC] [PATCH 5/7] [net/9p] Add preferences to " Venkateswararao Jujjuri (JV)
2011-02-07  7:21 ` [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate zero copy Venkateswararao Jujjuri (JV)
2011-02-07  6:57   ` :[RFC] [PATCH 6/7] [net/9p] Read and Write side zerocopy changes for 9P2000.L protocol Venkateswararao Jujjuri (JV)
2011-02-08 21:09     ` [V9fs-developer] " Eric Van Hensbergen
2011-02-08 21:16       ` Eric Van Hensbergen
2011-02-09 21:09         ` Venkateswararao Jujjuri (JV)
2011-02-09 21:12           ` Venkateswararao Jujjuri (JV)
2011-02-09 21:18           ` Eric Van Hensbergen
2011-02-09 21:39             ` Venkateswararao Jujjuri (JV)
2011-02-08 23:50       ` Venkateswararao Jujjuri (JV)
2011-02-09  1:59         ` Venkateswararao Jujjuri (JV)
2011-02-09 14:28           ` Eric Van Hensbergen
2011-02-07  7:21 ` [RFC] [PATCH 1/7] [net/9p] Additional elements to p9_fcall to accomodate zero copy Venkateswararao Jujjuri (JV)
2011-02-07  6:58   ` [PATCH 7/7] [net/9p] Handle TREAD/RERROR case in !dotl case Venkateswararao Jujjuri (JV)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297063283-2180-6-git-send-email-jvrao@linux.vnet.ibm.com \
    --to=jvrao@linux.vnet.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).