aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/gss_krb5.h3
-rw-r--r--include/linux/sunrpc/svc.h7
-rw-r--r--include/linux/sunrpc/svc_rdma.h36
3 files changed, 35 insertions, 11 deletions
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h
index a10f1fb0bf7c..e7bbdba474d5 100644
--- a/include/linux/sunrpc/gss_krb5.h
+++ b/include/linux/sunrpc/gss_krb5.h
@@ -51,6 +51,9 @@ struct krb5_ctx {
51 51
52extern spinlock_t krb5_seq_lock; 52extern spinlock_t krb5_seq_lock;
53 53
54/* The length of the Kerberos GSS token header */
55#define GSS_KRB5_TOK_HDR_LEN (16)
56
54#define KG_TOK_MIC_MSG 0x0101 57#define KG_TOK_MIC_MSG 0x0101
55#define KG_TOK_WRAP_MSG 0x0201 58#define KG_TOK_WRAP_MSG 0x0201
56 59
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 4b54c5fdcfd9..dc69068d94c7 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -22,7 +22,7 @@
22/* 22/*
23 * This is the RPC server thread function prototype 23 * This is the RPC server thread function prototype
24 */ 24 */
25typedef void (*svc_thread_fn)(struct svc_rqst *); 25typedef int (*svc_thread_fn)(void *);
26 26
27/* 27/*
28 * 28 *
@@ -80,7 +80,6 @@ struct svc_serv {
80 struct module * sv_module; /* optional module to count when 80 struct module * sv_module; /* optional module to count when
81 * adding threads */ 81 * adding threads */
82 svc_thread_fn sv_function; /* main function for threads */ 82 svc_thread_fn sv_function; /* main function for threads */
83 int sv_kill_signal; /* signal to kill threads */
84}; 83};
85 84
86/* 85/*
@@ -388,8 +387,8 @@ struct svc_rqst *svc_prepare_thread(struct svc_serv *serv,
388 struct svc_pool *pool); 387 struct svc_pool *pool);
389void svc_exit_thread(struct svc_rqst *); 388void svc_exit_thread(struct svc_rqst *);
390struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, 389struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
391 void (*shutdown)(struct svc_serv*), 390 void (*shutdown)(struct svc_serv*), svc_thread_fn,
392 svc_thread_fn, int sig, struct module *); 391 struct module *);
393int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); 392int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
394void svc_destroy(struct svc_serv *); 393void svc_destroy(struct svc_serv *);
395int svc_process(struct svc_rqst *); 394int svc_process(struct svc_rqst *);
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index 05eb4664d0dd..ef2e3a20bf3b 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -72,7 +72,7 @@ extern atomic_t rdma_stat_sq_prod;
72 */ 72 */
73struct svc_rdma_op_ctxt { 73struct svc_rdma_op_ctxt {
74 struct svc_rdma_op_ctxt *read_hdr; 74 struct svc_rdma_op_ctxt *read_hdr;
75 struct list_head free_list; 75 int hdr_count;
76 struct xdr_buf arg; 76 struct xdr_buf arg;
77 struct list_head dto_q; 77 struct list_head dto_q;
78 enum ib_wr_opcode wr_op; 78 enum ib_wr_opcode wr_op;
@@ -86,6 +86,31 @@ struct svc_rdma_op_ctxt {
86 struct page *pages[RPCSVC_MAXPAGES]; 86 struct page *pages[RPCSVC_MAXPAGES];
87}; 87};
88 88
89/*
90 * NFS_ requests are mapped on the client side by the chunk lists in
91 * the RPCRDMA header. During the fetching of the RPC from the client
92 * and the writing of the reply to the client, the memory in the
93 * client and the memory in the server must be mapped as contiguous
94 * vaddr/len for access by the hardware. These data strucures keep
95 * these mappings.
96 *
97 * For an RDMA_WRITE, the 'sge' maps the RPC REPLY. For RDMA_READ, the
98 * 'sge' in the svc_rdma_req_map maps the server side RPC reply and the
99 * 'ch' field maps the read-list of the RPCRDMA header to the 'sge'
100 * mapping of the reply.
101 */
102struct svc_rdma_chunk_sge {
103 int start; /* sge no for this chunk */
104 int count; /* sge count for this chunk */
105};
106struct svc_rdma_req_map {
107 unsigned long count;
108 union {
109 struct kvec sge[RPCSVC_MAXPAGES];
110 struct svc_rdma_chunk_sge ch[RPCSVC_MAXPAGES];
111 };
112};
113
89#define RDMACTXT_F_LAST_CTXT 2 114#define RDMACTXT_F_LAST_CTXT 2
90 115
91struct svcxprt_rdma { 116struct svcxprt_rdma {
@@ -93,7 +118,6 @@ struct svcxprt_rdma {
93 struct rdma_cm_id *sc_cm_id; /* RDMA connection id */ 118 struct rdma_cm_id *sc_cm_id; /* RDMA connection id */
94 struct list_head sc_accept_q; /* Conn. waiting accept */ 119 struct list_head sc_accept_q; /* Conn. waiting accept */
95 int sc_ord; /* RDMA read limit */ 120 int sc_ord; /* RDMA read limit */
96 wait_queue_head_t sc_read_wait;
97 int sc_max_sge; 121 int sc_max_sge;
98 122
99 int sc_sq_depth; /* Depth of SQ */ 123 int sc_sq_depth; /* Depth of SQ */
@@ -104,12 +128,8 @@ struct svcxprt_rdma {
104 128
105 struct ib_pd *sc_pd; 129 struct ib_pd *sc_pd;
106 130
131 atomic_t sc_dma_used;
107 atomic_t sc_ctxt_used; 132 atomic_t sc_ctxt_used;
108 struct list_head sc_ctxt_free;
109 int sc_ctxt_cnt;
110 int sc_ctxt_bump;
111 int sc_ctxt_max;
112 spinlock_t sc_ctxt_lock;
113 struct list_head sc_rq_dto_q; 133 struct list_head sc_rq_dto_q;
114 spinlock_t sc_rq_dto_lock; 134 spinlock_t sc_rq_dto_lock;
115 struct ib_qp *sc_qp; 135 struct ib_qp *sc_qp;
@@ -173,6 +193,8 @@ extern int svc_rdma_post_recv(struct svcxprt_rdma *);
173extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); 193extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *);
174extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *); 194extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *);
175extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int); 195extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int);
196extern struct svc_rdma_req_map *svc_rdma_get_req_map(void);
197extern void svc_rdma_put_req_map(struct svc_rdma_req_map *);
176extern void svc_sq_reap(struct svcxprt_rdma *); 198extern void svc_sq_reap(struct svcxprt_rdma *);
177extern void svc_rq_reap(struct svcxprt_rdma *); 199extern void svc_rq_reap(struct svcxprt_rdma *);
178extern struct svc_xprt_class svc_rdma_class; 200extern struct svc_xprt_class svc_rdma_class;