diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth.c | 6 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_seqnum.c | 4 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 4 | ||||
-rw-r--r-- | net/sunrpc/cache.c | 5 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 5 | ||||
-rw-r--r-- | net/sunrpc/svc_xprt.c | 8 | ||||
-rw-r--r-- | net/sunrpc/svcauth.c | 4 | ||||
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 7 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 8 | ||||
-rw-r--r-- | net/sunrpc/sysctl.c | 15 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma.c | 40 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 7 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 32 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 28 |
15 files changed, 67 insertions, 110 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 54a4e042f104..7535a7bed2fa 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -332,9 +332,9 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred, | |||
332 | list_add_tail(&new->cr_lru, &free); | 332 | list_add_tail(&new->cr_lru, &free); |
333 | spin_unlock(&cache->lock); | 333 | spin_unlock(&cache->lock); |
334 | found: | 334 | found: |
335 | if (test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags) | 335 | if (test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags) && |
336 | && cred->cr_ops->cr_init != NULL | 336 | cred->cr_ops->cr_init != NULL && |
337 | && !(flags & RPCAUTH_LOOKUP_NEW)) { | 337 | !(flags & RPCAUTH_LOOKUP_NEW)) { |
338 | int res = cred->cr_ops->cr_init(auth, cred); | 338 | int res = cred->cr_ops->cr_init(auth, cred); |
339 | if (res < 0) { | 339 | if (res < 0) { |
340 | put_rpccred(cred); | 340 | put_rpccred(cred); |
diff --git a/net/sunrpc/auth_gss/gss_krb5_seqnum.c b/net/sunrpc/auth_gss/gss_krb5_seqnum.c index f160be6c1a46..17562b4c35f6 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seqnum.c +++ b/net/sunrpc/auth_gss/gss_krb5_seqnum.c | |||
@@ -75,8 +75,8 @@ krb5_get_seq_num(struct crypto_blkcipher *key, | |||
75 | if ((code = krb5_decrypt(key, cksum, buf, plain, 8))) | 75 | if ((code = krb5_decrypt(key, cksum, buf, plain, 8))) |
76 | return code; | 76 | return code; |
77 | 77 | ||
78 | if ((plain[4] != plain[5]) || (plain[4] != plain[6]) | 78 | if ((plain[4] != plain[5]) || (plain[4] != plain[6]) || |
79 | || (plain[4] != plain[7])) | 79 | (plain[4] != plain[7])) |
80 | return (s32)KG_BAD_SEQ; | 80 | return (s32)KG_BAD_SEQ; |
81 | 81 | ||
82 | *direction = plain[4]; | 82 | *direction = plain[4]; |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index f6c51e562a02..e34bc531fcb9 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -105,8 +105,8 @@ static int rsi_match(struct cache_head *a, struct cache_head *b) | |||
105 | { | 105 | { |
106 | struct rsi *item = container_of(a, struct rsi, h); | 106 | struct rsi *item = container_of(a, struct rsi, h); |
107 | struct rsi *tmp = container_of(b, struct rsi, h); | 107 | struct rsi *tmp = container_of(b, struct rsi, h); |
108 | return netobj_equal(&item->in_handle, &tmp->in_handle) | 108 | return netobj_equal(&item->in_handle, &tmp->in_handle) && |
109 | && netobj_equal(&item->in_token, &tmp->in_token); | 109 | netobj_equal(&item->in_token, &tmp->in_token); |
110 | } | 110 | } |
111 | 111 | ||
112 | static int dup_to_netobj(struct xdr_netobj *dst, char *src, int len) | 112 | static int dup_to_netobj(struct xdr_netobj *dst, char *src, int len) |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index d6eee291a0e2..39bddba53ba1 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -401,9 +401,8 @@ static int cache_clean(void) | |||
401 | for (; ch; cp= & ch->next, ch= *cp) { | 401 | for (; ch; cp= & ch->next, ch= *cp) { |
402 | if (current_detail->nextcheck > ch->expiry_time) | 402 | if (current_detail->nextcheck > ch->expiry_time) |
403 | current_detail->nextcheck = ch->expiry_time+1; | 403 | current_detail->nextcheck = ch->expiry_time+1; |
404 | if (ch->expiry_time >= get_seconds() | 404 | if (ch->expiry_time >= get_seconds() && |
405 | && ch->last_refresh >= current_detail->flush_time | 405 | ch->last_refresh >= current_detail->flush_time) |
406 | ) | ||
407 | continue; | 406 | continue; |
408 | if (test_and_clear_bit(CACHE_PENDING, &ch->flags)) | 407 | if (test_and_clear_bit(CACHE_PENDING, &ch->flags)) |
409 | cache_dequeue(current_detail, ch); | 408 | cache_dequeue(current_detail, ch); |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 952f206ff307..538ca433a56c 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -1103,8 +1103,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) | |||
1103 | procp->pc_release(rqstp, NULL, rqstp->rq_resp); | 1103 | procp->pc_release(rqstp, NULL, rqstp->rq_resp); |
1104 | goto dropit; | 1104 | goto dropit; |
1105 | } | 1105 | } |
1106 | if (*statp == rpc_success && (xdr = procp->pc_encode) | 1106 | if (*statp == rpc_success && |
1107 | && !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) { | 1107 | (xdr = procp->pc_encode) && |
1108 | !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) { | ||
1108 | dprintk("svc: failed to encode reply\n"); | 1109 | dprintk("svc: failed to encode reply\n"); |
1109 | /* serv->sv_stats->rpcsystemerr++; */ | 1110 | /* serv->sv_stats->rpcsystemerr++; */ |
1110 | *statp = rpc_system_err; | 1111 | *statp = rpc_system_err; |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index df124f78ee48..b845e2293dfe 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -129,8 +129,8 @@ static void svc_xprt_free(struct kref *kref) | |||
129 | struct svc_xprt *xprt = | 129 | struct svc_xprt *xprt = |
130 | container_of(kref, struct svc_xprt, xpt_ref); | 130 | container_of(kref, struct svc_xprt, xpt_ref); |
131 | struct module *owner = xprt->xpt_class->xcl_owner; | 131 | struct module *owner = xprt->xpt_class->xcl_owner; |
132 | if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags) | 132 | if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags) && |
133 | && xprt->xpt_auth_cache != NULL) | 133 | xprt->xpt_auth_cache != NULL) |
134 | svcauth_unix_info_release(xprt->xpt_auth_cache); | 134 | svcauth_unix_info_release(xprt->xpt_auth_cache); |
135 | xprt->xpt_ops->xpo_free(xprt); | 135 | xprt->xpt_ops->xpo_free(xprt); |
136 | module_put(owner); | 136 | module_put(owner); |
@@ -846,8 +846,8 @@ static void svc_age_temp_xprts(unsigned long closure) | |||
846 | * through, close it. */ | 846 | * through, close it. */ |
847 | if (!test_and_set_bit(XPT_OLD, &xprt->xpt_flags)) | 847 | if (!test_and_set_bit(XPT_OLD, &xprt->xpt_flags)) |
848 | continue; | 848 | continue; |
849 | if (atomic_read(&xprt->xpt_ref.refcount) > 1 | 849 | if (atomic_read(&xprt->xpt_ref.refcount) > 1 || |
850 | || test_bit(XPT_BUSY, &xprt->xpt_flags)) | 850 | test_bit(XPT_BUSY, &xprt->xpt_flags)) |
851 | continue; | 851 | continue; |
852 | svc_xprt_get(xprt); | 852 | svc_xprt_get(xprt); |
853 | list_move(le, &to_be_aged); | 853 | list_move(le, &to_be_aged); |
diff --git a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c index e64109b02aee..4e9393c24687 100644 --- a/net/sunrpc/svcauth.c +++ b/net/sunrpc/svcauth.c | |||
@@ -46,8 +46,8 @@ svc_authenticate(struct svc_rqst *rqstp, __be32 *authp) | |||
46 | dprintk("svc: svc_authenticate (%d)\n", flavor); | 46 | dprintk("svc: svc_authenticate (%d)\n", flavor); |
47 | 47 | ||
48 | spin_lock(&authtab_lock); | 48 | spin_lock(&authtab_lock); |
49 | if (flavor >= RPC_AUTH_MAXFLAVOR || !(aops = authtab[flavor]) | 49 | if (flavor >= RPC_AUTH_MAXFLAVOR || !(aops = authtab[flavor]) || |
50 | || !try_module_get(aops->owner)) { | 50 | !try_module_get(aops->owner)) { |
51 | spin_unlock(&authtab_lock); | 51 | spin_unlock(&authtab_lock); |
52 | *authp = rpc_autherr_badcred; | 52 | *authp = rpc_autherr_badcred; |
53 | return SVC_DENIED; | 53 | return SVC_DENIED; |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 117f68a8aa40..4a8f6558718a 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -125,8 +125,8 @@ static int ip_map_match(struct cache_head *corig, struct cache_head *cnew) | |||
125 | { | 125 | { |
126 | struct ip_map *orig = container_of(corig, struct ip_map, h); | 126 | struct ip_map *orig = container_of(corig, struct ip_map, h); |
127 | struct ip_map *new = container_of(cnew, struct ip_map, h); | 127 | struct ip_map *new = container_of(cnew, struct ip_map, h); |
128 | return strcmp(orig->m_class, new->m_class) == 0 | 128 | return strcmp(orig->m_class, new->m_class) == 0 && |
129 | && ipv6_addr_equal(&orig->m_addr, &new->m_addr); | 129 | ipv6_addr_equal(&orig->m_addr, &new->m_addr); |
130 | } | 130 | } |
131 | static void ip_map_init(struct cache_head *cnew, struct cache_head *citem) | 131 | static void ip_map_init(struct cache_head *cnew, struct cache_head *citem) |
132 | { | 132 | { |
@@ -686,8 +686,7 @@ svcauth_unix_set_client(struct svc_rqst *rqstp) | |||
686 | case AF_INET: | 686 | case AF_INET: |
687 | sin = svc_addr_in(rqstp); | 687 | sin = svc_addr_in(rqstp); |
688 | sin6 = &sin6_storage; | 688 | sin6 = &sin6_storage; |
689 | ipv6_addr_set(&sin6->sin6_addr, 0, 0, | 689 | ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &sin6->sin6_addr); |
690 | htonl(0x0000FFFF), sin->sin_addr.s_addr); | ||
691 | break; | 690 | break; |
692 | case AF_INET6: | 691 | case AF_INET6: |
693 | sin6 = svc_addr_in6(rqstp); | 692 | sin6 = svc_addr_in6(rqstp); |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 1c246a4f491e..870929e08e5d 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -272,14 +272,14 @@ static int svc_one_sock_name(struct svc_sock *svsk, char *buf, int remaining) | |||
272 | case PF_INET: | 272 | case PF_INET: |
273 | len = snprintf(buf, remaining, "ipv4 %s %pI4 %d\n", | 273 | len = snprintf(buf, remaining, "ipv4 %s %pI4 %d\n", |
274 | proto_name, | 274 | proto_name, |
275 | &inet_sk(sk)->rcv_saddr, | 275 | &inet_sk(sk)->inet_rcv_saddr, |
276 | inet_sk(sk)->num); | 276 | inet_sk(sk)->inet_num); |
277 | break; | 277 | break; |
278 | case PF_INET6: | 278 | case PF_INET6: |
279 | len = snprintf(buf, remaining, "ipv6 %s %pI6 %d\n", | 279 | len = snprintf(buf, remaining, "ipv6 %s %pI6 %d\n", |
280 | proto_name, | 280 | proto_name, |
281 | &inet6_sk(sk)->rcv_saddr, | 281 | &inet6_sk(sk)->rcv_saddr, |
282 | inet_sk(sk)->num); | 282 | inet_sk(sk)->inet_num); |
283 | break; | 283 | break; |
284 | default: | 284 | default: |
285 | len = snprintf(buf, remaining, "*unknown-%d*\n", | 285 | len = snprintf(buf, remaining, "*unknown-%d*\n", |
@@ -1311,7 +1311,7 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv, | |||
1311 | /* Register socket with portmapper */ | 1311 | /* Register socket with portmapper */ |
1312 | if (*errp >= 0 && pmap_register) | 1312 | if (*errp >= 0 && pmap_register) |
1313 | *errp = svc_register(serv, inet->sk_family, inet->sk_protocol, | 1313 | *errp = svc_register(serv, inet->sk_family, inet->sk_protocol, |
1314 | ntohs(inet_sk(inet)->sport)); | 1314 | ntohs(inet_sk(inet)->inet_sport)); |
1315 | 1315 | ||
1316 | if (*errp < 0) { | 1316 | if (*errp < 0) { |
1317 | kfree(svsk); | 1317 | kfree(svsk); |
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 42f9748ae093..e65dcc613339 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -139,46 +139,45 @@ static ctl_table debug_table[] = { | |||
139 | .data = &rpc_debug, | 139 | .data = &rpc_debug, |
140 | .maxlen = sizeof(int), | 140 | .maxlen = sizeof(int), |
141 | .mode = 0644, | 141 | .mode = 0644, |
142 | .proc_handler = &proc_dodebug | 142 | .proc_handler = proc_dodebug |
143 | }, | 143 | }, |
144 | { | 144 | { |
145 | .procname = "nfs_debug", | 145 | .procname = "nfs_debug", |
146 | .data = &nfs_debug, | 146 | .data = &nfs_debug, |
147 | .maxlen = sizeof(int), | 147 | .maxlen = sizeof(int), |
148 | .mode = 0644, | 148 | .mode = 0644, |
149 | .proc_handler = &proc_dodebug | 149 | .proc_handler = proc_dodebug |
150 | }, | 150 | }, |
151 | { | 151 | { |
152 | .procname = "nfsd_debug", | 152 | .procname = "nfsd_debug", |
153 | .data = &nfsd_debug, | 153 | .data = &nfsd_debug, |
154 | .maxlen = sizeof(int), | 154 | .maxlen = sizeof(int), |
155 | .mode = 0644, | 155 | .mode = 0644, |
156 | .proc_handler = &proc_dodebug | 156 | .proc_handler = proc_dodebug |
157 | }, | 157 | }, |
158 | { | 158 | { |
159 | .procname = "nlm_debug", | 159 | .procname = "nlm_debug", |
160 | .data = &nlm_debug, | 160 | .data = &nlm_debug, |
161 | .maxlen = sizeof(int), | 161 | .maxlen = sizeof(int), |
162 | .mode = 0644, | 162 | .mode = 0644, |
163 | .proc_handler = &proc_dodebug | 163 | .proc_handler = proc_dodebug |
164 | }, | 164 | }, |
165 | { | 165 | { |
166 | .procname = "transports", | 166 | .procname = "transports", |
167 | .maxlen = 256, | 167 | .maxlen = 256, |
168 | .mode = 0444, | 168 | .mode = 0444, |
169 | .proc_handler = &proc_do_xprt, | 169 | .proc_handler = proc_do_xprt, |
170 | }, | 170 | }, |
171 | { .ctl_name = 0 } | 171 | { } |
172 | }; | 172 | }; |
173 | 173 | ||
174 | static ctl_table sunrpc_table[] = { | 174 | static ctl_table sunrpc_table[] = { |
175 | { | 175 | { |
176 | .ctl_name = CTL_SUNRPC, | ||
177 | .procname = "sunrpc", | 176 | .procname = "sunrpc", |
178 | .mode = 0555, | 177 | .mode = 0555, |
179 | .child = debug_table | 178 | .child = debug_table |
180 | }, | 179 | }, |
181 | { .ctl_name = 0 } | 180 | { } |
182 | }; | 181 | }; |
183 | 182 | ||
184 | #endif | 183 | #endif |
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index 35fb68b9c8ec..5b8a8ff93a25 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c | |||
@@ -120,8 +120,7 @@ static ctl_table svcrdma_parm_table[] = { | |||
120 | .data = &svcrdma_max_requests, | 120 | .data = &svcrdma_max_requests, |
121 | .maxlen = sizeof(unsigned int), | 121 | .maxlen = sizeof(unsigned int), |
122 | .mode = 0644, | 122 | .mode = 0644, |
123 | .proc_handler = &proc_dointvec_minmax, | 123 | .proc_handler = proc_dointvec_minmax, |
124 | .strategy = &sysctl_intvec, | ||
125 | .extra1 = &min_max_requests, | 124 | .extra1 = &min_max_requests, |
126 | .extra2 = &max_max_requests | 125 | .extra2 = &max_max_requests |
127 | }, | 126 | }, |
@@ -130,8 +129,7 @@ static ctl_table svcrdma_parm_table[] = { | |||
130 | .data = &svcrdma_max_req_size, | 129 | .data = &svcrdma_max_req_size, |
131 | .maxlen = sizeof(unsigned int), | 130 | .maxlen = sizeof(unsigned int), |
132 | .mode = 0644, | 131 | .mode = 0644, |
133 | .proc_handler = &proc_dointvec_minmax, | 132 | .proc_handler = proc_dointvec_minmax, |
134 | .strategy = &sysctl_intvec, | ||
135 | .extra1 = &min_max_inline, | 133 | .extra1 = &min_max_inline, |
136 | .extra2 = &max_max_inline | 134 | .extra2 = &max_max_inline |
137 | }, | 135 | }, |
@@ -140,8 +138,7 @@ static ctl_table svcrdma_parm_table[] = { | |||
140 | .data = &svcrdma_ord, | 138 | .data = &svcrdma_ord, |
141 | .maxlen = sizeof(unsigned int), | 139 | .maxlen = sizeof(unsigned int), |
142 | .mode = 0644, | 140 | .mode = 0644, |
143 | .proc_handler = &proc_dointvec_minmax, | 141 | .proc_handler = proc_dointvec_minmax, |
144 | .strategy = &sysctl_intvec, | ||
145 | .extra1 = &min_ord, | 142 | .extra1 = &min_ord, |
146 | .extra2 = &max_ord, | 143 | .extra2 = &max_ord, |
147 | }, | 144 | }, |
@@ -151,67 +148,65 @@ static ctl_table svcrdma_parm_table[] = { | |||
151 | .data = &rdma_stat_read, | 148 | .data = &rdma_stat_read, |
152 | .maxlen = sizeof(atomic_t), | 149 | .maxlen = sizeof(atomic_t), |
153 | .mode = 0644, | 150 | .mode = 0644, |
154 | .proc_handler = &read_reset_stat, | 151 | .proc_handler = read_reset_stat, |
155 | }, | 152 | }, |
156 | { | 153 | { |
157 | .procname = "rdma_stat_recv", | 154 | .procname = "rdma_stat_recv", |
158 | .data = &rdma_stat_recv, | 155 | .data = &rdma_stat_recv, |
159 | .maxlen = sizeof(atomic_t), | 156 | .maxlen = sizeof(atomic_t), |
160 | .mode = 0644, | 157 | .mode = 0644, |
161 | .proc_handler = &read_reset_stat, | 158 | .proc_handler = read_reset_stat, |
162 | }, | 159 | }, |
163 | { | 160 | { |
164 | .procname = "rdma_stat_write", | 161 | .procname = "rdma_stat_write", |
165 | .data = &rdma_stat_write, | 162 | .data = &rdma_stat_write, |
166 | .maxlen = sizeof(atomic_t), | 163 | .maxlen = sizeof(atomic_t), |
167 | .mode = 0644, | 164 | .mode = 0644, |
168 | .proc_handler = &read_reset_stat, | 165 | .proc_handler = read_reset_stat, |
169 | }, | 166 | }, |
170 | { | 167 | { |
171 | .procname = "rdma_stat_sq_starve", | 168 | .procname = "rdma_stat_sq_starve", |
172 | .data = &rdma_stat_sq_starve, | 169 | .data = &rdma_stat_sq_starve, |
173 | .maxlen = sizeof(atomic_t), | 170 | .maxlen = sizeof(atomic_t), |
174 | .mode = 0644, | 171 | .mode = 0644, |
175 | .proc_handler = &read_reset_stat, | 172 | .proc_handler = read_reset_stat, |
176 | }, | 173 | }, |
177 | { | 174 | { |
178 | .procname = "rdma_stat_rq_starve", | 175 | .procname = "rdma_stat_rq_starve", |
179 | .data = &rdma_stat_rq_starve, | 176 | .data = &rdma_stat_rq_starve, |
180 | .maxlen = sizeof(atomic_t), | 177 | .maxlen = sizeof(atomic_t), |
181 | .mode = 0644, | 178 | .mode = 0644, |
182 | .proc_handler = &read_reset_stat, | 179 | .proc_handler = read_reset_stat, |
183 | }, | 180 | }, |
184 | { | 181 | { |
185 | .procname = "rdma_stat_rq_poll", | 182 | .procname = "rdma_stat_rq_poll", |
186 | .data = &rdma_stat_rq_poll, | 183 | .data = &rdma_stat_rq_poll, |
187 | .maxlen = sizeof(atomic_t), | 184 | .maxlen = sizeof(atomic_t), |
188 | .mode = 0644, | 185 | .mode = 0644, |
189 | .proc_handler = &read_reset_stat, | 186 | .proc_handler = read_reset_stat, |
190 | }, | 187 | }, |
191 | { | 188 | { |
192 | .procname = "rdma_stat_rq_prod", | 189 | .procname = "rdma_stat_rq_prod", |
193 | .data = &rdma_stat_rq_prod, | 190 | .data = &rdma_stat_rq_prod, |
194 | .maxlen = sizeof(atomic_t), | 191 | .maxlen = sizeof(atomic_t), |
195 | .mode = 0644, | 192 | .mode = 0644, |
196 | .proc_handler = &read_reset_stat, | 193 | .proc_handler = read_reset_stat, |
197 | }, | 194 | }, |
198 | { | 195 | { |
199 | .procname = "rdma_stat_sq_poll", | 196 | .procname = "rdma_stat_sq_poll", |
200 | .data = &rdma_stat_sq_poll, | 197 | .data = &rdma_stat_sq_poll, |
201 | .maxlen = sizeof(atomic_t), | 198 | .maxlen = sizeof(atomic_t), |
202 | .mode = 0644, | 199 | .mode = 0644, |
203 | .proc_handler = &read_reset_stat, | 200 | .proc_handler = read_reset_stat, |
204 | }, | 201 | }, |
205 | { | 202 | { |
206 | .procname = "rdma_stat_sq_prod", | 203 | .procname = "rdma_stat_sq_prod", |
207 | .data = &rdma_stat_sq_prod, | 204 | .data = &rdma_stat_sq_prod, |
208 | .maxlen = sizeof(atomic_t), | 205 | .maxlen = sizeof(atomic_t), |
209 | .mode = 0644, | 206 | .mode = 0644, |
210 | .proc_handler = &read_reset_stat, | 207 | .proc_handler = read_reset_stat, |
211 | }, | ||
212 | { | ||
213 | .ctl_name = 0, | ||
214 | }, | 208 | }, |
209 | { }, | ||
215 | }; | 210 | }; |
216 | 211 | ||
217 | static ctl_table svcrdma_table[] = { | 212 | static ctl_table svcrdma_table[] = { |
@@ -220,21 +215,16 @@ static ctl_table svcrdma_table[] = { | |||
220 | .mode = 0555, | 215 | .mode = 0555, |
221 | .child = svcrdma_parm_table | 216 | .child = svcrdma_parm_table |
222 | }, | 217 | }, |
223 | { | 218 | { }, |
224 | .ctl_name = 0, | ||
225 | }, | ||
226 | }; | 219 | }; |
227 | 220 | ||
228 | static ctl_table svcrdma_root_table[] = { | 221 | static ctl_table svcrdma_root_table[] = { |
229 | { | 222 | { |
230 | .ctl_name = CTL_SUNRPC, | ||
231 | .procname = "sunrpc", | 223 | .procname = "sunrpc", |
232 | .mode = 0555, | 224 | .mode = 0555, |
233 | .child = svcrdma_table | 225 | .child = svcrdma_table |
234 | }, | 226 | }, |
235 | { | 227 | { }, |
236 | .ctl_name = 0, | ||
237 | }, | ||
238 | }; | 228 | }; |
239 | 229 | ||
240 | void svc_rdma_cleanup(void) | 230 | void svc_rdma_cleanup(void) |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index 9e884383134f..f92e37eb413c 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -337,10 +337,9 @@ static int rdma_set_ctxt_sge(struct svcxprt_rdma *xprt, | |||
337 | 337 | ||
338 | static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) | 338 | static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) |
339 | { | 339 | { |
340 | if ((RDMA_TRANSPORT_IWARP == | 340 | if ((rdma_node_get_transport(xprt->sc_cm_id->device->node_type) == |
341 | rdma_node_get_transport(xprt->sc_cm_id-> | 341 | RDMA_TRANSPORT_IWARP) && |
342 | device->node_type)) | 342 | sge_count > 1) |
343 | && sge_count > 1) | ||
344 | return 1; | 343 | return 1; |
345 | else | 344 | else |
346 | return min_t(int, sge_count, xprt->sc_max_sge); | 345 | return min_t(int, sge_count, xprt->sc_max_sge); |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 9a63f669ece4..7018eef1dcdd 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -86,79 +86,63 @@ static struct ctl_table_header *sunrpc_table_header; | |||
86 | 86 | ||
87 | static ctl_table xr_tunables_table[] = { | 87 | static ctl_table xr_tunables_table[] = { |
88 | { | 88 | { |
89 | .ctl_name = CTL_UNNUMBERED, | ||
90 | .procname = "rdma_slot_table_entries", | 89 | .procname = "rdma_slot_table_entries", |
91 | .data = &xprt_rdma_slot_table_entries, | 90 | .data = &xprt_rdma_slot_table_entries, |
92 | .maxlen = sizeof(unsigned int), | 91 | .maxlen = sizeof(unsigned int), |
93 | .mode = 0644, | 92 | .mode = 0644, |
94 | .proc_handler = &proc_dointvec_minmax, | 93 | .proc_handler = proc_dointvec_minmax, |
95 | .strategy = &sysctl_intvec, | ||
96 | .extra1 = &min_slot_table_size, | 94 | .extra1 = &min_slot_table_size, |
97 | .extra2 = &max_slot_table_size | 95 | .extra2 = &max_slot_table_size |
98 | }, | 96 | }, |
99 | { | 97 | { |
100 | .ctl_name = CTL_UNNUMBERED, | ||
101 | .procname = "rdma_max_inline_read", | 98 | .procname = "rdma_max_inline_read", |
102 | .data = &xprt_rdma_max_inline_read, | 99 | .data = &xprt_rdma_max_inline_read, |
103 | .maxlen = sizeof(unsigned int), | 100 | .maxlen = sizeof(unsigned int), |
104 | .mode = 0644, | 101 | .mode = 0644, |
105 | .proc_handler = &proc_dointvec, | 102 | .proc_handler = proc_dointvec, |
106 | .strategy = &sysctl_intvec, | ||
107 | }, | 103 | }, |
108 | { | 104 | { |
109 | .ctl_name = CTL_UNNUMBERED, | ||
110 | .procname = "rdma_max_inline_write", | 105 | .procname = "rdma_max_inline_write", |
111 | .data = &xprt_rdma_max_inline_write, | 106 | .data = &xprt_rdma_max_inline_write, |
112 | .maxlen = sizeof(unsigned int), | 107 | .maxlen = sizeof(unsigned int), |
113 | .mode = 0644, | 108 | .mode = 0644, |
114 | .proc_handler = &proc_dointvec, | 109 | .proc_handler = proc_dointvec, |
115 | .strategy = &sysctl_intvec, | ||
116 | }, | 110 | }, |
117 | { | 111 | { |
118 | .ctl_name = CTL_UNNUMBERED, | ||
119 | .procname = "rdma_inline_write_padding", | 112 | .procname = "rdma_inline_write_padding", |
120 | .data = &xprt_rdma_inline_write_padding, | 113 | .data = &xprt_rdma_inline_write_padding, |
121 | .maxlen = sizeof(unsigned int), | 114 | .maxlen = sizeof(unsigned int), |
122 | .mode = 0644, | 115 | .mode = 0644, |
123 | .proc_handler = &proc_dointvec_minmax, | 116 | .proc_handler = proc_dointvec_minmax, |
124 | .strategy = &sysctl_intvec, | ||
125 | .extra1 = &zero, | 117 | .extra1 = &zero, |
126 | .extra2 = &max_padding, | 118 | .extra2 = &max_padding, |
127 | }, | 119 | }, |
128 | { | 120 | { |
129 | .ctl_name = CTL_UNNUMBERED, | ||
130 | .procname = "rdma_memreg_strategy", | 121 | .procname = "rdma_memreg_strategy", |
131 | .data = &xprt_rdma_memreg_strategy, | 122 | .data = &xprt_rdma_memreg_strategy, |
132 | .maxlen = sizeof(unsigned int), | 123 | .maxlen = sizeof(unsigned int), |
133 | .mode = 0644, | 124 | .mode = 0644, |
134 | .proc_handler = &proc_dointvec_minmax, | 125 | .proc_handler = proc_dointvec_minmax, |
135 | .strategy = &sysctl_intvec, | ||
136 | .extra1 = &min_memreg, | 126 | .extra1 = &min_memreg, |
137 | .extra2 = &max_memreg, | 127 | .extra2 = &max_memreg, |
138 | }, | 128 | }, |
139 | { | 129 | { |
140 | .ctl_name = CTL_UNNUMBERED, | ||
141 | .procname = "rdma_pad_optimize", | 130 | .procname = "rdma_pad_optimize", |
142 | .data = &xprt_rdma_pad_optimize, | 131 | .data = &xprt_rdma_pad_optimize, |
143 | .maxlen = sizeof(unsigned int), | 132 | .maxlen = sizeof(unsigned int), |
144 | .mode = 0644, | 133 | .mode = 0644, |
145 | .proc_handler = &proc_dointvec, | 134 | .proc_handler = proc_dointvec, |
146 | }, | ||
147 | { | ||
148 | .ctl_name = 0, | ||
149 | }, | 135 | }, |
136 | { }, | ||
150 | }; | 137 | }; |
151 | 138 | ||
152 | static ctl_table sunrpc_table[] = { | 139 | static ctl_table sunrpc_table[] = { |
153 | { | 140 | { |
154 | .ctl_name = CTL_SUNRPC, | ||
155 | .procname = "sunrpc", | 141 | .procname = "sunrpc", |
156 | .mode = 0555, | 142 | .mode = 0555, |
157 | .child = xr_tunables_table | 143 | .child = xr_tunables_table |
158 | }, | 144 | }, |
159 | { | 145 | { }, |
160 | .ctl_name = 0, | ||
161 | }, | ||
162 | }; | 146 | }; |
163 | 147 | ||
164 | #endif | 148 | #endif |
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 465aafc2007f..2209aa87d899 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -878,8 +878,8 @@ if (strnicmp(ia->ri_id->device->dma_device->bus->name, "pci", 3) == 0) { | |||
878 | * others indicate a transport condition which has already | 878 | * others indicate a transport condition which has already |
879 | * undergone a best-effort. | 879 | * undergone a best-effort. |
880 | */ | 880 | */ |
881 | if (ep->rep_connected == -ECONNREFUSED | 881 | if (ep->rep_connected == -ECONNREFUSED && |
882 | && ++retry_count <= RDMA_CONNECT_RETRY_MAX) { | 882 | ++retry_count <= RDMA_CONNECT_RETRY_MAX) { |
883 | dprintk("RPC: %s: non-peer_reject, retry\n", __func__); | 883 | dprintk("RPC: %s: non-peer_reject, retry\n", __func__); |
884 | goto retry; | 884 | goto retry; |
885 | } | 885 | } |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 37c5475ba258..04732d09013e 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -81,46 +81,38 @@ static struct ctl_table_header *sunrpc_table_header; | |||
81 | */ | 81 | */ |
82 | static ctl_table xs_tunables_table[] = { | 82 | static ctl_table xs_tunables_table[] = { |
83 | { | 83 | { |
84 | .ctl_name = CTL_SLOTTABLE_UDP, | ||
85 | .procname = "udp_slot_table_entries", | 84 | .procname = "udp_slot_table_entries", |
86 | .data = &xprt_udp_slot_table_entries, | 85 | .data = &xprt_udp_slot_table_entries, |
87 | .maxlen = sizeof(unsigned int), | 86 | .maxlen = sizeof(unsigned int), |
88 | .mode = 0644, | 87 | .mode = 0644, |
89 | .proc_handler = &proc_dointvec_minmax, | 88 | .proc_handler = proc_dointvec_minmax, |
90 | .strategy = &sysctl_intvec, | ||
91 | .extra1 = &min_slot_table_size, | 89 | .extra1 = &min_slot_table_size, |
92 | .extra2 = &max_slot_table_size | 90 | .extra2 = &max_slot_table_size |
93 | }, | 91 | }, |
94 | { | 92 | { |
95 | .ctl_name = CTL_SLOTTABLE_TCP, | ||
96 | .procname = "tcp_slot_table_entries", | 93 | .procname = "tcp_slot_table_entries", |
97 | .data = &xprt_tcp_slot_table_entries, | 94 | .data = &xprt_tcp_slot_table_entries, |
98 | .maxlen = sizeof(unsigned int), | 95 | .maxlen = sizeof(unsigned int), |
99 | .mode = 0644, | 96 | .mode = 0644, |
100 | .proc_handler = &proc_dointvec_minmax, | 97 | .proc_handler = proc_dointvec_minmax, |
101 | .strategy = &sysctl_intvec, | ||
102 | .extra1 = &min_slot_table_size, | 98 | .extra1 = &min_slot_table_size, |
103 | .extra2 = &max_slot_table_size | 99 | .extra2 = &max_slot_table_size |
104 | }, | 100 | }, |
105 | { | 101 | { |
106 | .ctl_name = CTL_MIN_RESVPORT, | ||
107 | .procname = "min_resvport", | 102 | .procname = "min_resvport", |
108 | .data = &xprt_min_resvport, | 103 | .data = &xprt_min_resvport, |
109 | .maxlen = sizeof(unsigned int), | 104 | .maxlen = sizeof(unsigned int), |
110 | .mode = 0644, | 105 | .mode = 0644, |
111 | .proc_handler = &proc_dointvec_minmax, | 106 | .proc_handler = proc_dointvec_minmax, |
112 | .strategy = &sysctl_intvec, | ||
113 | .extra1 = &xprt_min_resvport_limit, | 107 | .extra1 = &xprt_min_resvport_limit, |
114 | .extra2 = &xprt_max_resvport_limit | 108 | .extra2 = &xprt_max_resvport_limit |
115 | }, | 109 | }, |
116 | { | 110 | { |
117 | .ctl_name = CTL_MAX_RESVPORT, | ||
118 | .procname = "max_resvport", | 111 | .procname = "max_resvport", |
119 | .data = &xprt_max_resvport, | 112 | .data = &xprt_max_resvport, |
120 | .maxlen = sizeof(unsigned int), | 113 | .maxlen = sizeof(unsigned int), |
121 | .mode = 0644, | 114 | .mode = 0644, |
122 | .proc_handler = &proc_dointvec_minmax, | 115 | .proc_handler = proc_dointvec_minmax, |
123 | .strategy = &sysctl_intvec, | ||
124 | .extra1 = &xprt_min_resvport_limit, | 116 | .extra1 = &xprt_min_resvport_limit, |
125 | .extra2 = &xprt_max_resvport_limit | 117 | .extra2 = &xprt_max_resvport_limit |
126 | }, | 118 | }, |
@@ -129,24 +121,18 @@ static ctl_table xs_tunables_table[] = { | |||
129 | .data = &xs_tcp_fin_timeout, | 121 | .data = &xs_tcp_fin_timeout, |
130 | .maxlen = sizeof(xs_tcp_fin_timeout), | 122 | .maxlen = sizeof(xs_tcp_fin_timeout), |
131 | .mode = 0644, | 123 | .mode = 0644, |
132 | .proc_handler = &proc_dointvec_jiffies, | 124 | .proc_handler = proc_dointvec_jiffies, |
133 | .strategy = sysctl_jiffies | ||
134 | }, | ||
135 | { | ||
136 | .ctl_name = 0, | ||
137 | }, | 125 | }, |
126 | { }, | ||
138 | }; | 127 | }; |
139 | 128 | ||
140 | static ctl_table sunrpc_table[] = { | 129 | static ctl_table sunrpc_table[] = { |
141 | { | 130 | { |
142 | .ctl_name = CTL_SUNRPC, | ||
143 | .procname = "sunrpc", | 131 | .procname = "sunrpc", |
144 | .mode = 0555, | 132 | .mode = 0555, |
145 | .child = xs_tunables_table | 133 | .child = xs_tunables_table |
146 | }, | 134 | }, |
147 | { | 135 | { }, |
148 | .ctl_name = 0, | ||
149 | }, | ||
150 | }; | 136 | }; |
151 | 137 | ||
152 | #endif | 138 | #endif |