diff options
-rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 9 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 44d642bbfce6..e84b77556784 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -48,6 +48,12 @@ | |||
48 | #include <rdma/rdma_cm.h> | 48 | #include <rdma/rdma_cm.h> |
49 | #define SVCRDMA_DEBUG | 49 | #define SVCRDMA_DEBUG |
50 | 50 | ||
51 | /* Default and maximum inline threshold sizes */ | ||
52 | enum { | ||
53 | RPCRDMA_DEF_INLINE_THRESH = 4096, | ||
54 | RPCRDMA_MAX_INLINE_THRESH = 65536 | ||
55 | }; | ||
56 | |||
51 | /* RPC/RDMA parameters and stats */ | 57 | /* RPC/RDMA parameters and stats */ |
52 | extern unsigned int svcrdma_ord; | 58 | extern unsigned int svcrdma_ord; |
53 | extern unsigned int svcrdma_max_requests; | 59 | extern unsigned int svcrdma_max_requests; |
@@ -86,7 +92,7 @@ struct svc_rdma_op_ctxt { | |||
86 | int count; | 92 | int count; |
87 | unsigned int mapped_sges; | 93 | unsigned int mapped_sges; |
88 | struct ib_send_wr send_wr; | 94 | struct ib_send_wr send_wr; |
89 | struct ib_sge sge[RPCSVC_MAXPAGES]; | 95 | struct ib_sge sge[1 + RPCRDMA_MAX_INLINE_THRESH / PAGE_SIZE]; |
90 | struct page *pages[RPCSVC_MAXPAGES]; | 96 | struct page *pages[RPCSVC_MAXPAGES]; |
91 | }; | 97 | }; |
92 | 98 | ||
@@ -186,7 +192,6 @@ struct svcxprt_rdma { | |||
186 | * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ | 192 | * page size of 4k, or 32k * 2 ops / 4k = 16 outstanding RDMA_READ. */ |
187 | #define RPCRDMA_ORD (64/4) | 193 | #define RPCRDMA_ORD (64/4) |
188 | #define RPCRDMA_MAX_REQUESTS 32 | 194 | #define RPCRDMA_MAX_REQUESTS 32 |
189 | #define RPCRDMA_MAX_REQ_SIZE 4096 | ||
190 | 195 | ||
191 | /* Typical ULP usage of BC requests is NFSv4.1 backchannel. Our | 196 | /* Typical ULP usage of BC requests is NFSv4.1 backchannel. Our |
192 | * current NFSv4.1 implementation supports one backchannel slot. | 197 | * current NFSv4.1 implementation supports one backchannel slot. |
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index 912444174647..a4a8f6989ee7 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c | |||
@@ -58,9 +58,9 @@ unsigned int svcrdma_max_requests = RPCRDMA_MAX_REQUESTS; | |||
58 | unsigned int svcrdma_max_bc_requests = RPCRDMA_MAX_BC_REQUESTS; | 58 | unsigned int svcrdma_max_bc_requests = RPCRDMA_MAX_BC_REQUESTS; |
59 | static unsigned int min_max_requests = 4; | 59 | static unsigned int min_max_requests = 4; |
60 | static unsigned int max_max_requests = 16384; | 60 | static unsigned int max_max_requests = 16384; |
61 | unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE; | 61 | unsigned int svcrdma_max_req_size = RPCRDMA_DEF_INLINE_THRESH; |
62 | static unsigned int min_max_inline = 4096; | 62 | static unsigned int min_max_inline = RPCRDMA_DEF_INLINE_THRESH; |
63 | static unsigned int max_max_inline = 65536; | 63 | static unsigned int max_max_inline = RPCRDMA_MAX_INLINE_THRESH; |
64 | 64 | ||
65 | atomic_t rdma_stat_recv; | 65 | atomic_t rdma_stat_recv; |
66 | atomic_t rdma_stat_read; | 66 | atomic_t rdma_stat_read; |