diff options
author | Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com> | 2011-02-06 15:08:01 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2011-03-15 10:57:35 -0400 |
commit | 6f69c395cefb26ebba2c9bb725296a3a4a9200ec (patch) | |
tree | 7012a54d7bef23aef8a14b938d329d87609d8937 /include/net/9p | |
parent | 4038866dab4e461e0ef144458bad9d70ce0c98c1 (diff) |
[net/9p] Add preferences to transport layer.
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>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'include/net/9p')
-rw-r--r-- | include/net/9p/transport.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 6d5886efb102..82868f18c573 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,11 +26,19 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | #define P9_TRANS_PREF_PAYLOAD_MASK 0x1 | ||
30 | |||
31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | ||
32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | ||
33 | /* Send pay load seperately to transport layer along with PDU.*/ | ||
34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | ||
35 | |||
29 | /** | 36 | /** |
30 | * struct p9_trans_module - transport module interface | 37 | * struct p9_trans_module - transport module interface |
31 | * @list: used to maintain a list of currently available transports | 38 | * @list: used to maintain a list of currently available transports |
32 | * @name: the human-readable name of the transport | 39 | * @name: the human-readable name of the transport |
33 | * @maxsize: transport provided maximum packet size | 40 | * @maxsize: transport provided maximum packet size |
41 | * @pref: Preferences of this transport | ||
34 | * @def: set if this transport should be considered the default | 42 | * @def: set if this transport should be considered the default |
35 | * @create: member function to create a new connection on this transport | 43 | * @create: member function to create a new connection on this transport |
36 | * @request: member function to issue a request to the transport | 44 | * @request: member function to issue a request to the transport |
@@ -47,6 +55,7 @@ struct p9_trans_module { | |||
47 | struct list_head list; | 55 | struct list_head list; |
48 | char *name; /* name of transport */ | 56 | char *name; /* name of transport */ |
49 | int maxsize; /* max message size of transport */ | 57 | int maxsize; /* max message size of transport */ |
58 | int pref; /* Preferences of this transport */ | ||
50 | int def; /* this transport should be default */ | 59 | int def; /* this transport should be default */ |
51 | struct module *owner; | 60 | struct module *owner; |
52 | int (*create)(struct p9_client *, const char *, char *); | 61 | int (*create)(struct p9_client *, const char *, char *); |