aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/9p/transport.h9
-rw-r--r--net/9p/trans_virtio.c1
2 files changed, 10 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 *);
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 4b236de132da..9b550ed9c711 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -566,6 +566,7 @@ static struct p9_trans_module p9_virtio_trans = {
566 .request = p9_virtio_request, 566 .request = p9_virtio_request,
567 .cancel = p9_virtio_cancel, 567 .cancel = p9_virtio_cancel,
568 .maxsize = PAGE_SIZE*16, 568 .maxsize = PAGE_SIZE*16,
569 .pref = P9_TRANS_PREF_PAYLOAD_SEP,
569 .def = 0, 570 .def = 0,
570 .owner = THIS_MODULE, 571 .owner = THIS_MODULE,
571}; 572};