1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50#include <linux/module.h>
51#include <linux/init.h>
52#include <linux/slab.h>
53#include <linux/seq_file.h>
54
55#include "xprt_rdma.h"
56
57#ifdef RPC_DEBUG
58# define RPCDBG_FACILITY RPCDBG_TRANS
59#endif
60
61MODULE_LICENSE("Dual BSD/GPL");
62
63MODULE_DESCRIPTION("RPC/RDMA Transport for Linux kernel NFS");
64MODULE_AUTHOR("Network Appliance, Inc.");
65
66
67
68
69
70static unsigned int xprt_rdma_slot_table_entries = RPCRDMA_DEF_SLOT_TABLE;
71static unsigned int xprt_rdma_max_inline_read = RPCRDMA_DEF_INLINE;
72static unsigned int xprt_rdma_max_inline_write = RPCRDMA_DEF_INLINE;
73static unsigned int xprt_rdma_inline_write_padding;
74static unsigned int xprt_rdma_memreg_strategy = RPCRDMA_FRMR;
75 int xprt_rdma_pad_optimize = 0;
76
77#ifdef RPC_DEBUG
78
79static unsigned int min_slot_table_size = RPCRDMA_MIN_SLOT_TABLE;
80static unsigned int max_slot_table_size = RPCRDMA_MAX_SLOT_TABLE;
81static unsigned int zero;
82static unsigned int max_padding = PAGE_SIZE;
83static unsigned int min_memreg = RPCRDMA_BOUNCEBUFFERS;
84static unsigned int max_memreg = RPCRDMA_LAST - 1;
85
86static struct ctl_table_header *sunrpc_table_header;
87
88static ctl_table xr_tunables_table[] = {
89 {
90 .procname = "rdma_slot_table_entries",
91 .data = &xprt_rdma_slot_table_entries,
92 .maxlen = sizeof(unsigned int),
93 .mode = 0644,
94 .proc_handler = proc_dointvec_minmax,
95 .extra1 = &min_slot_table_size,
96 .extra2 = &max_slot_table_size
97 },
98 {
99 .procname = "rdma_max_inline_read",
100 .data = &xprt_rdma_max_inline_read,
101 .maxlen = sizeof(unsigned int),
102 .mode = 0644,
103 .proc_handler = proc_dointvec,
104 },
105 {
106 .procname = "rdma_max_inline_write",
107 .data = &xprt_rdma_max_inline_write,
108 .maxlen = sizeof(unsigned int),
109 .mode = 0644,
110 .proc_handler = proc_dointvec,
111 },
112 {
113 .procname = "rdma_inline_write_padding",
114 .data = &xprt_rdma_inline_write_padding,
115 .maxlen = sizeof(unsigned int),
116 .mode = 0644,
117 .proc_handler = proc_dointvec_minmax,
118 .extra1 = &zero,
119 .extra2 = &max_padding,
120 },
121 {
122 .procname = "rdma_memreg_strategy",
123 .data = &xprt_rdma_memreg_strategy,
124 .maxlen = sizeof(unsigned int),
125 .mode = 0644,
126 .proc_handler = proc_dointvec_minmax,
127 .extra1 = &min_memreg,
128 .extra2 = &max_memreg,
129 },
130 {
131 .procname = "rdma_pad_optimize",
132 .data = &xprt_rdma_pad_optimize,
133 .maxlen = sizeof(unsigned int),
134 .mode = 0644,
135 .proc_handler = proc_dointvec,
136 },
137 { },
138};
139
140static ctl_table sunrpc_table[] = {
141 {
142 .procname = "sunrpc",
143 .mode = 0555,
144 .child = xr_tunables_table
145 },
146 { },
147};
148
149#endif
150
151static struct rpc_xprt_ops xprt_rdma_procs;
152
153static void
154xprt_rdma_format_addresses(struct rpc_xprt *xprt)
155{
156 struct sockaddr *sap = (struct sockaddr *)
157 &rpcx_to_rdmad(xprt).addr;
158 struct sockaddr_in *sin = (struct sockaddr_in *)sap;
159 char buf[64];
160
161 (void)rpc_ntop(sap, buf, sizeof(buf));
162 xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
163
164 snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
165 xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
166
167 xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
168
169 snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
170 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
171
172 snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
173 xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
174
175
176 xprt->address_strings[RPC_DISPLAY_NETID] = "rdma";
177}
178
179static void
180xprt_rdma_free_addresses(struct rpc_xprt *xprt)
181{
182 unsigned int i;
183
184 for (i = 0; i < RPC_DISPLAY_MAX; i++)
185 switch (i) {
186 case RPC_DISPLAY_PROTO:
187 case RPC_DISPLAY_NETID:
188 continue;
189 default:
190 kfree(xprt->address_strings[i]);
191 }
192}
193
194static void
195xprt_rdma_connect_worker(struct work_struct *work)
196{
197 struct rpcrdma_xprt *r_xprt =
198 container_of(work, struct rpcrdma_xprt, rdma_connect.work);
199 struct rpc_xprt *xprt = &r_xprt->xprt;
200 int rc = 0;
201
202 if (!xprt->shutdown) {
203 xprt_clear_connected(xprt);
204
205 dprintk("RPC: %s: %sconnect\n", __func__,
206 r_xprt->rx_ep.rep_connected != 0 ? "re" : "");
207 rc = rpcrdma_ep_connect(&r_xprt->rx_ep, &r_xprt->rx_ia);
208 if (rc)
209 goto out;
210 }
211 goto out_clear;
212
213out:
214 xprt_wake_pending_tasks(xprt, rc);
215
216out_clear:
217 dprintk("RPC: %s: exit\n", __func__);
218 xprt_clear_connecting(xprt);
219}
220
221
222
223
224
225
226
227
228
229
230
231
232static void
233xprt_rdma_destroy(struct rpc_xprt *xprt)
234{
235 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
236 int rc;
237
238 dprintk("RPC: %s: called\n", __func__);
239
240 cancel_delayed_work_sync(&r_xprt->rdma_connect);
241
242 xprt_clear_connected(xprt);
243
244 rpcrdma_buffer_destroy(&r_xprt->rx_buf);
245 rc = rpcrdma_ep_destroy(&r_xprt->rx_ep, &r_xprt->rx_ia);
246 if (rc)
247 dprintk("RPC: %s: rpcrdma_ep_destroy returned %i\n",
248 __func__, rc);
249 rpcrdma_ia_close(&r_xprt->rx_ia);
250
251 xprt_rdma_free_addresses(xprt);
252
253 xprt_free(xprt);
254
255 dprintk("RPC: %s: returning\n", __func__);
256
257 module_put(THIS_MODULE);
258}
259
260static const struct rpc_timeout xprt_rdma_default_timeout = {
261 .to_initval = 60 * HZ,
262 .to_maxval = 60 * HZ,
263};
264
265
266
267
268
269
270static struct rpc_xprt *
271xprt_setup_rdma(struct xprt_create *args)
272{
273 struct rpcrdma_create_data_internal cdata;
274 struct rpc_xprt *xprt;
275 struct rpcrdma_xprt *new_xprt;
276 struct rpcrdma_ep *new_ep;
277 struct sockaddr_in *sin;
278 int rc;
279
280 if (args->addrlen > sizeof(xprt->addr)) {
281 dprintk("RPC: %s: address too large\n", __func__);
282 return ERR_PTR(-EBADF);
283 }
284
285 xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt),
286 xprt_rdma_slot_table_entries,
287 xprt_rdma_slot_table_entries);
288 if (xprt == NULL) {
289 dprintk("RPC: %s: couldn't allocate rpcrdma_xprt\n",
290 __func__);
291 return ERR_PTR(-ENOMEM);
292 }
293
294
295 xprt->timeout = &xprt_rdma_default_timeout;
296 xprt->bind_timeout = (60U * HZ);
297 xprt->reestablish_timeout = (5U * HZ);
298 xprt->idle_timeout = (5U * 60 * HZ);
299
300 xprt->resvport = 0;
301 xprt->tsh_size = 0;
302 xprt->max_payload = RPCRDMA_MAX_DATA_SEGS * PAGE_SIZE;
303 xprt->ops = &xprt_rdma_procs;
304
305
306
307
308
309
310 memcpy(&cdata.addr, args->dstaddr, args->addrlen);
311
312
313
314 xprt->prot = IPPROTO_TCP;
315 xprt->addrlen = args->addrlen;
316 memcpy(&xprt->addr, &cdata.addr, xprt->addrlen);
317
318 sin = (struct sockaddr_in *)&cdata.addr;
319 if (ntohs(sin->sin_port) != 0)
320 xprt_set_bound(xprt);
321
322 dprintk("RPC: %s: %pI4:%u\n",
323 __func__, &sin->sin_addr.s_addr, ntohs(sin->sin_port));
324
325
326 cdata.max_requests = xprt->max_reqs;
327
328
329 cdata.rsize = RPCRDMA_MAX_SEGS * PAGE_SIZE;
330 cdata.wsize = RPCRDMA_MAX_SEGS * PAGE_SIZE;
331
332 cdata.inline_wsize = xprt_rdma_max_inline_write;
333 if (cdata.inline_wsize > cdata.wsize)
334 cdata.inline_wsize = cdata.wsize;
335
336 cdata.inline_rsize = xprt_rdma_max_inline_read;
337 if (cdata.inline_rsize > cdata.rsize)
338 cdata.inline_rsize = cdata.rsize;
339
340 cdata.padding = xprt_rdma_inline_write_padding;
341
342
343
344
345
346
347
348
349 new_xprt = rpcx_to_rdmax(xprt);
350
351 rc = rpcrdma_ia_open(new_xprt, (struct sockaddr *) &cdata.addr,
352 xprt_rdma_memreg_strategy);
353 if (rc)
354 goto out1;
355
356
357
358
359 new_xprt->rx_data = cdata;
360 new_ep = &new_xprt->rx_ep;
361 new_ep->rep_remote_addr = cdata.addr;
362
363 rc = rpcrdma_ep_create(&new_xprt->rx_ep,
364 &new_xprt->rx_ia, &new_xprt->rx_data);
365 if (rc)
366 goto out2;
367
368
369
370
371
372
373 rc = rpcrdma_buffer_create(&new_xprt->rx_buf, new_ep, &new_xprt->rx_ia,
374 &new_xprt->rx_data);
375 if (rc)
376 goto out3;
377
378
379
380
381
382
383 INIT_DELAYED_WORK(&new_xprt->rdma_connect, xprt_rdma_connect_worker);
384 new_ep->rep_func = rpcrdma_conn_func;
385 new_ep->rep_xprt = xprt;
386
387 xprt_rdma_format_addresses(xprt);
388
389 if (!try_module_get(THIS_MODULE))
390 goto out4;
391
392 return xprt;
393
394out4:
395 xprt_rdma_free_addresses(xprt);
396 rc = -EINVAL;
397out3:
398 (void) rpcrdma_ep_destroy(new_ep, &new_xprt->rx_ia);
399out2:
400 rpcrdma_ia_close(&new_xprt->rx_ia);
401out1:
402 xprt_free(xprt);
403 return ERR_PTR(rc);
404}
405
406
407
408
409static void
410xprt_rdma_close(struct rpc_xprt *xprt)
411{
412 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
413
414 dprintk("RPC: %s: closing\n", __func__);
415 if (r_xprt->rx_ep.rep_connected > 0)
416 xprt->reestablish_timeout = 0;
417 xprt_disconnect_done(xprt);
418 (void) rpcrdma_ep_disconnect(&r_xprt->rx_ep, &r_xprt->rx_ia);
419}
420
421static void
422xprt_rdma_set_port(struct rpc_xprt *xprt, u16 port)
423{
424 struct sockaddr_in *sap;
425
426 sap = (struct sockaddr_in *)&xprt->addr;
427 sap->sin_port = htons(port);
428 sap = (struct sockaddr_in *)&rpcx_to_rdmad(xprt).addr;
429 sap->sin_port = htons(port);
430 dprintk("RPC: %s: %u\n", __func__, port);
431}
432
433static void
434xprt_rdma_connect(struct rpc_task *task)
435{
436 struct rpc_xprt *xprt = (struct rpc_xprt *)task->tk_xprt;
437 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
438
439 if (r_xprt->rx_ep.rep_connected != 0) {
440
441 schedule_delayed_work(&r_xprt->rdma_connect,
442 xprt->reestablish_timeout);
443 xprt->reestablish_timeout <<= 1;
444 if (xprt->reestablish_timeout > (30 * HZ))
445 xprt->reestablish_timeout = (30 * HZ);
446 else if (xprt->reestablish_timeout < (5 * HZ))
447 xprt->reestablish_timeout = (5 * HZ);
448 } else {
449 schedule_delayed_work(&r_xprt->rdma_connect, 0);
450 if (!RPC_IS_ASYNC(task))
451 flush_delayed_work(&r_xprt->rdma_connect);
452 }
453}
454
455static int
456xprt_rdma_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
457{
458 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
459 int credits = atomic_read(&r_xprt->rx_buf.rb_credits);
460
461
462 if (r_xprt->rx_buf.rb_cwndscale == 0UL) {
463 r_xprt->rx_buf.rb_cwndscale = xprt->cwnd;
464 dprintk("RPC: %s: cwndscale %lu\n", __func__,
465 r_xprt->rx_buf.rb_cwndscale);
466 BUG_ON(r_xprt->rx_buf.rb_cwndscale <= 0);
467 }
468 xprt->cwnd = credits * r_xprt->rx_buf.rb_cwndscale;
469 return xprt_reserve_xprt_cong(xprt, task);
470}
471
472
473
474
475
476
477
478
479
480static void *
481xprt_rdma_allocate(struct rpc_task *task, size_t size)
482{
483 struct rpc_xprt *xprt = task->tk_xprt;
484 struct rpcrdma_req *req, *nreq;
485
486 req = rpcrdma_buffer_get(&rpcx_to_rdmax(xprt)->rx_buf);
487 BUG_ON(NULL == req);
488
489 if (size > req->rl_size) {
490 dprintk("RPC: %s: size %zd too large for buffer[%zd]: "
491 "prog %d vers %d proc %d\n",
492 __func__, size, req->rl_size,
493 task->tk_client->cl_prog, task->tk_client->cl_vers,
494 task->tk_msg.rpc_proc->p_proc);
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511 if (rpcx_to_rdmax(xprt)->rx_ia.ri_memreg_strategy ==
512 RPCRDMA_BOUNCEBUFFERS) {
513
514 dprintk("RPC: %s: too much data (%zd) for inline "
515 "(r/w max %d/%d)\n", __func__, size,
516 rpcx_to_rdmad(xprt).inline_rsize,
517 rpcx_to_rdmad(xprt).inline_wsize);
518 size = req->rl_size;
519 rpc_exit(task, -EIO);
520 rpcx_to_rdmax(xprt)->rx_stats.failed_marshal_count++;
521 goto out;
522 }
523 if (task->tk_flags & RPC_TASK_SWAPPER)
524 nreq = kmalloc(sizeof *req + size, GFP_ATOMIC);
525 else
526 nreq = kmalloc(sizeof *req + size, GFP_NOFS);
527 if (nreq == NULL)
528 goto outfail;
529
530 if (rpcrdma_register_internal(&rpcx_to_rdmax(xprt)->rx_ia,
531 nreq->rl_base, size + sizeof(struct rpcrdma_req)
532 - offsetof(struct rpcrdma_req, rl_base),
533 &nreq->rl_handle, &nreq->rl_iov)) {
534 kfree(nreq);
535 goto outfail;
536 }
537 rpcx_to_rdmax(xprt)->rx_stats.hardway_register_count += size;
538 nreq->rl_size = size;
539 nreq->rl_niovs = 0;
540 nreq->rl_nchunks = 0;
541 nreq->rl_buffer = (struct rpcrdma_buffer *)req;
542 nreq->rl_reply = req->rl_reply;
543 memcpy(nreq->rl_segments,
544 req->rl_segments, sizeof nreq->rl_segments);
545
546 nreq->rl_iov.length = 0;
547 req->rl_reply = NULL;
548 req = nreq;
549 }
550 dprintk("RPC: %s: size %zd, request 0x%p\n", __func__, size, req);
551out:
552 req->rl_connect_cookie = 0;
553 return req->rl_xdr_buf;
554
555outfail:
556 rpcrdma_buffer_put(req);
557 rpcx_to_rdmax(xprt)->rx_stats.failed_marshal_count++;
558 return NULL;
559}
560
561
562
563
564static void
565xprt_rdma_free(void *buffer)
566{
567 struct rpcrdma_req *req;
568 struct rpcrdma_xprt *r_xprt;
569 struct rpcrdma_rep *rep;
570 int i;
571
572 if (buffer == NULL)
573 return;
574
575 req = container_of(buffer, struct rpcrdma_req, rl_xdr_buf[0]);
576 if (req->rl_iov.length == 0) {
577 r_xprt = container_of(((struct rpcrdma_req *) req->rl_buffer)->rl_buffer,
578 struct rpcrdma_xprt, rx_buf);
579 } else
580 r_xprt = container_of(req->rl_buffer, struct rpcrdma_xprt, rx_buf);
581 rep = req->rl_reply;
582
583 dprintk("RPC: %s: called on 0x%p%s\n",
584 __func__, rep, (rep && rep->rr_func) ? " (with waiter)" : "");
585
586
587
588
589
590
591
592
593
594
595 for (i = 0; req->rl_nchunks;) {
596 --req->rl_nchunks;
597 i += rpcrdma_deregister_external(
598 &req->rl_segments[i], r_xprt, NULL);
599 }
600
601 if (rep && wait_event_interruptible(rep->rr_unbind, !rep->rr_func)) {
602 rep->rr_func = NULL;
603 req->rl_reply = NULL;
604 }
605
606 if (req->rl_iov.length == 0) {
607 struct rpcrdma_req *oreq = (struct rpcrdma_req *)req->rl_buffer;
608 oreq->rl_reply = req->rl_reply;
609 (void) rpcrdma_deregister_internal(&r_xprt->rx_ia,
610 req->rl_handle,
611 &req->rl_iov);
612 kfree(req);
613 req = oreq;
614 }
615
616
617 rpcrdma_buffer_put(req);
618}
619
620
621
622
623
624
625
626
627
628
629
630
631static int
632xprt_rdma_send_request(struct rpc_task *task)
633{
634 struct rpc_rqst *rqst = task->tk_rqstp;
635 struct rpc_xprt *xprt = task->tk_xprt;
636 struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
637 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
638
639
640 if (req->rl_niovs == 0 && rpcrdma_marshal_req(rqst) != 0) {
641 r_xprt->rx_stats.failed_marshal_count++;
642 dprintk("RPC: %s: rpcrdma_marshal_req failed\n",
643 __func__);
644 return -EIO;
645 }
646
647 if (req->rl_reply == NULL)
648 rpcrdma_recv_buffer_get(req);
649
650 if (req->rl_reply) {
651 req->rl_reply->rr_func = rpcrdma_reply_handler;
652
653 req->rl_reply->rr_xprt = xprt;
654 }
655
656
657 if (req->rl_connect_cookie == xprt->connect_cookie)
658 goto drop_connection;
659 req->rl_connect_cookie = xprt->connect_cookie;
660
661 if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
662 goto drop_connection;
663
664 rqst->rq_xmit_bytes_sent += rqst->rq_snd_buf.len;
665 rqst->rq_bytes_sent = 0;
666 return 0;
667
668drop_connection:
669 xprt_disconnect_done(xprt);
670 return -ENOTCONN;
671}
672
673static void xprt_rdma_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
674{
675 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
676 long idle_time = 0;
677
678 if (xprt_connected(xprt))
679 idle_time = (long)(jiffies - xprt->last_used) / HZ;
680
681 seq_printf(seq,
682 "\txprt:\trdma %u %lu %lu %lu %ld %lu %lu %lu %Lu %Lu "
683 "%lu %lu %lu %Lu %Lu %Lu %Lu %lu %lu %lu\n",
684
685 0,
686 xprt->stat.bind_count,
687 xprt->stat.connect_count,
688 xprt->stat.connect_time,
689 idle_time,
690 xprt->stat.sends,
691 xprt->stat.recvs,
692 xprt->stat.bad_xids,
693 xprt->stat.req_u,
694 xprt->stat.bklog_u,
695
696 r_xprt->rx_stats.read_chunk_count,
697 r_xprt->rx_stats.write_chunk_count,
698 r_xprt->rx_stats.reply_chunk_count,
699 r_xprt->rx_stats.total_rdma_request,
700 r_xprt->rx_stats.total_rdma_reply,
701 r_xprt->rx_stats.pullup_copy_count,
702 r_xprt->rx_stats.fixup_copy_count,
703 r_xprt->rx_stats.hardway_register_count,
704 r_xprt->rx_stats.failed_marshal_count,
705 r_xprt->rx_stats.bad_reply_count);
706}
707
708
709
710
711
712static struct rpc_xprt_ops xprt_rdma_procs = {
713 .reserve_xprt = xprt_rdma_reserve_xprt,
714 .release_xprt = xprt_release_xprt_cong,
715 .release_request = xprt_release_rqst_cong,
716 .set_retrans_timeout = xprt_set_retrans_timeout_def,
717 .rpcbind = rpcb_getport_async,
718 .set_port = xprt_rdma_set_port,
719 .connect = xprt_rdma_connect,
720 .buf_alloc = xprt_rdma_allocate,
721 .buf_free = xprt_rdma_free,
722 .send_request = xprt_rdma_send_request,
723 .close = xprt_rdma_close,
724 .destroy = xprt_rdma_destroy,
725 .print_stats = xprt_rdma_print_stats
726};
727
728static struct xprt_class xprt_rdma = {
729 .list = LIST_HEAD_INIT(xprt_rdma.list),
730 .name = "rdma",
731 .owner = THIS_MODULE,
732 .ident = XPRT_TRANSPORT_RDMA,
733 .setup = xprt_setup_rdma,
734};
735
736static void __exit xprt_rdma_cleanup(void)
737{
738 int rc;
739
740 dprintk(KERN_INFO "RPCRDMA Module Removed, deregister RPC RDMA transport\n");
741#ifdef RPC_DEBUG
742 if (sunrpc_table_header) {
743 unregister_sysctl_table(sunrpc_table_header);
744 sunrpc_table_header = NULL;
745 }
746#endif
747 rc = xprt_unregister_transport(&xprt_rdma);
748 if (rc)
749 dprintk("RPC: %s: xprt_unregister returned %i\n",
750 __func__, rc);
751}
752
753static int __init xprt_rdma_init(void)
754{
755 int rc;
756
757 rc = xprt_register_transport(&xprt_rdma);
758
759 if (rc)
760 return rc;
761
762 dprintk(KERN_INFO "RPCRDMA Module Init, register RPC RDMA transport\n");
763
764 dprintk(KERN_INFO "Defaults:\n");
765 dprintk(KERN_INFO "\tSlots %d\n"
766 "\tMaxInlineRead %d\n\tMaxInlineWrite %d\n",
767 xprt_rdma_slot_table_entries,
768 xprt_rdma_max_inline_read, xprt_rdma_max_inline_write);
769 dprintk(KERN_INFO "\tPadding %d\n\tMemreg %d\n",
770 xprt_rdma_inline_write_padding, xprt_rdma_memreg_strategy);
771
772#ifdef RPC_DEBUG
773 if (!sunrpc_table_header)
774 sunrpc_table_header = register_sysctl_table(sunrpc_table);
775#endif
776 return 0;
777}
778
779module_init(xprt_rdma_init);
780module_exit(xprt_rdma_cleanup);
781