]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/sunrpc/xprt.h
SUNRPC: RPC metrics and RTT estimator should use same RTT value
[mv-sheeva.git] / include / linux / sunrpc / xprt.h
index 1175d58efc2e8498ea52c236c759ae0116ef23db..04fc342d9840059cd351503c79ddb8ccd046aef9 100644 (file)
@@ -38,10 +38,8 @@ enum rpc_display_format_t {
        RPC_DISPLAY_ADDR = 0,
        RPC_DISPLAY_PORT,
        RPC_DISPLAY_PROTO,
-       RPC_DISPLAY_ALL,
        RPC_DISPLAY_HEX_ADDR,
        RPC_DISPLAY_HEX_PORT,
-       RPC_DISPLAY_UNIVERSAL_ADDR,
        RPC_DISPLAY_NETID,
        RPC_DISPLAY_MAX,
 };
@@ -126,6 +124,23 @@ struct rpc_xprt_ops {
        void            (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
 };
 
+/*
+ * RPC transport identifiers
+ *
+ * To preserve compatibility with the historical use of raw IP protocol
+ * id's for transport selection, UDP and TCP identifiers are specified
+ * with the previous values. No such restriction exists for new transports,
+ * except that they may not collide with these values (17 and 6,
+ * respectively).
+ */
+#define XPRT_TRANSPORT_BC       (1 << 31)
+enum xprt_transports {
+       XPRT_TRANSPORT_UDP      = IPPROTO_UDP,
+       XPRT_TRANSPORT_TCP      = IPPROTO_TCP,
+       XPRT_TRANSPORT_BC_TCP   = IPPROTO_TCP | XPRT_TRANSPORT_BC,
+       XPRT_TRANSPORT_RDMA     = 256
+};
+
 struct rpc_xprt {
        struct kref             kref;           /* Reference count */
        struct rpc_xprt_ops *   ops;            /* transport methods */
@@ -159,8 +174,7 @@ struct rpc_xprt {
        /*
         * Connection of transports
         */
-       unsigned long           connect_timeout,
-                               bind_timeout,
+       unsigned long           bind_timeout,
                                reestablish_timeout;
        unsigned int            connect_cookie; /* A cookie that gets bumped
                                                   every time the transport
@@ -181,6 +195,7 @@ struct rpc_xprt {
        spinlock_t              reserve_lock;   /* lock slot table */
        u32                     xid;            /* Next XID value to use */
        struct rpc_task *       snd_task;       /* Task blocked in send */
+       struct svc_xprt         *bc_xprt;       /* NFSv4.1 backchannel */
 #if defined(CONFIG_NFS_V4_1)
        struct svc_serv         *bc_serv;       /* The RPC service which will */
                                                /* process the callback */
@@ -233,6 +248,7 @@ struct xprt_create {
        struct sockaddr *       srcaddr;        /* optional local address */
        struct sockaddr *       dstaddr;        /* remote peer address */
        size_t                  addrlen;
+       struct svc_xprt         *bc_xprt;       /* NFSv4.1 backchannel */
 };
 
 struct xprt_class {
@@ -277,7 +293,6 @@ void                        xprt_set_retrans_timeout_rtt(struct rpc_task *task);
 void                   xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status);
 void                   xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action);
 void                   xprt_write_space(struct rpc_xprt *xprt);
-void                   xprt_update_rtt(struct rpc_task *task);
 void                   xprt_adjust_cwnd(struct rpc_task *task, int result);
 struct rpc_rqst *      xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid);
 void                   xprt_complete_rqst(struct rpc_task *task, int copied);