diff options
| author | Olof Johansson <olof@lixom.net> | 2014-07-19 17:59:07 -0400 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-07-19 17:59:07 -0400 |
| commit | 4e9816d012dbc28dc89559261c6ffbf8ffc440dd (patch) | |
| tree | dee9f8b31f3d6d2fb141541da88e1cc1329b017e /include/linux/sunrpc | |
| parent | da98f44f27d81d7fe9a41f69af4fe08c18d13b56 (diff) | |
| parent | 1795cd9b3a91d4b5473c97f491d63892442212ab (diff) | |
Merge tag 'v3.16-rc5' into next/fixes-non-critical
Linux 3.16-rc5
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 13 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 3 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 3 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 14 |
6 files changed, 27 insertions, 16 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 3a847de83fab..ad7dbe2cfecd 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
| @@ -142,18 +142,18 @@ struct rpc_task_setup { | |||
| 142 | test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) | 142 | test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
| 143 | #define rpc_clear_running(t) \ | 143 | #define rpc_clear_running(t) \ |
| 144 | do { \ | 144 | do { \ |
| 145 | smp_mb__before_clear_bit(); \ | 145 | smp_mb__before_atomic(); \ |
| 146 | clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \ | 146 | clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \ |
| 147 | smp_mb__after_clear_bit(); \ | 147 | smp_mb__after_atomic(); \ |
| 148 | } while (0) | 148 | } while (0) |
| 149 | 149 | ||
| 150 | #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) | 150 | #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
| 151 | #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) | 151 | #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
| 152 | #define rpc_clear_queued(t) \ | 152 | #define rpc_clear_queued(t) \ |
| 153 | do { \ | 153 | do { \ |
| 154 | smp_mb__before_clear_bit(); \ | 154 | smp_mb__before_atomic(); \ |
| 155 | clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \ | 155 | clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \ |
| 156 | smp_mb__after_clear_bit(); \ | 156 | smp_mb__after_atomic(); \ |
| 157 | } while (0) | 157 | } while (0) |
| 158 | 158 | ||
| 159 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) | 159 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 04e763221246..1bc7cd05b22e 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -244,6 +244,7 @@ struct svc_rqst { | |||
| 244 | struct page * rq_pages[RPCSVC_MAXPAGES]; | 244 | struct page * rq_pages[RPCSVC_MAXPAGES]; |
| 245 | struct page * *rq_respages; /* points into rq_pages */ | 245 | struct page * *rq_respages; /* points into rq_pages */ |
| 246 | struct page * *rq_next_page; /* next reply page to use */ | 246 | struct page * *rq_next_page; /* next reply page to use */ |
| 247 | struct page * *rq_page_end; /* one past the last page */ | ||
| 247 | 248 | ||
| 248 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ | 249 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ |
| 249 | 250 | ||
| @@ -254,11 +255,15 @@ struct svc_rqst { | |||
| 254 | u32 rq_prot; /* IP protocol */ | 255 | u32 rq_prot; /* IP protocol */ |
| 255 | unsigned short | 256 | unsigned short |
| 256 | rq_secure : 1; /* secure port */ | 257 | rq_secure : 1; /* secure port */ |
| 258 | unsigned short rq_local : 1; /* local request */ | ||
| 257 | 259 | ||
| 258 | void * rq_argp; /* decoded arguments */ | 260 | void * rq_argp; /* decoded arguments */ |
| 259 | void * rq_resp; /* xdr'd results */ | 261 | void * rq_resp; /* xdr'd results */ |
| 260 | void * rq_auth_data; /* flavor-specific data */ | 262 | void * rq_auth_data; /* flavor-specific data */ |
| 261 | 263 | int rq_auth_slack; /* extra space xdr code | |
| 264 | * should leave in head | ||
| 265 | * for krb5i, krb5p. | ||
| 266 | */ | ||
| 262 | int rq_reserved; /* space on socket outq | 267 | int rq_reserved; /* space on socket outq |
| 263 | * reserved for this request | 268 | * reserved for this request |
| 264 | */ | 269 | */ |
| @@ -454,11 +459,7 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t); | |||
| 454 | */ | 459 | */ |
| 455 | static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space) | 460 | static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space) |
| 456 | { | 461 | { |
| 457 | int added_space = 0; | 462 | svc_reserve(rqstp, space + rqstp->rq_auth_slack); |
| 458 | |||
| 459 | if (rqstp->rq_authop->flavour) | ||
| 460 | added_space = RPC_MAX_AUTH_SIZE; | ||
| 461 | svc_reserve(rqstp, space + added_space); | ||
| 462 | } | 463 | } |
| 463 | 464 | ||
| 464 | #endif /* SUNRPC_SVC_H */ | 465 | #endif /* SUNRPC_SVC_H */ |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 0b8e3e6bdacf..5cf99a016368 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
| @@ -115,14 +115,13 @@ struct svc_rdma_fastreg_mr { | |||
| 115 | struct list_head frmr_list; | 115 | struct list_head frmr_list; |
| 116 | }; | 116 | }; |
| 117 | struct svc_rdma_req_map { | 117 | struct svc_rdma_req_map { |
| 118 | struct svc_rdma_fastreg_mr *frmr; | ||
| 119 | unsigned long count; | 118 | unsigned long count; |
| 120 | union { | 119 | union { |
| 121 | struct kvec sge[RPCSVC_MAXPAGES]; | 120 | struct kvec sge[RPCSVC_MAXPAGES]; |
| 122 | struct svc_rdma_chunk_sge ch[RPCSVC_MAXPAGES]; | 121 | struct svc_rdma_chunk_sge ch[RPCSVC_MAXPAGES]; |
| 122 | unsigned long lkey[RPCSVC_MAXPAGES]; | ||
| 123 | }; | 123 | }; |
| 124 | }; | 124 | }; |
| 125 | #define RDMACTXT_F_FAST_UNREG 1 | ||
| 126 | #define RDMACTXT_F_LAST_CTXT 2 | 125 | #define RDMACTXT_F_LAST_CTXT 2 |
| 127 | 126 | ||
| 128 | #define SVCRDMA_DEVCAP_FAST_REG 1 /* fast mr registration */ | 127 | #define SVCRDMA_DEVCAP_FAST_REG 1 /* fast mr registration */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index b05963f09ebf..7235040a19b2 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -24,6 +24,7 @@ struct svc_xprt_ops { | |||
| 24 | void (*xpo_release_rqst)(struct svc_rqst *); | 24 | void (*xpo_release_rqst)(struct svc_rqst *); |
| 25 | void (*xpo_detach)(struct svc_xprt *); | 25 | void (*xpo_detach)(struct svc_xprt *); |
| 26 | void (*xpo_free)(struct svc_xprt *); | 26 | void (*xpo_free)(struct svc_xprt *); |
| 27 | int (*xpo_secure_port)(struct svc_rqst *); | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | struct svc_xprt_class { | 30 | struct svc_xprt_class { |
| @@ -63,6 +64,7 @@ struct svc_xprt { | |||
| 63 | #define XPT_DETACHED 10 /* detached from tempsocks list */ | 64 | #define XPT_DETACHED 10 /* detached from tempsocks list */ |
| 64 | #define XPT_LISTENER 11 /* listening endpoint */ | 65 | #define XPT_LISTENER 11 /* listening endpoint */ |
| 65 | #define XPT_CACHE_AUTH 12 /* cache auth info */ | 66 | #define XPT_CACHE_AUTH 12 /* cache auth info */ |
| 67 | #define XPT_LOCAL 13 /* connection from loopback interface */ | ||
| 66 | 68 | ||
| 67 | struct svc_serv *xpt_server; /* service for transport */ | 69 | struct svc_serv *xpt_server; /* service for transport */ |
| 68 | atomic_t xpt_reserved; /* space on outq that is rsvd */ | 70 | atomic_t xpt_reserved; /* space on outq that is rsvd */ |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 15f9204ee70b..70c6b92e15a7 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -215,6 +215,9 @@ typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | |||
| 215 | 215 | ||
| 216 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 216 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
| 217 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 217 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
| 218 | extern void xdr_commit_encode(struct xdr_stream *xdr); | ||
| 219 | extern void xdr_truncate_encode(struct xdr_stream *xdr, size_t len); | ||
| 220 | extern int xdr_restrict_buflen(struct xdr_stream *xdr, int newbuflen); | ||
| 218 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 221 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
| 219 | unsigned int base, unsigned int len); | 222 | unsigned int base, unsigned int len); |
| 220 | extern unsigned int xdr_stream_pos(const struct xdr_stream *xdr); | 223 | extern unsigned int xdr_stream_pos(const struct xdr_stream *xdr); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3e5efb2b236e..fcbfe8783243 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -24,6 +24,12 @@ | |||
| 24 | #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) | 24 | #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) |
| 25 | #define RPC_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE_LIMIT | 25 | #define RPC_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE_LIMIT |
| 26 | 26 | ||
| 27 | #define RPC_CWNDSHIFT (8U) | ||
| 28 | #define RPC_CWNDSCALE (1U << RPC_CWNDSHIFT) | ||
| 29 | #define RPC_INITCWND RPC_CWNDSCALE | ||
| 30 | #define RPC_MAXCWND(xprt) ((xprt)->max_reqs << RPC_CWNDSHIFT) | ||
| 31 | #define RPCXPRT_CONGESTED(xprt) ((xprt)->cong >= (xprt)->cwnd) | ||
| 32 | |||
| 27 | /* | 33 | /* |
| 28 | * This describes a timeout strategy | 34 | * This describes a timeout strategy |
| 29 | */ | 35 | */ |
| @@ -379,9 +385,9 @@ static inline int xprt_test_and_clear_connected(struct rpc_xprt *xprt) | |||
| 379 | 385 | ||
| 380 | static inline void xprt_clear_connecting(struct rpc_xprt *xprt) | 386 | static inline void xprt_clear_connecting(struct rpc_xprt *xprt) |
| 381 | { | 387 | { |
| 382 | smp_mb__before_clear_bit(); | 388 | smp_mb__before_atomic(); |
| 383 | clear_bit(XPRT_CONNECTING, &xprt->state); | 389 | clear_bit(XPRT_CONNECTING, &xprt->state); |
| 384 | smp_mb__after_clear_bit(); | 390 | smp_mb__after_atomic(); |
| 385 | } | 391 | } |
| 386 | 392 | ||
| 387 | static inline int xprt_connecting(struct rpc_xprt *xprt) | 393 | static inline int xprt_connecting(struct rpc_xprt *xprt) |
| @@ -411,9 +417,9 @@ static inline void xprt_clear_bound(struct rpc_xprt *xprt) | |||
| 411 | 417 | ||
| 412 | static inline void xprt_clear_binding(struct rpc_xprt *xprt) | 418 | static inline void xprt_clear_binding(struct rpc_xprt *xprt) |
| 413 | { | 419 | { |
| 414 | smp_mb__before_clear_bit(); | 420 | smp_mb__before_atomic(); |
| 415 | clear_bit(XPRT_BINDING, &xprt->state); | 421 | clear_bit(XPRT_BINDING, &xprt->state); |
| 416 | smp_mb__after_clear_bit(); | 422 | smp_mb__after_atomic(); |
| 417 | } | 423 | } |
| 418 | 424 | ||
| 419 | static inline int xprt_test_and_set_binding(struct rpc_xprt *xprt) | 425 | static inline int xprt_test_and_set_binding(struct rpc_xprt *xprt) |
